Page 2 of 3
Re: Starting with Nagios, monitorred site down when it's not
Posted: Wed May 29, 2013 8:36 am
by Toontje
Code: Select all
root@eeepc:/usr/lib/nagios/plugins# ./check_ping -H www.machielsen.net -w 200,50% -c 500,100%
PING OK - Packet loss = 0%, RTA = 48.79 ms|rta=48.789001ms;200.000000;500.000000;0.000000 pl=0%;50;100;0
Re: Starting with Nagios, monitorred site down when it's not
Posted: Wed May 29, 2013 2:28 pm
by sreinhardt
hmm, so check_ping seems to work great. So what is different with check-host-alive. Can you post the command definition for check-host-alive from your commands.cfg?
Re: Starting with Nagios, monitorred site down when it's not
Posted: Thu May 30, 2013 2:09 am
by Toontje
In commands.cfg
Code: Select all
################################################################################
# HOST CHECK COMMANDS
################################################################################
# On Debian, check-host-alive is being defined from within the
# nagios-plugins-basic package
I do have a check_host command in my plugins directory.
Code: Select all
ton@eeepc:/usr/lib/nagios/plugins$ ./check_host -H www.machielsen.net
OK - www.machielsen.net responds to ICMP. Packet 1, rta 48.110ms|pkt=1;;0;5 rta=48.110;1000.000;1000.000;;
Re: Starting with Nagios, monitorred site down when it's not
Posted: Thu May 30, 2013 1:44 pm
by abrist
Can we see the definition for:
And the definition that:
uses if it differs from check-host-alive?
Re: Starting with Nagios, monitorred site down when it's not
Posted: Thu May 30, 2013 1:45 pm
by sreinhardt
I want to be sure that we are not mixing definitions here.
Plugin: an executable, script or some other item that nagios can directly interact with but is not exclusively a definition within a configuration.
Command: Specifically a defined name for something that nagios can execute, generally stored in commands.cfg in your nagios /etc directory. This is a definition that tells nagios how to interact and where to find a plugin to use.
So you have a check_host plugin that works, but via the debian\ubuntu commands.cfg file it seems that you need to install an additional package to get the base(per our standards) nagios definitions such as check-host-alive. Can you verify that you have installed nagios-plugins-basic?
Re: Starting with Nagios, monitorred site down when it's not
Posted: Thu May 30, 2013 2:35 pm
by Toontje
Code: Select all
ton@eeepc:~$ dpkg -s nagios-plugins-basic
Package: nagios-plugins-basic
Status: install ok installed
Priority: extra
Section: net
Installed-Size: 1916
Maintainer: Ubuntu Developers <[email protected]>
Architecture: i386
Source: nagios-plugins
Version: 1.4.15-5ubuntu3
Replaces: nagios-plugins, nagios-plugins-extra (<= 1.3.1.0), nagios-plugins-standard
Depends: libc6 (>= 2.8), libssl1.0.0 (>= 1.0.0), procps, iputils-ping, ucf
Suggests: nagios3
Conflicts: nagios-plugins (<= 1.4.2-3), nagios-plugins-extra (<= 1.3.1.0)
Description: Plugins for nagios compatible monitoring systems
Plugins for nagios compatible monitoring systems like Nagios and Icinga. It
contains the following plugins:
.
check_apt, check_by_ssh, check_clamd, check_cluster,
check_dhcp, check_disk, check_dummy, check_file_age,
check_ftp, check_host, check_http, check_icmp,
check_ide_smart, check_imap, check_ircd, check_jabber,
check_load, check_log, check_mrtg, check_mrtgtraf,
check_nagios, check_nntp, check_nntps, check_nt,
check_ntp, check_ntp_peer, check_ntp_time, check_nwstat,
check_overcr, check_ping, check_pop, check_procs,
check_real, check_rta_multi, check_sensors, check_simap,
check_smtp, check_spop, check_ssh, check_ssmtp,
check_swap, check_tcp, check_time, check_udp,
check_ups, check_users
.
This package provides a basic set of plugins with minimal external
dependencies. It is not likely to be useful by itself unless you are
using a remote "satellite" system (using nagios-nrpe-server, check_by_ssh or
nsca, for example).
Homepage: http://nagiosplug.sourceforge.net
Original-Maintainer: Debian Nagios Maintainer Group <[email protected]>
Which makes all the sense in the world because, as i mentioned in my original post, only a few sites give me the Network Unreachable error. All sites are on the same hosting platform, so route from the Nagios server to the host, firewall rules on either side of the connection, hosting parameters, etc are all identical.
Re: Starting with Nagios, monitorred site down when it's not
Posted: Thu May 30, 2013 2:47 pm
by abrist
Nagios will still require that the check-host-alive be defined in a cfg *somewhere*. This is the command definition we want to see.
Re: Starting with Nagios, monitorred site down when it's not
Posted: Fri May 31, 2013 10:11 am
by Toontje
abrist wrote:Nagios will still require that the check-host-alive be defined in a cfg *somewhere*. This is the command definition we want to see.
Ok, will do. However, why is it that not all websites give me the same error then?
And second, if the command doesn't exist, where does the "Network unreachable" status come from?
Re: Starting with Nagios, monitorred site down when it's not
Posted: Fri May 31, 2013 10:27 am
by abrist
I believe the command does exist, I just want to check how it is configured as it could use a more obscure mechanism than standard ICMP.
Re: Starting with Nagios, monitorred site down when it's not
Posted: Fri May 31, 2013 1:29 pm
by Toontje
I found this in checkcommands.cfg
Code: Select all
define command{
command_name check_host_alive
command_line $USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1
}