Variable for Config Name in Service Management?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
MonitorGuy
Posts: 46
Joined: Wed May 20, 2020 8:22 am

Variable for Config Name in Service Management?

Post by MonitorGuy »

Looking for a way to use a variable for "Config Name" on Service Management "Common Settings" tab, since it's a mandatory field.

If we have multiple "Manage Hosts" selected, is it possible to list the shared service for all those hosts, and generate alerts based on the "Managed Host" instead of a static Config Name?

I've searched, and done some testing, but haven't found a way yet... sorry if this is already documented somewhere?

Thanks,

Craig
<<MonitorGuy>>
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Variable for Config Name in Service Management?

Post by lmiltchev »

I am trying to understand what exactly you are trying to accomplish. The "config name" directive is something that is strictly used in the CCM. It doesn't exist in the actual config file.
Service - config name

This directive is used to specify a common config name for a group of service definitions. This is a NagiosQL parameter and it will not be written to the configuration file. Every service definitions with the same configuration name will stored in one file. The configuration name is also the file name of this configuration set.
Having said that, Nagios XI is a very flexible product, and you could do various things many different ways. Are you trying to monitor just hosts' (make sure they are UP, e.g. via PING) or you are trying to monitor some specific metrics on a number of hosts?

In any case, you could add all of the hosts of interest into a hostgroup, then add a service to it. This will add the service automatically to all hosts, that are members of your hostgroup.

Better yet, as you add new members to the hostgroup, the service will be automatically added to them.

For example, you can set up a group, named "Windows Servers", and add a "Ping" service to the group. This way, you could monitor all of the hosts that are in the "Windows Servers" host group.

See more on the topic here:

https://support.nagios.com/kb/article/n ... s-507.html

Is this what you were looking to accomplish?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
MonitorGuy
Posts: 46
Joined: Wed May 20, 2020 8:22 am

Re: Variable for Config Name in Service Management?

Post by MonitorGuy »

Sorry I wasn't clear, this is a Service monitoring question...

Since the "Config name" field is mandatory, if you don't have a service configured for each host, then you don't see them when searching by hostname under services.

My request is that a variable could be used in the Config name field that's linked to the "Managed Hosts", allowing you to have one service configured yet linked to multiple hosts.

I've not had good luck with linking services to groups, since the alerts had the static Config name, while the event happened on a different host, which is not good.

I'll do more testing, but my recommended solution should be given some merit.

Thanks,

Craig
<<MonitorGuy>>
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Variable for Config Name in Service Management?

Post by lmiltchev »

Oh, I see. Well, currently on the Services page, you can only search by config name or service description. I filed an internal feature request for adding an option to search by hostname too.

Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.

Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked