Two questions, check command and notifications
Posted: Thu Sep 25, 2014 9:07 am
Testing this out and it works from the command line http://exchange.nagios.org/directory/Pl ... us/details
Sure there is something wrong with my checks
commands
And second question. I am not getting a notification when one of our networks can't ping. Otherwise it works just fine
Code: Select all
./check_snmp_synology -h 10.2.2.4 -v
Synology model: "DS213j"
Synology s/n: "1440LAN010857"
DSM Version: "DSM 5.0-4493"
System Status: Normal
Power Status: Normal
System Fan Status: Normal
CPU Fan Status: Normal
Number of disks: 2
"Disk 1" (model: "ST4000DM000-1F2168 ") status:Normal temperature:31 C
"Disk 2" (model: "ST4000DM000-1F2168 ") status:Normal temperature:34 C
Number of RAID volume: 1
"Volume 1" status:Normal
OK - Synology "DS213j" (s/n: "1440LAN010857", "DSM 5.0-4493") is in good health
commands
Code: Select all
define command{
command_name check_snmp_synology
command_line $USER1$/check_snmp_synology -H $HOSTADDRESS$ -v $ARG1$ $ARG2$
}Code: Select all
# Service Defs
define service{
use generic-service
host_name 10.2.2.4
service_description Hardware
check_command check_snmp_synology
}Code: Select all
define host{
use generic-switch ; Inherit default values from a template
host_name xxxx 10.10.6.1 ; The name we're giving to this switch
alias xxxx Gateway ; A longer name associated with the switch
address 10.10.6.1 ; IP address of the switch
hostgroups Stl-Sonicwall ; Host groups this switch is associated with
}
Code: Select all
define service{
use generic-service
host_name xxxx 10.10.6.1
service_description PING
check_command check_ping!200.0,20%!600.0,60%
normal_check_interval 1
retry_check_interval 1
}
Code: Select all
define host{
name generic-switch ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
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
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}