Page 1 of 1

WARNING: Extinfo objects are deprecated

Posted: Thu Nov 03, 2016 7:45 am
by amprantino
Hello all,

when verifying the configuration I get the following error:
WARNING: Extinfo objects are deprecated and will be removed in future versions

According to the documentation:
Tip: As of Nagios Core 3, all directives contained in extended host information definitions are also available in host definitions. As of Nagios Core 4, the hostextinfo object is deprecated and will be removed in a future version of Nagios Core.

So I have to move all hostextinfo options inside the host definition.
Is there any other "legitimate" way to define hostextinfo that will affect multiple hosts?


Thank you

Re: WARNING: Extinfo objects are deprecated

Posted: Thu Nov 03, 2016 10:12 am
by rkennedy
What exactly are you looking to accomplish? You could define custom fields in your host / service definitions to pass accordingly to your application(s).

Even though the function has been depracated, I spoke with our developers, and as of now hostextinfo still works on Nagios 4. I don't know when it will be fully removed.

Re: WARNING: Extinfo objects are deprecated

Posted: Fri Nov 04, 2016 7:43 am
by amprantino
I don't want to create a custom field.
An example of what I am trying to achieve:

I would like to apply a common icon_image or an action_url to all switches:

Code: Select all

define hostextinfo{
        name                    generic-switch
        register                0
        action_url      telnet://$HOSTADDRESS$
        icon_image_alt          Switch
        icon_image              switch.png
        vrml_image              switch.png
        gd2_image               switch.gd2
        statusmap_image         switch.gd2
}
I prefer to do it globally instead of doing it on each server.

However, if this option is going to be removed I have to change my configuration

Re: WARNING: Extinfo objects are deprecated

Posted: Fri Nov 04, 2016 10:10 am
by tmcdonald
This would be a great example of what templates are good for. You would create a base template which defines your icon_image and action_url and then any hosts which need those options would use that template.

You can read more about templates here: https://assets.nagios.com/downloads/nag ... tance.html

Also, I will be moving this out of Nagios Core Development and into Nagios Core since it is not discussing patches, roadmaps, etc.