Page 1 of 2

Delete Service

Posted: Mon Apr 21, 2014 8:40 pm
by toleolu
This question is on our old Nagios system, if I need to repost in the regular forum, no problem.

Just real quick, we removed McAfee AV software from our servers and I am trying to remove the mcshield check on those servers in our old system. I deleted every instance of Anti Virus in the services.cfg file, uploaded that file to the server, verify went OK, reload went OK, I even restarted the server, but all the AV checks still show up under service details.

Do I need to deleted the command as well?

Re: Delete Service

Posted: Tue Apr 22, 2014 8:58 am
by tmcdonald
And this is in XI? Did you not delete them from the CCM?

Re: Delete Service

Posted: Tue Apr 22, 2014 12:28 pm
by toleolu
No like I said, this is from our old system, that's why I asked about posting in the general forum.

I removed all instances of Anti Virus from the services.cfg file then copied that file to the nagios working directory on the old nagios server. I didn't change anything in the host.cfg or the hostgroup.cfg file thinking that wasn't necessary.

Anyway, even with the anti virus checks removed from the services.cfg file, the AV checks are still showing up under Services Details. Just wondering what else I need to do to get those checks removed.

Re: Delete Service

Posted: Tue Apr 22, 2014 1:29 pm
by lmiltchev
You cannot remove a service in Nagios XI by simply modifying the config file manually from the CLI. The config info is still in the database. You need to remove the service via the Core Config Manager, save the changes, and Apply Configuration.

Re: Delete Service

Posted: Wed Apr 23, 2014 12:07 pm
by toleolu
OK, once again, this is our OLD nagios system, version 1. something, this is not our Nagios XI, that's why I asked if I should be posting in the general forum, thought I could just get a quick answer here.

Anyway on our OLD nagios 1. something or another, to remove a service, what else do I need to do besides deleting those entries from the services.cfg file.

If this isn't the right place for this post, I'll repost in the general forum.

THanks

Re: Delete Service

Posted: Wed Apr 23, 2014 12:14 pm
by slansing
Hi Charles, I'm moving this to the general core support section, all you should have to do is remove the services from their config files, then verify your configs, if there are errors you will need to fix those:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Re: Delete Service

Posted: Wed Apr 23, 2014 12:57 pm
by toleolu
Thanks Steve, I did what you said, made the necessary deletions in services.cfg copied that file to the working nagios directory, ran the verify with no errors, but the services are still showing up.

I wonder if I copied the file to the wrong directory? How do I confirm the correct working directory for the old Nagios?

Re: Delete Service

Posted: Wed Apr 23, 2014 1:12 pm
by toleolu
/usr/local/nagios/etc/services.cfg has all the av service checks removed, so I got the updated file to the right directory. But I still see the failed checks on the service details screen. Could this be some browser or web server issue. This is weird, never had this problem updating config files on the old system before.

Re: Delete Service

Posted: Wed Apr 23, 2014 1:16 pm
by slansing
You are restarting naigos after making the changes correct? If not it's still going to pull the old status information for display on the CGI's.

Re: Delete Service

Posted: Wed Apr 23, 2014 1:35 pm
by toleolu
Yes I did the reload, even restarted the server, still have those services on there.

No worries, I'll play around with it a bit more, we're going to shut the old system down in a couple of weeks anyway, just thought my Nagios guru's would have a quick resolution to my latest faux pau.

Mahalo