Delete Service

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.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Delete Service

Post 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?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Delete Service

Post by tmcdonald »

And this is in XI? Did you not delete them from the CCM?
Former Nagios employee
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Delete Service

Post 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.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Delete Service

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Delete Service

Post 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
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Delete Service

Post 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
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Delete Service

Post 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?
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Delete Service

Post 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.
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Delete Service

Post 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.
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Delete Service

Post 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
Charles Masteller
Information Systems Specialist
Hawaii Health Systems Corp.
"No one will ever need more than 640K RAM". Bill Gates
Locked