{"id":22454693,"url":"https://github.com/swisstxt/cloudstack-nagios","last_synced_at":"2025-08-02T02:31:38.414Z","repository":{"id":14035347,"uuid":"16737689","full_name":"swisstxt/cloudstack-nagios","owner":"swisstxt","description":"Nagios checks for Cloudstack","archived":false,"fork":false,"pushed_at":"2021-09-02T08:31:42.000Z","size":146,"stargazers_count":6,"open_issues_count":0,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-18T16:52:44.005Z","etag":null,"topics":["cloudstack","icinga","nagios"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swisstxt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-11T16:49:13.000Z","updated_at":"2021-09-02T08:31:42.000Z","dependencies_parsed_at":"2022-09-23T18:03:01.737Z","dependency_job_id":null,"html_url":"https://github.com/swisstxt/cloudstack-nagios","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/swisstxt/cloudstack-nagios","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisstxt%2Fcloudstack-nagios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisstxt%2Fcloudstack-nagios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisstxt%2Fcloudstack-nagios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisstxt%2Fcloudstack-nagios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swisstxt","download_url":"https://codeload.github.com/swisstxt/cloudstack-nagios/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisstxt%2Fcloudstack-nagios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267527833,"owners_count":24102017,"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-07-28T02:00:09.689Z","response_time":68,"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":["cloudstack","icinga","nagios"],"created_at":"2024-12-06T07:08:51.648Z","updated_at":"2025-08-02T02:31:38.152Z","avatar_url":"https://github.com/swisstxt.png","language":"Ruby","readme":"# Cloudstack Nagios\n\n[![Gem Version](https://badge.fury.io/rb/cloudstack-nagios.svg)](http://badge.fury.io/rb/cloudstack-nagios)\n\nCloudStack Nagios helps you monitoring your Cloudstack environment with Nagios/Icinga.\nCloudStack Nagios uses the CloudStack API to collect information about system vm's and resources.\n\nThe following checks are supported:\n  * system and network checks for virtual routers\n  * storage pool capacity checks\n  * global zone capacities\n\n## Prerequisites\n\n  * CloudStack Root Admin keys have to be used.\n  * In order to connect to system vm's the private ssh key found on the CloudStack management server under /var/lib/cloud/management/.ssh/id_rsa are required.\n  * The system vm's must be reachable on the Cloudstack Management Network over SSH (default port 3922) from the Nagios server executing the checks (check with 'ssh -i /var/lib/cloud/management/.ssh/id_rsa -p 3922 \u003crouter_mgmt_ip\u003e').\n\n## Installation\n\nInstall the cloudstack-cli gem:\n\n```sh\n$ gem install cloudstack-nagios\n```\n\n## Setup\n\nCreate the initial configuration:\n\n```sh\n$ cs-nagios setup\n```\n\ncloudstack-nagios expects to find a configuration file with the API URL and your CloudStack credentials in your home directory named .cloudstack-cli.yml. If the file is located elsewhere you can specify the location using the --config option.\n\ncloudstack-nagios supports multiple environments using the --environment option.\n\nExample content of the configuration file:\n\n```yaml\n:url:         \"https://my-cloudstack-server/client/api/\"\n:api_key:     \"cloudstack-api-key\"\n:secret_key:  \"cloudstack-api-secret\"\n\ntest:\n  :url:         \"http://my-cloudstack-testserver/client/api/\"\n  :api_key:     \"cloudstack-api-key\"\n  :secret_key:  \"cloudstack-api-secret\"\n```\n\n## Usage\n\n### Basics\n\nSee the help screen:\n\n```sh\n$ cs-nagios\n```\n\n### Generate all Nagios configuration files at once\n\nGenerate all configuration files:\n\n```sh\n$ cs-nagios nagios_config generate all\n```\nYou can also generate each config file individually.\nThe following types are available:\n\n```sh\n$ cs-nagios nagios_config list\nall\nhostgroups\nzone_hosts\nrouter_hosts\nrouter_services\nsystem_vm_hosts\nsystem_vm_services\ncapacities\nasync_jobs\nstorage_pools\n```\n\n### System VM checks\n\nFor all vm checks access to the CloudStack management network is required in order to run the checks via SSH or SNMP.\n\n#### Types\n\ncloudstack-nagios differentiates between 2 different types of system vm's:\n   * routers: `cs-nagios check router`\n   * secondary storage vm's and console proxies: `cs-nagios check system_vm`\n\n#### Checks\n\nThe following checks are available:\n\nGeneral Checks\n   * memory - measure memory usage in percents\n   * cpu - measure cpu usage in percent\n   * network - measure network usage\n   * fs_rw - check if the root file system is writeable\n   * rootfs_rw - check if the root file system is writeable (wrapper for fs_rw with mount point /)\n   * disk_usage - check the disks space usage of the root volume\n\nChecks for routers\n   * conntrack_connections, check the number of conntrack connections and set proper limits if needed\n   * active_ftp - make sure conntrack_ftp and nf_nat_ftp modules are loaded and enable it if needed\n\nExamples:\n\n```sh\n$ cs-nagios check system_vm network --host 10.100.9.161\n$ cs-nagios check router active_ftp --host 10.100.9.177\n```\n\n#### Enabling snmpd checks for system vms\n\nIf you want to check your system vm's with standard Nagios SNMP checks instead of checking over SSH, there are commands to configure snmpd on the machines and open the firewall.\n\n   * snmpd_config enable - goes to all the routers and configure snmpd\n   * snmpd_config check - test if port TCP 161 is reachable on routers\n\nNote: If you want to use snmp checks, you have to adapt the Nagios configuration files accordingly.\n\n### Capacity checks\n\nChecks various global capacity values.\n\nExample:\n\n```sh\n$ cs-nagios check capacity memory --zone ZUERICH_IX\n```\n\n### Storage pool checks\n\nChecks the available disk space on CloudStack storage pools.\n\nExample:\n\n```sh\n$ cs-nagios check storage_pool --pool_name fs_cs_zone01_pod01\n```\n\n### Async jobs checks\n\nChecks the number of pending async jobs.\n\nExample:\n\n```sh\n$ cs-nagios check async_jobs\n```\n\n### Snapshot checks\n\nChecks for snapshots which are not in state 'BakedUp' for a certain amount of time.\n\nExample:\n\n```sh\n$ cs-nagios check snapshots\n```\n\n## References\n\n  * [Cloudstack API documentation](http://cloudstack.apache.org/docs/api/apidocs-4.2/TOC_Root_Admin.html)\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\n\nReleased under the MIT License. See the [LICENSE](https://bitbucket.org/swisstxt/cloudstack-cli/raw/master/LICENSE.txt) file for further details.\n","funding_links":[],"categories":["Operational Extensions"],"sub_categories":["Montitoring and Graphs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisstxt%2Fcloudstack-nagios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswisstxt%2Fcloudstack-nagios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisstxt%2Fcloudstack-nagios/lists"}