{"id":20541067,"url":"https://github.com/netways/check_cloud_azure","last_synced_at":"2025-10-30T02:39:07.828Z","repository":{"id":38361251,"uuid":"351097100","full_name":"NETWAYS/check_cloud_azure","owner":"NETWAYS","description":"Monitoring Plugin (Icinga/Nagios compatible) to monitor resources on Microsoft Azure","archived":false,"fork":false,"pushed_at":"2025-04-02T14:03:23.000Z","size":254,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-02T15:21:28.827Z","etag":null,"topics":["azure","icinga","monitoring"],"latest_commit_sha":null,"homepage":"https://www.netways.de/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NETWAYS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-03-24T13:50:43.000Z","updated_at":"2025-04-02T14:03:21.000Z","dependencies_parsed_at":"2023-02-19T06:16:07.688Z","dependency_job_id":"475c46a8-cd37-41f6-9ac9-e1da277a744b","html_url":"https://github.com/NETWAYS/check_cloud_azure","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_cloud_azure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_cloud_azure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_cloud_azure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_cloud_azure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NETWAYS","download_url":"https://codeload.github.com/NETWAYS/check_cloud_azure/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248848495,"owners_count":21171387,"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","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","icinga","monitoring"],"created_at":"2024-11-16T01:19:10.979Z","updated_at":"2025-10-30T02:39:02.800Z","avatar_url":"https://github.com/NETWAYS.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# check_cloud_azure\n\ncheck_cloud_azure is an Icinga check plugin, which is capable to check in the Microsoft Azure context.\n\nIn the current version check_cloud_azure supports the Virtual Machines context, which is capable to check a single\nor multiple VMs in a defined resource group.\n\n## Usage\n\n### Computing - Virtual Machines\n\nWhen one of the states is non-ok, or a machine is deallocated, the check will alert.\n\n#### compute vms\n\nChecks multiple Azure VMs in a resource group\n\n```\nUsage:\n  check_cloud_azure compute vms [flags]\n\nFlags:\n  -r, --group string      Azure resource group\n  -h, --help              help for vms\n  -n, --tagname string    Filter resource group by tag (e.g. tag1)\n  -v, --tagvalue string   Tag value of resource group (e.g. value1)\n\nGlobal Flags:\n      --auth-file string   Azure auth file (env:AZURE_AUTH_LOCATION)\n  -s, --sub string         Azure Subscription ID (env:AZURE_SUBSCRIPTION_ID)\n  -t, --timeout int        Timeout for the check (default 30)\n```\n\n```\n$ check_azure_cloud compute vms --sub SUBSCRIPTION-UUID\nCRITICAL - 2 VMs found - 2 running - 1 deallocated\n\n## Group: Dev\n\n[OK] \"vm1\" provision=succeeded power=running agent=succeeded\n[CRITICAL] \"vm2\" provision=succeeded power=deallocated agent=(none)\n\n## Group: AnotherGroup\n\n[OK] \"prod1\" provision=succeeded power=running agent=succeeded\n```\n\n#### compute vm\n\nChecks a single Azure VM\n\n```\nUsage:\n  check_cloud_azure compute vm [flags]\n\nFlags:\n  -r, --group string   Azure resource group\n  -h, --help           help for vm\n  -n, --name string    Look for vm by name\n\nGlobal Flags:\n      --auth-file string   Azure auth file (env:AZURE_AUTH_LOCATION)\n  -s, --sub string         Azure Subscription ID (env:AZURE_SUBSCRIPTION_ID)\n  -t, --timeout int        Timeout for the check (default 30)\n```\n\n```\n$ check_azure_cloud compute vms --sub SUBSCRIPTION-UUID --group group-name --name vm-name\nCRITICAL - \"vm-name\" provision=succeeded power=deallocated agent=(none)\n\nSize: Standard_B1s\nLocation: germanywestcentral\n```\n\n## Setting up Access\n\nIn order to work correctly you need the correct permissions and configuration within Azure, to grant the plugin proper\nread-only access to the resources.\n\nThe following step-by-step instructions will help you to setup this configuration.\n\n### Environment variables\n\nThe check itself needs environment variables, and supports the default environment that is compatible with other\nAzure client integrations.\n\nExport the following environment variables:\n\n* `AZURE_TENANT_ID` See Directory Tenant ID under your APP\n* `AZURE_CLIENT_ID` See Application Client ID\n* `AZURE_CLIENT_SECRET` Only visible after creating a client secret for your app\n\nAlternatively you can [create a credential file using the Azure CLI](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli),\nor manually with the following contents:\n\n```json\n{\n  \"tenantId\": \"xxx\",\n  \"clientId\": \"xxx\",\n  \"clientSecret\": \"xxx\",\n  \"resourceManagerEndpointUrl\": \"https://management.azure.com/\"\n}\n```\n\nThen either set environment `AZURE_AUTH_LOCATION` or pass `--auth-file` with the file path.\n\nAlso see [Authentication methods in the Azure SDK for Go](https://docs.microsoft.com/en-us/azure/developer/go/azure-sdk-authorization).\n\n### App Registration\n\nIn Azure, withing the Azure Active Directory, search for the key word **App registrations** and add a new registration\nwith a meaningful name for the app registration like `check_cloud_aws`.\n\nIf the app registration was successfully, it should appear under the tab **Owned applications**. pen the app details\nand navigate to the section **Certificates \u0026 secrets**, add a new client secret.\n\n### Give app read access\n\nNow the `check_cloud_azure` **App Registration** needs *read only* access to Azure to fetch monitoring values.\n\nIn Azure, search for the key word `Subscriptions`. Then click on your desired **Subscription name** and navigate to\nthe menu point **Access control (IAM)** and click on the button **Add role assignment**.\n\nSelect as the following:\n* Role: Reader\n* Assign access to: User, group, or service principal\n* Select: Your_chosen_app_name\n\n## License\n\nCopyright (C) 2021 [NETWAYS GmbH](mailto:info@netways.)\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Fcheck_cloud_azure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetways%2Fcheck_cloud_azure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Fcheck_cloud_azure/lists"}