mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
* Set the To: field.
* Doh! copy the actual Nagios config files to the store, not symlinks to the sources outside of the store. svn path=/nixos/trunk/; revision=9755
This commit is contained in:
parent
d53c726cbb
commit
4de273e376
@ -1,12 +1,11 @@
|
||||
define command {
|
||||
command_name host-notify-by-email
|
||||
command_line printf "%b" "Subject: [Nagios] Host $HOSTSTATE$ alert for $HOSTNAME$\n\n***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | sendmail $CONTACTEMAIL$
|
||||
command_line printf "%b" "To: $CONTACTEMAIL$\nSubject: [Nagios] Host $HOSTSTATE$ alert for $HOSTNAME$\n\n***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | sendmail $CONTACTEMAIL$
|
||||
}
|
||||
|
||||
|
||||
define command{
|
||||
define command {
|
||||
command_name notify-by-email
|
||||
command_line printf "%b" "Subject: [Nagios] $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\n\n***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | sendmail $CONTACTEMAIL$
|
||||
command_line printf "%b" "To: $CONTACTEMAIL$\nSubject: [Nagios] $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$\n\n***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | sendmail $CONTACTEMAIL$
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,8 +15,8 @@ let
|
||||
./commands.cfg
|
||||
] ++ config.services.nagios.objectDefs;
|
||||
|
||||
nagiosObjectDefsDir = pkgs.runCommand "nagios-objects" {}
|
||||
"ensureDir $out; ln -s ${toString nagiosObjectDefs} $out/";
|
||||
nagiosObjectDefsDir = pkgs.runCommand "nagios-objects" {inherit nagiosObjectDefs;}
|
||||
"ensureDir $out; ln -s $nagiosObjectDefs $out/";
|
||||
|
||||
nagiosCfgFile = pkgs.writeText "nagios.cfg" "
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user