I have downloaded version 3.0.3, compiled and installed it on a Solaris 10 x64 server according to the instructions that I have found. I also set up and agent on a windows xp box using the NSclient++. I followed the instructions to add basic monitoring of the windows box to the configuration files of nagios.
When I go through the web interface, and chose host detail, it says the windows box it down as its status. Status information says CRITICAL - You need more args!!!. Now the interesting part. When I drill into the details of the windows server I see green OK status for things like memory and disk space. So this tells me that it is communicating to the agent on the windows box.
Check the host object definition for the server in question. i.e.
define host{
use windows-server ; Inherit default values from a template
host_name <whatever> ; The name we're giving to this host
etc
Then check the template object (nromally in templates.cfg by default) you are using for this server (i.e. from the “use” variable, in the case above it would be “windows-server”). This may or may not refer to a further template, in which case check that also. What you are looking for somewhere within these objects is the variable that looks like
check_command check-host-alive
“check-host-alive” is the command that is being used to check the health of the host. It usually refers to a simple ping command and should be defined (again default) in commands.cfg like
# 'check-host-alive' command definition
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
If none of this is looking familiar on your installation then please post your host object and appropriate templates for review.
define host{
use windows-server ; Inherit default values from a template
host_name mydesktop ; The name we're giving to this host
alias Desktop ; A longer name associated with the host
address 192.168.99.88 ; IP address of the host
}
In the templates.cfg file, i see"
define host{
name windows-server ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, Windows servers are monitored round the clock
check_interval 5 ; Actively check the server every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each server 10 times (max)
check_command check-host-alive ; Default command to check if servers are "alive"
notification_period 24x7 ; Send notification out at any time - day or night
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
hostgroups windows-servers ; Host groups that Windows servers should be a member of
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
# pwd
/usr/local/nagios/libexec
# ./check_ping -H 192.168.99.88 -w 3000.0,80% -c 5000.0,100% -p 5
CRITICAL - You need more args!!!
Could not open pipe:
ick… could be the check_ping plugin is not properly compiled… seems it might be a common problem with the solaris x64. Might want to have a look at what this chap suggests: mernin.com/blog/?p=118 and recompile your plugins with the –with-ipv6=no option, or if you built the plugins as a non-root user follow his suggestion on editing nagios-plugins-1.4.11/config.h before recompiling.
it was the config.h with out having a ping command defined. I fixed that with his suggestion and re-compiled check_ping and now that is working. Doubt I would have ever found that.