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
Variable for Config Name in Service Management?
- MonitorGuy
- Posts: 46
- Joined: Wed May 20, 2020 8:22 am
Variable for Config Name in Service Management?
<<MonitorGuy>>
Re: Variable for Config Name in Service Management?
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.
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?
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?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.
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!
- MonitorGuy
- Posts: 46
- Joined: Wed May 20, 2020 8:22 am
Re: Variable for Config Name in Service Management?
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
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>>
Re: Variable for Config Name in Service Management?
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!
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!