Need some help for removing hosts in Nagios Core

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Need some help for removing hosts in Nagios Core

Postby sandeep027 » Tue May 08, 2018 2:19 am

Hi All,

I am new to nagios and I need some help for removing hosts in Nagios core.

I am using nagios core monitoring tool and we are going to decommissioning the few servers.

so i need to remove those servers from nagios monitoring tool.

could you please help on this.

Regards,
Sandeep.
sandeep027
 
Posts: 6
Joined: Tue May 08, 2018 2:12 am

Re: Need some help for removing hosts in Nagios Core

Postby tmcdonald » Tue May 08, 2018 10:07 am

What specifically do you need help with? Removing hosts and services in Core is as simple as editing or deleting the config files they reside in.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Operations Engineer
 
Posts: 9114
Joined: Mon Sep 23, 2013 8:40 am

Re: Need some help for removing hosts in Nagios Core

Postby sandeep027 » Wed May 09, 2018 1:46 am

Thank you for responding donald. I want to remove the 2 hosts and services from nagios.

i have tried to commented out in nrpe.cfg files, but its not working and i thought that this is not the right way .

can you please help on that ,where i have to delete that config files.
sandeep027
 
Posts: 6
Joined: Tue May 08, 2018 2:12 am

Re: Need some help for removing hosts in Nagios Core

Postby tmcdonald » Wed May 09, 2018 11:28 am

You need to remove them from the nagios-specific config files, not the nrpe-specific config files. I can't tell you what they are named because I did not set up your system, but whoever set the system up should be able to point you in the right direction. Usually they are in /usr/local/nagios/etc/ or /etc/nagios/.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Operations Engineer
 
Posts: 9114
Joined: Mon Sep 23, 2013 8:40 am

Re: Need some help for removing hosts in Nagios Core

Postby sandeep027 » Thu May 10, 2018 2:26 am

@Donald, for us there is no nagios folders under /usr/local or /etc/

Actually we have one physical server is there and all the hosts are configured in this server. so on this serer when i executed the command
ps -ef | grep -i nagios its showing as below

/tool/nagios/bin/nagios -d /tool/nagios/etc/nagios.cfg
/tool/nagios/bin/nagios --worker /tool/nagios/var/rw/nagios.qh
/tool/nagiosNRPE/bin/nrpe -d -c /tool/nagiosNRPE/etc/nrpe.cfg

my requirement is , I want to remove few hosts in Nagios, for example A and B hosts i want to remove, when i excuted the same command(ps -ef | grep -i nagios ) in A host and B host its showing as below

/data/nagiosNRPE/bin/nrpe -d -c /data/nagiosNRPE/etc/nrpe.cfg

so when i checked in under this /tool/nagios/bin/nagios -d /tool/nagios/etc/nagios.cfg path , i didn't find where i have to remove these hosts.

can you please help on this.

and i found two files under /var/ directory in nagios like objects.cache and objects.precache, in that i am able to see "define service" command for all the hosts. i think this is the right path to remove, but here two files are there. in that two files where i have remove ?
sandeep027
 
Posts: 6
Joined: Tue May 08, 2018 2:12 am

Re: Need some help for removing hosts in Nagios Core

Postby mcapra » Thu May 10, 2018 8:22 am

sandeep027 wrote:and i found two files under /var/ directory in nagios like objects.cache and objects.precache, in that i am able to see "define service" command for all the hosts. i think this is the right path to remove


Nope. Those are just caches of the object definitions as indicated by their names.

You'll need to take a look in this file (please attach a copy of it as well):
Code: Select all
/tool/nagios/etc/nagios.cfg


That file should contain one or more cfg_file or cfg_dir directives in it. Those are where Nagios loads it's object definitions (hosts, services, contacts, etc) from. You'll need to search through them to find the specific hosts you want to remove. Since no one here wrote those configuration files, it's difficult to tell you specifically where a given host is located in your configuration set.
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3313
Joined: Thu May 05, 2016 3:54 pm

Re: Need some help for removing hosts in Nagios Core

Postby tmcdonald » Thu May 10, 2018 4:07 pm

Thanks for the assist, @mcapra!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Operations Engineer
 
Posts: 9114
Joined: Mon Sep 23, 2013 8:40 am

Re: Need some help for removing hosts in Nagios Core

Postby sandeep027 » Fri May 11, 2018 3:59 am

Thank a lot mcapra and Donald.

i have seen some files under /tool/nagios/etc/nagios.cfg as below, i need to check these all files where i have to remove. here the thing is the guy left the company who configured all these things before i joined in this account. now i have to check the below files that which one is working correctly .

Thanks for your help. Really apprecaite

localhost.cfg_working
localhost.cfg_work_now
localhost.cfg_1
localhost.cfg_2
localhost.cfg_oct3-2016
localhost.cfg_aug8-17_working.cfg
commands.cfg_working
templates.cfg
contacts.cfg
sandeep027
 
Posts: 6
Joined: Tue May 08, 2018 2:12 am

Re: Need some help for removing hosts in Nagios Core

Postby tmcdonald » Fri May 11, 2018 3:21 pm

You will probably want to read the Nagios Core documentation if you are going to take over this system: https://assets.nagios.com/downloads/nag ... n/toc.html

Specifically, these three sections should get you most of what you need to know in order to update your configuration:

https://assets.nagios.com/downloads/nag ... onfig.html
https://assets.nagios.com/downloads/nag ... bject.html
https://assets.nagios.com/downloads/nag ... gmain.html

Give those a read, and it should all make sense. If it does not, please let us know specifically what doesn't and we'll see what we can do.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tmcdonald
Operations Engineer
 
Posts: 9114
Joined: Mon Sep 23, 2013 8:40 am

Re: Need some help for removing hosts in Nagios Core

Postby sandeep027 » Mon May 14, 2018 2:13 am

Thank you @donald, i will go through those links and will get back to you if any clarifications needed.
sandeep027
 
Posts: 6
Joined: Tue May 08, 2018 2:12 am

Next

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 12 guests