{"id":20504087,"url":"https://github.com/icinga/icinga2-diagnostics","last_synced_at":"2025-10-30T23:41:35.850Z","repository":{"id":56411027,"uuid":"114757723","full_name":"Icinga/icinga2-diagnostics","owner":"Icinga","description":"Shell script for analyzing Icinga 2 installations.","archived":false,"fork":false,"pushed_at":"2020-11-09T16:50:59.000Z","size":80,"stargazers_count":26,"open_issues_count":63,"forks_count":9,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-13T20:47:36.442Z","etag":null,"topics":["icinga","icinga2","monitoring","support-engineers"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Icinga.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}},"created_at":"2017-12-19T11:34:10.000Z","updated_at":"2024-04-11T06:02:13.000Z","dependencies_parsed_at":"2022-08-15T18:10:45.194Z","dependency_job_id":null,"html_url":"https://github.com/Icinga/icinga2-diagnostics","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icinga%2Ficinga2-diagnostics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icinga%2Ficinga2-diagnostics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icinga%2Ficinga2-diagnostics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Icinga%2Ficinga2-diagnostics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Icinga","download_url":"https://codeload.github.com/Icinga/icinga2-diagnostics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782278,"owners_count":21160716,"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","icinga2","monitoring","support-engineers"],"created_at":"2024-11-15T19:36:17.767Z","updated_at":"2025-10-30T23:41:30.811Z","avatar_url":"https://github.com/Icinga.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# icinga2-diagnostics ##\nA script to gather valuable data for providing to support engineer\n\nThis script is mostly intended as tool for support engineers. If a user reports a problem, the output of the scripts should cover the most common questions a support engineer will have.\n\nThe intention is not to collect as much data as possible but collect what is helpful in most cases and providing an overview whithout drowning support in too much data.\n\n**Please note:** Even though this script is meant to just collect really useful data, it does still collect a lot. Browse through any output before you send it so that you don't send any confidential data without noticing.\n\n**Please note as well:** The main intention of the script is to provide data *when asked for it*. While it might be helpful when working with commercial support, sending unwanted big blobs of data into community channels might lower your chances of getting help. Always try the [troubleshooting section](https://www.icinga.com/docs/icinga2/latest/doc/15-troubleshooting/) of the Icinga 2 documentation before requesting any community help. The upcoming \"suggestion mode\" of this script might help with troubleshooting as well.\n\nLater versions might include options to collect this \"usually helpful\" set of data or lots of data for deep diving (e.g. whole logfiles, etc.)\n\n## Usage ##\n\nThis script has several different modes:\n\n* Default mode: Give a quick overview over your setup for professional or community support\n* Tarball mode: Create a tarball of the configuration of your setup for thorough investigation by professional support\n* Suggestion mode: Search things to improve and possible problems and give advice (still to be implemented)\n\nIf your setup consists of multiple hosts you can run on it on every node to get a more thorough overview. If you have e.g. dedicated nodes for graphing the script will work and only analyse the tools you installed on the node. (Although details about Graphers are still missing)\n\n### Default Mode ###\n\nJust use the script without any parameter.\n\n    # ./icinga-diagnostics.sh\n\n### Tarball Mode ###\n\nJust run the script with the `-t` parameter.\n\n    # ./icinga-diagnostics.sh -t\n\n**Be aware that this collects your whole configuration including passwords, etc. Think before you send this to someone!**\n\nThe script will thell you where you can find your tarball when it's finished. You can still remove data from the tarball before sending it to someone.\n\n### Extra options ###\n\n* -z : Calculate zones with their endpoints (very time consuming on large setups)\n* -g : add `gdb` output\n\n`gdb` Output is only useful for debugging problems in the Icinga 2 binary, not for configuration problems. For `gdb` to work you have to install `gdb` and the \"degbugging symbols\" for all the programs you want to have their information added. e.g. for Icinga 2 the corresponding package is `icinga2-debuginfo` on RedHat/CentOS or `icinga2-dbg` on Debian or Ubuntu. In addition you will need the `icinga-gdb` file containing the `gdb` commands in the directory where icinga2-diagnostics resides.\n\n## Icinga 2 configuration ##\n\nIn the folder `debug-configuration` you find a sample configuration file you can place in a zone where you have problems with executing checks with Icinga. This will create some services that check for the presence of some script interpreters including version and include paths on the host. You will get extra services showing you the user and other data about this specific host.\n\nThis is especially helpful if you have problems with finding the reason why a specific check is not able to be executed. A common situation is that you can run a check as `root` or `icinga` user via shell but the Icinga daemon can't.\n\nThis configuration is not intended to be running all the time. Just copy it into to zone you want to debug and when you're finished, remove it from Icinga.\n\n## Currently supported systems ##\n\nThe script currently works on the following operating systems:\n\n* RHEL/CentOS/Oracle Linux/Scientific Linux\n* SLES (thanks, wnieder)\n* FreeBSD (thanks, @larsengels)\n* Debian (still some functionality is missing)\n\nThe script currently works with the following software components:\n\n* Icinga 2\n* Icinga Web 2\n\n## Planned supported systems ##\n\nThe script should work on all Operating systems supported by Icinga 2\n\nThe script should gather informations about the most common addons to Icinga 2 and collect data relevant to monitoring setups.\n\ne.g.\n\n* MariaDB/MySQL\n* PostgresSQL\n* Graphite\n* PNP4Nagios\n* InfluxDB\n* Elasticsearch\n* Logstash\n\n# Example output #\n\nThis is an abrreviated output from a run on a [Icinga 2 Vagrant box](https://github.com/Icinga/icinga-vagrant)\n\n    # ./icinga-diagnostics.sh \n    ### Icinga 2 Diagnostics ###\n    # Version: 0.0\n    # Run on icinga2 at Thu Jan 11 18:02:14 UTC 2018\n    \n    Running as root\n    \n    ## OS ##\n    \n    OS Version: CentOS Linux release 7.4.1708 (Core)\n    Hypervisor: Running virtually on a VirtualBox hypervisor\n    CPU cores: 2\n    RAM: 1.8G\n    SELinux: Permissive\n    Firewall: inactive\n    \n    # Icinga 2 #\n    \n    ## Packages: ##\n    \n    Icinga 2  Version     : 2.8.0.187.g025abc3\n    \n    Done checking packages. See Anomaly section if something odd was found.\n    \n    Features:\n    Disabled features: command compatlog elasticsearch gelf influxdb livestatus opentsdb perfdata statusdata syslog\n    Enabled features: api checker debuglog graphite ido-mysql mainlog notification\n    \n    Check intervals:\n         88   * check_interval = 300, Host\n          1   * check_interval = 60, Host\n        113   * check_interval = 60, Service\n         13   * check_interval = 30, Service\n          5   * check_interval = 5, Service\n          3   * check_interval = 300, Service\n    \n    Used commands (numbers are relative to each other, not showing configured objects):\n      28093 /etc/icinga2/scripts/mail-service-notification.sh\n      14120 /usr/lib64/nagios/plugins/check_mysql_health\n      10146 /usr/lib64/nagios/plugins/check_http\n       6428 /usr/lib64/nagios/plugins/check_ping\n       4396 /usr/lib64/nagios/plugins/check_load\n       3415 /usr/lib64/nagios/plugins/check_ssh\n       1758 /usr/lib64/nagios/plugins/check_dns\n       1758 /usr/lib64/nagios/plugins/check_disk\n        880 /usr/lib64/nagios/plugins/check_procs\n        879 /usr/lib64/nagios/plugins/check_users\n        879 /usr/lib64/nagios/plugins/check_swap\n        528 /usr/bin/icingacli\n    \n    information/cli: Icinga application loader (version: v2.8.0-187-g025abc3)\n    information/cli: Loading configuration file(s).\n    information/ConfigItem: Committing config item(s).\n    information/ApiListener: My API identity: icinga2\n    warning/globals.getHostGeoLocation: Cannot find 'be' in GeoLocationShort\n    warning/ApplyRule: Apply rule 'many-dummy' (in /etc/icinga2/demo/many.conf: 36:1-36:39) for type 'Notification' does not match anywhere!\n    warning/ApplyRule: Apply rule 'many-dummy' (in /etc/icinga2/demo/many.conf: 41:1-41:42) for type 'Notification' does not match anywhere!\n    warning/ApplyRule: Apply rule 'many-test-0' (in /etc/icinga2/demo/many.conf: 16:3-16:32) for type 'Service' does not match anywhere!\n    warning/ApplyRule: Apply rule 'many-test-1' (in /etc/icinga2/demo/many.conf: 16:3-16:32) for type 'Service' does not match anywhere!\n    warning/ApplyRule: Apply rule 'many-test-2' (in /etc/icinga2/demo/many.conf: 16:3-16:32) for type 'Service' does not match anywhere!\n    information/ConfigItem: Instantiated 1 ApiListener.\n    information/ConfigItem: Instantiated 3 Zones.\n    information/ConfigItem: Instantiated 1 Endpoint.\n    information/ConfigItem: Instantiated 4 ApiUsers.\n    information/ConfigItem: Instantiated 2 FileLoggers.\n    information/ConfigItem: Instantiated 28 Notifications.\n    information/ConfigItem: Instantiated 1 UserGroup.\n    information/ConfigItem: Instantiated 2 Users.\n    information/ConfigItem: Instantiated 203 CheckCommands.\n    information/ConfigItem: Instantiated 3 NotificationCommands.\n    information/ConfigItem: Instantiated 4 HostGroups.\n    information/ConfigItem: Instantiated 1 IcingaApplication.\n    information/ConfigItem: Instantiated 89 Hosts.\n    information/ConfigItem: Instantiated 3 TimePeriods.\n    information/ConfigItem: Instantiated 134 Services.\n    information/ConfigItem: Instantiated 3 ServiceGroups.\n    information/ConfigItem: Instantiated 1 CheckerComponent.\n    information/ConfigItem: Instantiated 1 GraphiteWriter.\n    information/ConfigItem: Instantiated 1 IdoMysqlConnection.\n    information/ConfigItem: Instantiated 1 NotificationComponent.\n    information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'\n    information/cli: Finished validating the configuration file(s).\n    \n    # Icinga Web 2 #\n    \n    \n    Packages:\n    icingaweb2-2.5.0.2.g890013c-0.2017.11.28+2.el7.icinga.noarch\n    package php is not installed\n    httpd-2.4.6-67.el7.centos.6.x86_64\n    \n    Icinga Web 2 Modules:\n    MODULE         VERSION   STATE     DESCRIPTION\n    businessprocess 2.1.0     enabled   A Business Process viewer and modeler\n    cube           1.0.1     enabled   Cube for Icinga Web 2\n    director       1.3.2     enabled   Director - Config tool for Icinga 2\n    doc            2.5.0     enabled   Documentation module\n    grafana        1.1.10    enabled   Grafana - A perfdata visualisation module\n    map            1.0.4     enabled   Map - Visualize your hosts and service status\n    monitoring     2.5.0     enabled   Icinga monitoring module\n    \n    businessprocess via git - \"00e2f1886a9b07244e8dad237776b629fad59c0a\"\n    cube via git - \"7ba3feb71601fd2433e0b787ea87dddf53878e49\"\n    director via git - \"c4a97692df23e428a2eb6f1be41a7c25ea7b19a4\"\n    doc via release archive/package\n    grafana via git - \"5ba8995a15fb4b1e72232e3dffd4b45c6bb89ab8\"\n    map via git - \"ec7fed3e4085f98f6f30f3557d85d5ed498e2a7d\"\n    monitoring via release archive/package\n    \n    Icinga Web 2 commandtransport configuration:\n    [icinga 2 api localhost]\n    transport = \"api\"\n    host = \"localhost\"\n    port = \"5665\"\n    username = \"icingaweb2\"\n    password = MASKED\n    \n    Director is release 1.3.2\n    Director was installed as a git clone\n    \n    # Anomalies found #\n    \n    * Director is installed but no release archive was used for installation. (Please note that it still could the code of a release)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficinga%2Ficinga2-diagnostics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficinga%2Ficinga2-diagnostics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficinga%2Ficinga2-diagnostics/lists"}