Mismatch between ITL definition of check_http and the actual check_http parameters

Hello,

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:

# rpm -qf /usr/lib64/nagios/plugins/check_http
nagios-plugins-http-2.5-2.el9.x86_64
#
# rpm -qf /usr/share/icinga2/include/command-plugins.conf
icinga2-common-2.15.6-1.el9.x86_64
#

Is there a package that would distribute the ITL definition of the nagios-plugins-all plugins in their latest version?

you need to rerun director kickstarter to sync itl command definitions.
definition updates come with icinga2 updates.

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

Thank you,
Jean

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

If I understand correctly, there are (at least) 2 versions of check_http:

  • the one from monitoring-plugins
  • the one from nagios-plugins-all

The ITL distributed with the icinga2 package relates to the monitoring-plugins version of check_http.

Now, what escapes me is:

  • why is nagios-plugins-all packaged for RHEL and monitoring-plugins is not
  • why is nagios-plugins-all documented to be installed: RHEL - Icinga 2
  • why doesn’t the nagios-plugins-all package come with the proper templates distributed with the icinga2 ITL package
  • why is check_http marked deprecated in Monitoring Plugins - check_http, replaced by Monitoring Plugins - check_curl, which by the way does not include the --show-url option so dear to my users

This being said, the real questions that remain for me are:

  1. Does Icinga support the packaged nagios-plugins-all as seems to be implied by the documentation?
  2. Where can I find an up-to-date ITL for the packaged nagios-plugins-all?

Thank you,
Jean

So, let me explain the history a bit.

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.

  1. Id say because its the “most official” kind of plugin package for RHEL.
  2. Well, nagios-plugins-all doesnt include icinga-config Files, because its by Nagios.
  3. 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:

  1. 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.
  2. I dont think there is any, honestly. So you would have to write the CheckCommand Objects by yourself.

Regards,

Björn

To have the Icinga command reflect the available parameters of the Nagios plugin the easiest way is to:

  • create a new check command, e.g. “http-by-nagios”
  • import the existing http command from the ITL
    • that way you don’t have to define every argument paramter yourself
  • add the -U / --show-url paramter

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 :slight_smile: )

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

Thank you for the suggestion! I tried but it failed.

I just added a file with the following content:

object CheckCommand "http" {
    arguments += {
        "(no key.2)" = {
              set_if = "$http_showurl$"
              skip_key = true
              value = "--show-url"
        }
    }
}

Hoping that the += construct would just add to the argument list found in the ITL file.

Unfortunately this results in error:

# cat /etc/icinga2/local.d/plugin-templates/check_http.conf
object CheckCommand "http" {
        arguments += {
        "(no key.2)" = {
                set_if = "$http_showurl$"
                skip_key = true
                value = "--show-url"
                }
        }
}
#
# icinga2 daemon -C
[2026-11-20 12:14:00 +0100] information/cli: Icinga application loader (version: r2.16.3-1)
[2026-11-20 12:14:00 +0100] information/cli: Loading configuration file(s).
[2026-11-20 12:14:00 +0100] critical/config: Error: Object 'http' of type 'CheckCommand' re-defined: in /etc/icinga2/local.d/plugin-templates/check_http.conf: 1:0-1:25; previous definition: in /usr/share/icinga2/include/command-plugins.conf: 381:1-381:26
Location: in /etc/icinga2/local.d/plugin-templates/check_http.conf: 1:0-1:25
/etc/icinga2/local.d/plugin-templates/check_http.conf(1): object CheckCommand "http" {
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/local.d/plugin-templates/check_http.conf(2):  arguments += {
/etc/icinga2/local.d/plugin-templates/check_http.conf(3):  "(no key.2)" = {
[2026-11-20 12:14:00 +0100] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.
#

What “tiny itl snippet for the missing -U flag” did you have in mind, @wesley_ford ?

you need to define a new command with a different name and inherit the old http command after that you can use the +=

Thank you Nick, this makes the duplication less painful, but does not solve the discrepancy issue outlined in my original post.