The http command is shown in Director with a different list of parameters than the one actually available. Does anyone know how to have the two in sync?
Thank you,
Jean
More details with the example of the “-U” (or “–show-url”) parameter.
It is available:
# /usr/lib64/nagios/plugins/check_http -h | grep -A 1 show-url
-U, --show-url
Print URL in msg output in plain text
#
However, it is not usable from Director, because the ITL does not list it:
# find /usr/share/icinga2/include/ -name "*.conf" -exec grep check_http {} \; -ls
command = [ PluginDir + "/check_http" ]
83658 96 -rw-r--r-- 1 root root 95691 Aug 14 15:40 /usr/share/icinga2/include/command-plugins.conf
#
# grep -i show /usr/share/icinga2/include/command-plugins.conf
description = "Show details for command-line debugging"
set_if = "$curl_show_body$"
vars.curl_show_body = false
value = "$load_procs_to_show$"
description = "Number of processes to show when printing the top consuming processes. (Default value is 0)"
value = "SHOWALL"
set_if = "$nscp_showall$"
vars.nscp_showall = false
description = "Show details for command-line debugging"
description = "Show verbose details"
description = "Show uptime in a pretty format (Running for x weeks, x days, ...)"
description = "Show last boot in yyyy-mm-dd HH:MM:SS format (output from 'uptime -s')"
#
The plugin and the ITL file are distributed via two separate packages, which I think causes the issue:
Oh would I be missing the latest version of /usr/share/icinga2/include/command-plugins.conf? Would you be so kind and give me the output of the following commands on your system?
ls -la /usr/share/icinga2/include/command-plugins.conf
grep -i show /usr/share/icinga2/include/command-plugins.conf
The Icinga Template Library links to the monitoring-plugins version of nagios-plugins. I dont want to explain the history of these two projects right now, its a long story. Looking at the Project page, there is no --show-url. Monitoring Plugins - check_http
Back in the days, there was nagios, and the plugins were called nagios-plugins.
Nagios Enterprises took the domain from the nagios-plugins team away, the nagios-plugins project renamed itself to monitoring-plugins. Nagios Enterprises forked monitoring-plugins and named their fork nagios-plugins.
monitoring-plugins is being packaged in the official debian/ubuntu repos and also packaged by NETWAYS for RHEL (in an outdated version, its on my/our To-Do-List to update it). I am not sure about SuSE.
Id say because its the “most official” kind of plugin package for RHEL.
Well, nagios-plugins-all doesnt include icinga-config Files, because its by Nagios.
I think its because check_curl is the more modern replacement for check_http, which only gets necessary Maintenance. You might want to open a PR or an Issue. Or @lorenz has an idea - but i am not sure whether he is still active here.
About your other, “real” questions:
I dont think Icinga supports nagios plugins or monitoring plugins, as both are not software made by icinga. But thats a thing @theFeu can answer better than me.
I dont think there is any, honestly. So you would have to write the CheckCommand Objects by yourself.
This is what we did already years ago, but it is just a workaround, as we still have an incorrect definition for “http” within the ITL.
Reading the above, I think that the way to organise plugins should be reviewed. Some ideas:
Have a base directory for plugins that stops using “nagios”, something like “/opt/icinga2/plugins” on RHEL
Have a similar base directory for plugin descriptions, like “/opt/icinga2/plugins-templates”
Within those base directories, organise plugins by providers, like “nagios-plugins”, “monitoring-plugins”, “linuxfabrik”, etc. So we would have:
– “/opt/icinga2/plugins/nagios-plugins/check_http” and
– “/opt/icinga2/plugins/monitoring-plugins/check_http”,
described respectively by
– “/opt/icinga2/plugins-templates/nagios-plugins/check_http.conf” and
– “/opt/icinga2/plugins-templates/monitoring-plugins/check_http.conf”
These files would then be deployed from packages containing both the plugins and the associated description.
A nice feature would be to be able to perform the deployment on the Configuration Master and then have options in the Director to decide on which server each plugin needs to be deployed, along with its description file. Or, more probably, where each description file needs to be deployed, along with the plugins it describes.
NB: The issues raised above by @bberg are very interesting, and I hope @theFeu and @lorenz will be able to provide answers.
Thank you all for your cooperation on this fundamental topic (fundamental for me at least )
anyone tried just dropping a tiny itl snippet for the missing -U flag into /etc or icinga2 or conf.d? I did that once for a custom arg and it showed up in Director instantly tbh it might be the quickest fix while waitting for package update