Uptime warnings
Uptime warnings
I keep getting "uptime state=warning" notifications and then about 20 mins later receive "uptime state=OK" but there was never any reboot/shutdown of the system specified. My guess is that it just normal network latency. Is there any way to tweak uptime thresholds so that it's not so quick to tell me a system is down when it's actually not?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Uptime warnings
This would typically be done either by tweaking your check thresholds "warning / critical" or by bumping out your max_check_attempts directive for your hosts/services:
http://nagios.sourceforge.net/docs/3_0/ ... tions.htmlmax_check_attempts: This directive is used to define the number of times that Nagios will retry the service check command if it returns any state other than an OK state. Setting this value to 1 will cause Nagios to generate an alert without retrying the service check again.
Re: Uptime warnings
This is what the uptime service definition entry looks like:
define service{
use host-service
hostgroup_name network-servers, branch-servers
service_description Uptime
check_command check_nt!UPTIME
servicegroups uptime-services
}
Currently there are no numbers or thresholds specified for anything in this entry. From that link, it says the ones in red are required but a few of those aren't in the entry. How is it even working in the first place? Just an FYI I'm inheriting this system from a previous administrator that left without giving much training.
define service{
use host-service
hostgroup_name network-servers, branch-servers
service_description Uptime
check_command check_nt!UPTIME
servicegroups uptime-services
}
Currently there are no numbers or thresholds specified for anything in this entry. From that link, it says the ones in red are required but a few of those aren't in the entry. How is it even working in the first place? Just an FYI I'm inheriting this system from a previous administrator that left without giving much training.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Uptime warnings
What do you have defined in the "host-service" service template?
Re: Uptime warnings
Where exactly would that be? Because I'm not seeing any template definition for a "host-service" in the Windows.cfg file.
Re: Uptime warnings
Assuming a CentOS/RHEL distribution:
Code: Select all
grep -r -C 10 "host-service" /usr/local/nagios/etc/Former Nagios employee
Re: Uptime warnings
All results are coming from the windows.cfg file but nothing to do with "host-service". Could there just not be any entry for it? And by the way I'm running Ubuntu.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Uptime warnings
You will have to define a host for your service, like so:
http://nagios.sourceforge.net/docs/3_0/ ... ml#service
Do you have a host for this windows service set up?
http://nagios.sourceforge.net/docs/3_0/ ... ml#service
Do you have a host for this windows service set up?
Re: Uptime warnings
When you say host, do you mean a computer that I want to use this uptime monitor on? If so, then yes I have many hosts for this.
Re: Uptime warnings
I believe slansing wanted to point our that nagios needs to know which host this service belongs to. You will have to have a service definition like this one:
http://nagios.sourceforge.net/docs/3_0/ ... ml#service
See again this link (entries in red a mandatory):define service{
host_name <put the name of the host here>
use host-service
hostgroup_name network-servers, branch-servers
service_description Uptime
check_command check_nt!UPTIME
servicegroups uptime-services
}
http://nagios.sourceforge.net/docs/3_0/ ... ml#service
Be sure to check out our Knowledgebase for helpful articles and solutions!