WARNING: Extinfo objects are deprecated

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

WARNING: Extinfo objects are deprecated

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: WARNING: Extinfo objects are deprecated

Post 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.
Former Nagios Employee
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: WARNING: Extinfo objects are deprecated

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: WARNING: Extinfo objects are deprecated

Post 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.
Former Nagios employee
Locked