[Fixed]Change "down" status
[Fixed]Change "down" status
Hi guys,
I'm having the following problem with the monitoring nagios. As you can see from the picture, I have two hosts: Indra and Xarta under monitoring but in reality they are the hosts to be monitored and therefore the gaming me reports them in a state of "down" but are under a node level or levels Vmware51 intermediate. Therefore I wanted to ask if it is possible to eliminate the state of "down" from the hosts and Indra Xarta.
Thank you,
Andrea
I'm having the following problem with the monitoring nagios. As you can see from the picture, I have two hosts: Indra and Xarta under monitoring but in reality they are the hosts to be monitored and therefore the gaming me reports them in a state of "down" but are under a node level or levels Vmware51 intermediate. Therefore I wanted to ask if it is possible to eliminate the state of "down" from the hosts and Indra Xarta.
Thank you,
Andrea
Last edited by aruggeri on Tue Nov 03, 2015 5:19 am, edited 1 time in total.
-
DiegoAnjos
- Posts: 49
- Joined: Thu Feb 14, 2013 9:32 am
Re: Change "down" status
You can create a template that does not contain the line check_command check-host-alive:
Include this lines on templates.cfg:
I know that some lines above are useless to this template, but Nagios will return errors if you remove them.
Host definition:
The hosts using the generic-dead-host template will be shown as PENDING and will never be checked.
For further details, read the article where I got this solution: http://sourceforge.net/p/nagios/mailman ... /17918052/
Regards
Include this lines on templates.cfg:
Code: Select all
define host{
name generic-dead-host
use generic-host
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
notification_period 24x7
notification_interval 1440
notification_options d,r
contact_groups admins
register 0
}Host definition:
Code: Select all
define host{
use generic-dead-host
host_name XXXXX
alias XXXX
address X.X.X.X
hostgroups xxxx
parents XXXX
notes_url http://X.X.X.X
icon_image_alt XXXX
icon_image webcamera.png
statusmap_image webcamera.png
retain_status_information 0
}For further details, read the article where I got this solution: http://sourceforge.net/p/nagios/mailman ... /17918052/
Regards
Re: Change "down" status
Former Nagios Employee.
me.
me.
Re: Change "down" status
Good morning guys,
with the answers that you gave me.
I made the modifications described above, but the system is still not working.
I post as I defined my host:
While within files hostgroups nagios 2.cfg I did the following:
for eliminating from the monitoring of the commands (in this case the I excluded only from the check table as it is a command used on all hosts):
with the answers that you gave me.
I made the modifications described above, but the system is still not working.
I post as I defined my host:
Code: Select all
# A host definition for the gateway of the default route
define host {
host_name Indra
use generic-host
parents vmware51
}
define hostextinfo {
host_name Indra
icon_image cook/img.png
statusmap image cook/img.png
}
for eliminating from the monitoring of the commands (in this case the I excluded only from the check table as it is a command used on all hosts):
Code: Select all
# Nagios does not like monitoring hosts without services, so this is
# A group for devices That have no other "services" monitorable
# (Like routers w / out snmp for example)
define hostgroup {
hostgroup_name ping-servers
alias pingable servers
members *,! Indra! Xarta,! MGMT
}
-
DiegoAnjos
- Posts: 49
- Joined: Thu Feb 14, 2013 9:32 am
Re: Change "down" status
arruegi,
I see that you are still using the generic-host template for Indra
define host {
host_name Indra
use generic-host
parents vmware51
}
You need to use the template that does not contain the command check-host-alive.
Could you post the files templates.cfg and hosts files?
I see that you are still using the generic-host template for Indra
define host {
host_name Indra
use generic-host
parents vmware51
}
You need to use the template that does not contain the command check-host-alive.
Could you post the files templates.cfg and hosts files?
Re: Change "down" status
Former Nagios Employee.
me.
me.
Re: Change "down" status
Good morning guys,
as always, thank you the help that you are giving me.
Unfortunately they are just starting out with the Nagios system and of the time I still have difficulties in the administration of the total system.
Then I as a configuration file using the following:
/etc/nagios3/conf.d/indra.cfg
and its content is as follows:
For "template.cfg" What do you mean?
Greetings,
Andrea
as always, thank you the help that you are giving me.
Unfortunately they are just starting out with the Nagios system and of the time I still have difficulties in the administration of the total system.
Then I as a configuration file using the following:
/etc/nagios3/conf.d/indra.cfg
and its content is as follows:
Code: Select all
# A host definition for the gateway of the default route
define host {
host_name Indra
use generic-host
parents vmware51
}
define hostextinfo {
host_name Indra
icon_image cook/clienti.png
statusmap_image cook/clienti.png
}
Greetings,
Andrea
Re: Change "down" status
Nagios comes pre-shipped with a configuration file called "template.cfg" in the same directory as all your other config files. He's asking for that.
Also, rather than not have a check_command and have hosts show pending, I recommend using the check_dummy command, which will simply return whatever state you give it without actually doing anything. In essence, your check_command becomes "check_dummy 0" if you always want the hosts to show as OK.
Also, rather than not have a check_command and have hosts show pending, I recommend using the check_dummy command, which will simply return whatever state you give it without actually doing anything. In essence, your check_command becomes "check_dummy 0" if you always want the hosts to show as OK.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Change "down" status
Unfortunately guys inside my directory:
/etc/nagios3/conf.d/ I not have the file called "template.cfg"
Below you will find the contents of that directory tree:
I hope that the information that I am giving are sufficient to explain the type of problem encountered.
Greetings,
Andrea.
/etc/nagios3/conf.d/ I not have the file called "template.cfg"
Below you will find the contents of that directory tree:
Code: Select all
root@nagios51:~# ls /etc/nagios3/conf.d
backup51.cfg indrabe01coll.cfg services_nagios2.cfg
contacts_nagios2.cfg indrabe01ese.cfg services_nagios2.cfg~
contacts_nagios2.cfg~ indra.cfg services_nagios2.cfgu
demobe.cfg indrafe01coll.cfg spappbe02ese.cfg
demofe.cfg indrafe01ese.cfg spappfe02ese.cfg
dns51.cfg localhost_nagios2.cfg switch51.cfg
extinfo_nagios2.cfg log51.cfg testbe.cfg
ferservizibe01coll.cfg mgmt.cfg testfe.cfg
ferservizife01coll.cfg mon01.cfg timeperiods_nagios2.cfg
fw02.cfg mon02.cfg vmware51.cfg
fw03.cfg nagios52.cfg vmware53.cfg
fw04.cfg nas41.cfg xartabe01coll.cfg
gateway.cfg nas51.cfg xartabe01ese.cfg
generic-host_nagios2.cfg ricettebe01coll.cfg xarta.cfg
generic-service_nagios2.cfg ricettefe01coll.cfg xartafe01coll.cfg
hostgroups_nagios2.cfg sens01.cfg xartafe01ese.cfg
hostgroups_nagios2.cfg~ sens02.cfg
Greetings,
Andrea.
Re: Change "down" status
It will likely be in the generic-host_nagios2.cfg file. You can type "grep generic-host *" to find out which file your generic-host template is in. That's likely the one that needs to be updated.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!