newbi quations about hosts and servics

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.

newbi quations about hosts and servics

Postby grafix143 » Sat Feb 10, 2018 11:51 pm

I am very new to Nagios , anyway I have it pre-installed i need to modify it a bit

I watched the self paced learning video but i still failed to carry out the task so i need help.

In the web interface under services in Nagios I have 4 number hosts to be checked which are printers they are not in use so i decided to remove them .

In nagios>congif folder there are two files which i found related to the printers

1- hostgroups.cfg

define hostroups {
hostgroup_name Printers
alias CUPS printers
members rlprt01,rlprt20,rlprt70,rlprt80
}

2. service_distants.cfg
define service {
hostgroup_name Printers
services_description CHK - Print spooler
check_command check_lpqueue
use generic-service
notification_interval 0
}



so what I did is removing the

define hostroups {
hostgroup_name Printers
alias CUPS printers
members rlprt01,rlprt20,rlprt70,rlprt80
}

from the hostgroups,cfg then i used the command to restart nagios (service nagios restart) but i got an error which is

Configuration validation failed

Any suggestion how to make this works . i need to remove the printers check

screen shots attached
Attachments
services_distants.zip
(31.88 KiB) Downloaded 4 times
grafix143
 
Posts: 4
Joined: Thu Feb 08, 2018 4:38 am

Re: newbi quations about hosts and servics

Postby lmiltchev » Mon Feb 12, 2018 3:03 pm

so what I did is removing the

define hostroups {
hostgroup_name Printers
alias CUPS printers
members rlprt01,rlprt20,rlprt70,rlprt80
}

from the hostgroups,cfg then i used the command to restart nagios (service nagios restart) but i got an error which is

Configuration validation failed

Did you remove the entire hostgroup (Printers) or just the two members (hosts) that you wanted to remove? Which host the "CHK307 - Print spooler" service is attached to? The service is added to the "Printers" hostgroup, so it would show up under each host, member of this group, unless you remove the host from the "Printers" hostgroup.

What is the exact error that you see when you verify the configuration?

Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg


Note: If the path to the nagios binary or the main config file is different, please modify the above command accordingly.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 9775
Joined: Mon May 23, 2011 12:15 pm


Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 32 guests