Je n'arrive pas à comprendre pourquoi Nagios ne m'envoie pas d'alerte sur certains des services que je supervise, je me demandais si quelqu'un pouvait m'aider un peu.
il s'agit d'un service
define service {
hostgroup\_name nrpe-disk
service\_description disk
use alarm,check
check\_command check\_nrpe1!check\_disk
register 1
}
voici mon ordre
define command {
command\_name check\_nrpe1
command\_line $USER1$/check\_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
Voici le modèle de service
define service {
name alarm
notification\_interval 0
notification\_period 247
notification\_options w,u,r,c,f,s
notifications\_enabled 1
contact\_groups staff
register 0
}
define command {
command\_name notify-host-by-email
command\_line /usr/bin/printf "%b" "\*\*\*\*\* Nagios \*\*\*\*\*\\n\\nNotification Type: $NOTIFICATIONTYPE$\\nHost: $HOSTNAME$\\nState: $HOSTSTATE$\\nAddress: $HOSTADDRESS$\\nInfo: $HOSTOUTPUT$\\n\\nDate/Time: $LONGDATETIME$\\n" | /usr/bin/mail -s "\*\* $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ \*\*" $CONTACTEMAIL$
}
define command {
command\_name notify-host-by-pager
command\_line /usr/bin/printf "%b" "Notification Type: $NOTIFICATIONTYPE$\\nHost: $HOSTNAME$\\nState: $HOSTSTATE$\\nAddress: $HOSTADDRESS$\\nInfo: $HOSTOUTPUT$" | /usr/bin/mail $CONTACTPAGER$
}
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$" | /usr/bin/mail -s "\*\* $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ \*\*" $CONTACTEMAIL$
}
define command {
command\_name notify-service-by-pager
command\_line /usr/bin/printf "%b" "Notification Type: $NOTIFICATIONTYPE$\\n\\nService: $SERVICEDESC$\\nHost: $HOSTALIAS$\\nAddress: $HOSTADDRESS$\\nState: $SERVICESTATE$\\n\\nAdditional Info:\\n\\n$SERVICEOUTPUT$" | /usr/bin/mail $CONTACTPAGER$
}
define contactgroup {
contactgroup\_name staff
alias XXXXXXXX
members XXXXXXXX XXXXXXXX
}
define contact {
contact\_name XXXXXXX XXXXXX
alias XXXXXXXXX
host\_notifications\_enabled 1
service\_notifications\_enabled 1
host\_notification\_period 247
service\_notification\_period 247
host\_notification\_options d,u,r,f,s
service\_notification\_options w,u,c,r,f,s
host\_notification\_commands notify-host-by-email,notify-host-by-pager
service\_notification\_commands notify-service-by-email,notify-service-by-pager
email XXXXXXXXX@XXXXXXXX.XXX
pager XXXXXXXXXX@messaging.sprintpcs.com
}