ok general cleanup from old commands to new commands
This commit is contained in:
parent
7a65798649
commit
5f2422809b
3 changed files with 36 additions and 17 deletions
|
@ -41,7 +41,8 @@
|
|||
# SAMPLE NOTIFICATION COMMANDS
|
||||
#
|
||||
# These are some example notification commands. They may or may not work on
|
||||
# your system without modification.
|
||||
# your system without modification. As an example, some systems will require
|
||||
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
@ -111,5 +112,3 @@ 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" >> /var/log/nagios/service-perfdata.out
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
# SAMPLE NOTIFICATION COMMANDS
|
||||
#
|
||||
# These are some example notification commands. They may or may not work on
|
||||
# your system without modification.
|
||||
# your system without modification. As an example, some systems will require
|
||||
# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
|
|
@ -8,18 +8,13 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
# 'host-notify-by-email' command definition
|
||||
define command{
|
||||
command_name host-notify-by-email
|
||||
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nSource: $$(hostname)\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
|
||||
}
|
||||
|
||||
# 'notify-service-by-email' command definition
|
||||
define command{
|
||||
command_name notify-service-by-email
|
||||
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
|
||||
}
|
||||
|
||||
# 'notify-by-epager' command definition
|
||||
define command{
|
||||
command_name notify-by-epager
|
||||
|
@ -64,17 +59,41 @@ define command{
|
|||
}
|
||||
|
||||
# 'notify-by-xmpp' command definition
|
||||
define command{
|
||||
command_name notify-by-xmpp
|
||||
command_line /usr/local/bin/xmppsend -a /etc/nagios/private/xmppnagios.ini "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nInfo: $SERVICEOUTPUT$\nDate: $LONGDATETIME$" $CONTACTEMAIL$
|
||||
}
|
||||
#define command{
|
||||
# command_name notify-by-xmpp
|
||||
# command_line /usr/local/bin/xmppsend -a /etc/nagios/private/xmppnagios.ini "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nInfo: $SERVICEOUTPUT$\nDate: $LONGDATETIME$" $CONTACTEMAIL$
|
||||
# }
|
||||
|
||||
|
||||
# 'host-notify-by-xmpp' command definition
|
||||
#define command{
|
||||
# command_name host-notify-by-xmpp
|
||||
# command_line /usr/local/bin/xmppsend -a /etc/nagios/private/xmppnagios.ini "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nDate: $LONGDATETIME$" $CONTACTEMAIL$
|
||||
# }
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# SAMPLE PERFORMANCE DATA COMMANDS
|
||||
#
|
||||
# These are sample performance data commands that can be used to send performance
|
||||
# data output to two text files (one for hosts, another for services). If you
|
||||
# plan on simply writing performance data out to a file, consider using the
|
||||
# host_perfdata_file and service_perfdata_file options in the main config file.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
# 'process-host-perfdata' command definition
|
||||
define command{
|
||||
command_name host-notify-by-xmpp
|
||||
command_line /usr/local/bin/xmppsend -a /etc/nagios/private/xmppnagios.ini "Host '$HOSTALIAS$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nDate: $LONGDATETIME$" $CONTACTEMAIL$
|
||||
command_name process-host-perfdata
|
||||
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/log/nagios/host-perfdata.out
|
||||
}
|
||||
|
||||
|
||||
|
||||
# 'process-service-perfdata' command definition
|
||||
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" >> /var/log/nagios/service-perfdata.out
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue