host_name 172.16.75.231
alias windows-75-231
address 172.16.75.231
check_command check-host-alive
max_check_attempts 5
check_period 24x7
contact_groups sagroup
notification_interval 10
notification_period 24x7
notification_options d,u,r
action_url /nagios/pnp/index.php?host=$HOSTNAME//添加太阳图标
process_perf_data 1 //添加太阳图标
icon_p_w_picpath /usr/local/nagios/share/p_w_picpaths/logos/win.jpg
icon_p_w_picpath_alt /usr/local/nagios/share/p_w_picpaths/logos/windows.jpg
vrml_p_w_picpath /usr/local/nagios/share/p_w_picpaths/logos/4u.jpg
statusmap_p_w_picpath /usr/local/nagios/share/p_w_picpaths/logos/win.jpg
2d_coords 40,50 //2d坐标
#3d_coords 40,50,47
}
define command{
command_name process-service-perfdata
#command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /usr/local/nagios/var/service-perfdata.out
command_line /usr/local/nagios/libexec/process_perfdata.pl
}
libACE.so.5.4.7 libACE_SSL.so.5.4.7 libcrypto.so.0.9.8 libssl.so.0.9.8
[root@nagios library32]# cp *.* /lib/
[root@nagios library32]# cp *.* /usr/lib/
command_name host-notify-by-fetion
command_line /usr/local/fetion/fetion --hide --mobile=150xxxxxxx2 --pwd=xxx --to=$CONTACTPAGER$ --msg-utf8="HOST $HOSTSTATE$ Alert for $HOSTNAME$!on '$LONGDATETIME$'" $CONTACTPAGER$
}
define command{
command_name service-notify-by-fetion
command_line /usr/local/fetion/fetion --hide --mobile=150xxxxx2 --pwd=xxxxx --to=$CONTACTPAGER$ --msg-utf8="$HOSTADDRESS$ $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ on $LONGDATETIME$" $CONTACTPAGER$
}
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
;,rtong@xxxxxt.com ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-email,service-notify-by-fetion
host_notification_commands notify-host-by-email,host-notify-by-fetion
contactgroups sagroup
;pager 1386xxxxxx