Ubuntu 12.04 LTS and Nagios
Posted: Tue Aug 06, 2013 3:26 pm
Hi Guys, this is my first post on the forum, I hope I make this post in the correct section.
I have installed Nagios on my Ubuntu server.
Nagios is running, Apache also is running.
When I want to monitor a website of mine Nagios says:
Host State Information
Host Status: DOWN
(for 0d 0h 30m 44s)
Status Information: PING CRITICAL - Packet loss = 100%
Performance Data: rta=5000.000000ms;5000.000000;5000.000000;0.000000 pl=100%;100;100;0
Current Attempt: 1/10 (HARD state)
Last Check Time: 2013-08-06 19:45:21
Check Type: ACTIVE
Check Latency / Duration: 0.000 / 10.018 seconds
Next Scheduled Active Check: 2013-08-06 19:50:31
Last State Change: 2013-08-06 19:19:31
Last Notification: 2013-08-06 19:19:31 (notification 1)
Is This Host Flapping? NO
(4.01% state change)
In Scheduled Downtime? NO
Last Update: 2013-08-06 19:50:11 ( 0d 0h 0m 4s ago)
Active Checks: ENABLED
Passive Checks: ENABLED
Obsessing: ENABLED
Notifications: ENABLED
Event Handler: ENABLED
Flap Detection: ENABLE
The site is up and running, it does the same for other sites, including Google.com
When I enter the check_http command, Ubuntu states that the command is not found.
LS from plugins folder:
root@h2200554:/etc/nagios3/conf.d# ls
contacts_nagios2.cfg generic-service_nagios2.cfg services_nagios2.cfg
extinfo_nagios2.cfg hostgroups_nagios2.cfg test-google.cfg
generic-host_nagios2.cfg localhost_nagios2.cfg timeperiods_nagios2.cfg
Cat from test-google.cfg
root@h2200554:/etc/nagios3/conf.d# cat test-google.cfg
define host{
use generic-host
host_name google
alias google
address google.com
}
define service{
use generic-service
host_name google
service_description HTTP
check_command check_http
}
What is the cause of this problem and how can I fix this?
Your help is higly appreciated.
Edit:
Figured out how I can run a plugin from the CLI.
root@h2200554:~# cd /usr/lib/nagios/plugins
root@h2200554:/usr/lib/nagios/plugins# ./check_http -I http://www.google.com
HTTP OK: HTTP/1.0 302 Found - 1002 bytes in 0,062 second response time |time=0,062269s;;;0,000000 size=1002B;;;0
root@h2200554:/usr/lib/nagios/plugins#
So if this is working, why is it not working in Nagios?
I have installed Nagios on my Ubuntu server.
Nagios is running, Apache also is running.
When I want to monitor a website of mine Nagios says:
Host State Information
Host Status: DOWN
(for 0d 0h 30m 44s)
Status Information: PING CRITICAL - Packet loss = 100%
Performance Data: rta=5000.000000ms;5000.000000;5000.000000;0.000000 pl=100%;100;100;0
Current Attempt: 1/10 (HARD state)
Last Check Time: 2013-08-06 19:45:21
Check Type: ACTIVE
Check Latency / Duration: 0.000 / 10.018 seconds
Next Scheduled Active Check: 2013-08-06 19:50:31
Last State Change: 2013-08-06 19:19:31
Last Notification: 2013-08-06 19:19:31 (notification 1)
Is This Host Flapping? NO
(4.01% state change)
In Scheduled Downtime? NO
Last Update: 2013-08-06 19:50:11 ( 0d 0h 0m 4s ago)
Active Checks: ENABLED
Passive Checks: ENABLED
Obsessing: ENABLED
Notifications: ENABLED
Event Handler: ENABLED
Flap Detection: ENABLE
The site is up and running, it does the same for other sites, including Google.com
When I enter the check_http command, Ubuntu states that the command is not found.
LS from plugins folder:
root@h2200554:/etc/nagios3/conf.d# ls
contacts_nagios2.cfg generic-service_nagios2.cfg services_nagios2.cfg
extinfo_nagios2.cfg hostgroups_nagios2.cfg test-google.cfg
generic-host_nagios2.cfg localhost_nagios2.cfg timeperiods_nagios2.cfg
Cat from test-google.cfg
root@h2200554:/etc/nagios3/conf.d# cat test-google.cfg
define host{
use generic-host
host_name google
alias google
address google.com
}
define service{
use generic-service
host_name google
service_description HTTP
check_command check_http
}
What is the cause of this problem and how can I fix this?
Your help is higly appreciated.
Edit:
Figured out how I can run a plugin from the CLI.
root@h2200554:~# cd /usr/lib/nagios/plugins
root@h2200554:/usr/lib/nagios/plugins# ./check_http -I http://www.google.com
HTTP OK: HTTP/1.0 302 Found - 1002 bytes in 0,062 second response time |time=0,062269s;;;0,000000 size=1002B;;;0
root@h2200554:/usr/lib/nagios/plugins#
So if this is working, why is it not working in Nagios?