{"id":20541083,"url":"https://github.com/netways/check_vmware_nsxt","last_synced_at":"2025-04-14T08:39:15.390Z","repository":{"id":39996772,"uuid":"362891615","full_name":"NETWAYS/check_vmware_nsxt","owner":"NETWAYS","description":"Icinga check plugin for the VMware NSX-T REST API","archived":false,"fork":false,"pushed_at":"2024-06-03T11:23:12.000Z","size":81,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-27T22:11:31.868Z","etag":null,"topics":["icinga","monitoring","plugin","vmware"],"latest_commit_sha":null,"homepage":"","language":"Python","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":"CONTRIBUTING.md","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-04-29T17:10:59.000Z","updated_at":"2024-10-24T14:16:05.000Z","dependencies_parsed_at":"2024-03-05T11:44:16.049Z","dependency_job_id":"5690236e-a6f7-4ad0-9d1f-35853506c5bf","html_url":"https://github.com/NETWAYS/check_vmware_nsxt","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_vmware_nsxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_vmware_nsxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_vmware_nsxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NETWAYS%2Fcheck_vmware_nsxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NETWAYS","download_url":"https://codeload.github.com/NETWAYS/check_vmware_nsxt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248848112,"owners_count":21171305,"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":["icinga","monitoring","plugin","vmware"],"created_at":"2024-11-16T01:19:16.840Z","updated_at":"2025-04-14T08:39:15.372Z","avatar_url":"https://github.com/NETWAYS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# check_vmware_nsxt\n\nIcinga check plugin for the VMware NSX-T REST API.\n\nSupported Modes:\n\n* cluster-status - retrieves the overall NSX-T cluster status from the API\n* alarms - Retrieve and display open alarms from the API\n* capacity-usage - Retrieves and checks capacity indicators from the API\n\n## Installation\n\nPython 3.8 is required, and you need the Python [requests](https://pypi.org/project/requests/) module.\n\nPlease prefer installation via system packages like `python3-requests`.\n\nAlternatively you can install with pip:\n\n    pip3 install -r requirements.txt\n\n## Usage\n\n```\ncheck_vmware_nsxt.py --help\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --api API, -A API     VMware NSX-T URL without any sub-path (e.g. https://vmware-nsx.local)\n  --username USERNAME, -u USERNAME\n                        Username for Basic Auth (CHECK_VMWARE_NSXT_API_USER)\n  --password PASSWORD, -p PASSWORD\n                        Password for Basic Auth (CHECK_VMWARE_NSXT_API_PASSWORD)\n  --mode MODE, -m MODE  Check mode\n  --exclude [EXCLUDE ...]\n                        Exclude alarms or usage from the check results.\n                        Can be used multiple times and supports regular expressions.\n  --max-age MAX_AGE, -M MAX_AGE\n                        Max age in minutes for capacity usage updates. Defaults to 5\n  --version, -V         Print version\n  --insecure            Do not verify TLS certificate. Be careful with this option, please\n```\n\nThe `--exclude` parameter will match against alarms and capacity-usage. It uses the following string representation (whitespaces included) to match against:\n\n* alarms: `severity` `node_display_name` `feature_display_name` `event_type_display_name`\n* capacity-usage: `severity` `display_name`\n\nVarious flags can be set with environment variables, refer to the help to see which flags.\n\n## Examples\n\nMode: cluster-status\n\n```\ncheck_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode cluster-status\n\n[OK] control_cluster_status=STABLE - mgmt_cluster_status=STABLE - control_cluster_status=STABLE - nodes_online=3\n\n[OK] DATASTORE: STABLE - 3 members\n[OK] CLUSTER_BOOT_MANAGER: STABLE - 3 members\n[OK] CONTROLLER: STABLE - 3 members\n[OK] MANAGER: STABLE - 3 members\n[OK] POLICY: STABLE - 3 members\n[OK] HTTPS: STABLE - 3 members\n[OK] ASYNC_REPLICATOR: STABLE - 3 members\n[OK] MONITORING: STABLE - 3 members\n[OK] IDPS_REPORTING: STABLE - 3 members\n[OK] CORFU_NONCONFIG: STABLE - 3 members\n| nodes_online=3;;;0\n```\n\nMode: alarms\n\n```\ncheck_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode alarms\n\n[WARNING] 1 alarms - 1 medium\n\n[MEDIUM] (2021-04-26 17:25:18) (node1) Intelligence Health/Storage Latency High - Intelligence node storage latency is high.\n| alarms=1;;;0 alarms.medium=1;;;0\n```\n\n```\ncheck_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode alarms --exclude \"LOW\"\n# Hint: Excluded alerts will still be counted, but are not factored into the exit code\n\n[OK] 1 alarms\n| alarms=1;;;0\n```\n\nMode: capacity-usage\n\n```\ncheck_vmware_nsxt.py --api 'https://vmware-nsx.local' -u icinga -p password --mode capacity-usage\n\n[OK] 28 info - no usages - last update: 2021-04-29 19:06:12\n\n[OK] [INFO] System-wide NAT rules: 0 of 25000 (0%)\n[OK] [INFO] Network Introspection Rules: 1 of 10000 (0.01%)\n[OK] [INFO] System-wide Endpoint Protection Enabled Hosts: 0 of 256 (0%)\n...\n| number_of_nat_rules=0%;70;100;0;100\nnumber_of_si_rules=0.01%;70;100;0;100\nnumber_of_gi_protected_hosts=0%;70;100;0;100\n...\n```\n\n## API Documentation\n\n[VMware-NSX-T-Data-Center docs](https://docs.vmware.com/en/VMware-NSX-T-Data-Center)\n\nGeneral API Documentation: [code.vmware.com](https://code.vmware.com/apis/1083/nsx-t)\n\nEndpoints the check uses:\n* [/api/v1/cluster-status](https://vdc-download.vmware.com/vmwb-repository/dcr-public/787988e9-6348-4b2a-8617-e6d672c690ee/a187360c-77d5-4c0c-92a8-8e07aa161a27/api_includes/method_ReadClusterStatus.html)\n* [/api/v1/alarms](https://vdc-download.vmware.com/vmwb-repository/dcr-public/787988e9-6348-4b2a-8617-e6d672c690ee/a187360c-77d5-4c0c-92a8-8e07aa161a27/api_includes/method_GetAlarms.html)\n* [/api/v1/capacity/usage](https://vdc-download.vmware.com/vmwb-repository/dcr-public/787988e9-6348-4b2a-8617-e6d672c690ee/a187360c-77d5-4c0c-92a8-8e07aa161a27/api_includes/method_GetProtonCapacityUsage.html)\n\n## License\n\nVMware NSX® is a trademark of VMware, Inc.\n\nCopyright (C) 2021 [NETWAYS GmbH](mailto:info@netways.de)\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_vmware_nsxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetways%2Fcheck_vmware_nsxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetways%2Fcheck_vmware_nsxt/lists"}