{"id":18906545,"url":"https://github.com/claranet/fame","last_synced_at":"2025-08-21T09:05:12.686Z","repository":{"id":148145286,"uuid":"379529380","full_name":"claranet/fame","owner":"claranet","description":"Fame - Function for Azure Monitoring Extension","archived":false,"fork":false,"pushed_at":"2025-06-26T12:56:54.000Z","size":48,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-26T13:46:01.092Z","etag":null,"topics":["azure","claranet","monitoring","python","serverless"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/claranet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-23T08:15:23.000Z","updated_at":"2025-06-26T12:56:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2840285-77b7-46ff-9a53-39eb4c38e231","html_url":"https://github.com/claranet/fame","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/claranet/fame","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Ffame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Ffame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Ffame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Ffame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claranet","download_url":"https://codeload.github.com/claranet/fame/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claranet%2Ffame/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271454893,"owners_count":24762698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","claranet","monitoring","python","serverless"],"created_at":"2024-11-08T09:16:43.889Z","updated_at":"2025-08-21T09:05:12.679Z","avatar_url":"https://github.com/claranet.png","language":"Python","readme":"# Fame - Function for Azure Monitoring Extension\n\nThis repository hosts an Azure Function App Python code in order to run Log Analytics and Resource Graph queries and\nsend results to [Splunk Observability](https://www.splunk.com/en_us/observability.html) (formerly SignalFx) or\n[Datadog](https://www.datadoghq.com/).\n\n\n## Pre-requisites\n\n* A Python 3.12 [Azure Function App](https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview)\n* A [Log Analytics Workspace](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/log-analytics-overview)\nwith resources [Diagnostic Settings](https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings?tabs=CMD)\nlinked to it\n* A [Table Storage](https://docs.microsoft.com/en-us/azure/storage/tables/table-storage-overview) containing the queries.\n* Function [Managed Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview)\n    or Azure [Service Principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals#service-principal-object)\n    with at least `Log Analytics Reader` right on the Log Analytics Workspace for Log Analytics queries, `Reader` on the\n    subscription for the Resource Graph for Resource Graph queries and `Reader and Data Access` on the Storage Account if\n    storage key is not provided.\n* Either:\n    * A [Splunk Observability](https://www.observability.splunk.com/en_us/infrastructure-monitoring.html) account and its\n      associated [ingest Token](https://dev.splunk.com/observability/docs/administration/authtokens/#Organization-access-tokens)\n    * OR a [Datadog](https://www.datadoghq.com/) account and its associated API key\n\n\n### Variables\n\n* **QUERIES_STORAGE_ACCOUNT_NAME** (optional): The name of the Storage Account containing the table with the queries.\nIf not set, use the `AzureWebJobsStorage` connection string.\n* **QUERIES_STORAGE_ACCOUNT_KEY** (optional): The key to access the Storage Account containing the table with the\nqueries, will try to fetch it if empty. If not set, use the `AzureWebJobsStorage` connection string.\n* **QUERIES_STORAGE_TABLE_NAME** (optional, defaults to `LogQueries`): The name of the table in the Storage Account\nwith the queries\n* **METRICS_EXTRA_DIMENSIONS** (optional): Extra dimensions/tags to send along the metrics.\n    Example: `env=prod,dd_monitored=true`\n\n#### Metrics Backend Configuration (one backend required)\n\n##### Splunk Observability Configuration\n* **SFX_TOKEN** (required for Splunk): The Splunk Observability token for metric sending\n* **SFX_REALM** (optional, defaults to `eu0`): Splunk realm (region) to use for metric sending\n\n##### Datadog Configuration\n* **DD_API_KEY** (required for Datadog): The Datadog API key for metric sending\n* **DD_API_HOST** (optional, defaults to `https://api.datadoghq.eu`): Datadog API host\n\n#### Other Configuration\n* **LOG_ANALYTICS_WORKSPACE_GUID** (required): ID of the Log Analytics Workspace for Log Analytics queries\n* **SUBSCRIPTION_ID** (required): ID of the Subscription for Resource Graph queries\n* **LOG_LEVEL** (optional, defaults to `INFO`): Logging level\n* **AZURE_CLIENT_ID** (optional): Azure Service Principal ID if Service Principal authentication is used\n* **AZURE_TENANT_ID** (optional): Azure Tenant ID if Service Principal authentication is used\n* **AZURE_CLIENT_SECRET** (optional): Azure Service Principal secret key if Service Principal authentication is used\n\n\n## How it works\n\nThe function runs all the queries stored in the associated Table Storage every minute within the given\nLog Analytics Workspace and sends the results to either Splunk Observability or Datadog, depending on the configuration.\n\nEach query specifies the value of the metric and its associated time. Every column in the query is sent as metric\ndimension along with the defined extra dimensions.\n\n### Table storage format\n\nThe records in the Table Storage must have the following columns:\n* **MetricName**: Name of the metric to send to the configured backend (Splunk Observability or Datadog)\n* **Query**: Query to run either on the Log Analytics Workspace or the Azure Resource Graph\n    (See [https://docs.microsoft.com/en-us/azure/azure-monitor/logs/get-started-queries](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/get-started-queries))\n* **QueryType**: Type of Query to run. Can be `log_analytics` (default) or `resource_graph`.\n    (See [https://docs.microsoft.com/en-us/azure/azure-monitor/logs/get-started-queries](https://docs.microsoft.com/en-us/azure/azure-monitor/logs/get-started-queries))\n\n\n\n### Log queries requirements\n\nThe query must contain the columns `metric_value` with a metric value and `timestamp` with the datetime of the metric to send.\nThe others columns must be strings and are treated as dimensions for the metric.\n\nFor Log Analytics queries, you must specify a time range in your query to avoid retrieving and sending a huge amount of data.\n\n## How to deploy\n\nYou can use [Zip deployment](https://docs.microsoft.com/en-us/azure/azure-functions/deployment-zip-push),\n[Azure Function Core Tools](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#publish)\nor any other Azure deployment method to deploy this application.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaranet%2Ffame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaranet%2Ffame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaranet%2Ffame/lists"}