Page 1 of 1

Changing The Name of a Monitored Service

Posted: Tue May 12, 2015 1:56 pm
by krichie
Recently, an application upgrade changed the name of a monitored service, which is now no being seen as critical/not found. Once we correct the name of the service, the monitoring will be restored.

When viewing the path of the service from the web interface, it's showing as:
/usr/lib/nagios/plugins/check_nt -H 'ipaddress' -p 12489 -v SERVICESTATE -d SHOWALL -l "Lotus Domino Diagnostics (CDomino)"

It needs to be changed to:
/usr/lib/nagios/plugins/check_nt -H 'ipaddress' -p 12489 -v SERVICESTATE -d SHOWALL -l "IBM Domino Diagnostics (CDomino)"

Lotus needs to be changed to IBM.

When I navigate this path (ubuntu server) and vi the check_nt file, I see a bunch of characters and I am concerned I am addressing this incorrectly. Could someone advise how to properly make this change?

Thank you very much for your time and help!

Re: Changing The Name of a Monitored Service

Posted: Tue May 12, 2015 2:34 pm
by jdalrymple
This is handled in where the service definition is located. On a default nagios install this is generally under /usr/local/nagios/etc somewhere - but it can be in different spots depending on your configuration. If you can't find the service definition for that service then run "ps -ef | grep nagios.cfg" at the command line to help identify where the nagios.cfg is, then you can send us the contents of that and we'll help you track down where your service definition is.

Re: Changing The Name of a Monitored Service

Posted: Wed May 13, 2015 11:32 am
by krichie
Hi jdalrymple!

I am so sorry for my delayed response and greatly appreciate the information you provided. I investigated further and believe I found the correct configuration file to modify. However, I know this won't reflect the change until I either reboot the nagios server or atleast restart the service. I found a "cache" file and I believe that will need to be cleared for it to reflect the change, correct? If so, can you tell me how to restart the service?

Thank you for your additional help!

krichie

Re: Changing The Name of a Monitored Service

Posted: Wed May 13, 2015 11:36 am
by krichie
Thank you very much jdalrymple!! Based on the information you provided, I believe I located the configuration file to make my change. I have now made the necessary changes, but I believe I now need to either restart the nagios server or perform a restart on the nagios service for the changes to be reflected in the web interface. Is this correct? If so, could you tell me how to restart the service properly?

Thank you very much for your time and help . . .it has been a tremendous help to me!!!

Re: Changing The Name of a Monitored Service

Posted: Wed May 13, 2015 1:43 pm
by jdalrymple
Most Linux systems have a service component that makes restarting services trivial, something like:

Code: Select all

service nagios restart
If that doesn't work you can simply kill the nagios daemon and restart it:

Code: Select all

[root@localhost jdalrymple]# ps -ef | grep nagios.cfg
nagios    42283      1  0 May07 ?        00:01:58 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios    42293  42283  0 May07 ?        00:00:19 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     112483 112436  0 08:13 pts/0    00:00:00 grep nagios.cfg
[root@localhost jdalrymple]# kill 42283
[root@localhost jdalrymple]# ps -ef | grep nagios.cfg
root     112565 112436  0 08:13 pts/0    00:00:00 grep nagios.cfg
[root@localhost jdalrymple]# /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
[root@localhost jdalrymple]# ps -ef | grep nagios.cfg
nagios   112572      1  0 08:13 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   112581 112572  0 08:13 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
root     112584 112436  0 08:13 pts/0    00:00:00 grep nagios.cfg

Re: Changing The Name of a Monitored Service

Posted: Wed May 13, 2015 3:35 pm
by krichie
I have made the necessary changes and the everything is back to normal.

Thank you so much for all of your time and help!!

Kind Regards,
krichie

Re: Changing The Name of a Monitored Service

Posted: Wed May 13, 2015 4:03 pm
by jdalrymple
Happy to help krichie and welcome to the forums. Don't hesitate to reach out again in the future for more help.

I'm going to go ahead and lock this topic and mark it solved.

Have a great day!