Version 2.1-1 release with new rules configurations contact field. According to future notifier GUI interface pre-requisites. Version 2.1 released with notification tracking.
This version will introduce a change on rules declarations.
This change affect the contact field in rules configurations.
Now, to you'll specify not the contact email, but the contact login.
Command change too. you'll need to specify a new field in command (-M - Nagios macro $CONTACTEMAIL$) to give contact mail informations to notifier.
The previously field for contact email (-C - Nagios macro $CONTACTNAME$) going contact name.
The new release v2.1 include notifications tracking. Typically, current notification traited by notifier can check previous sent notification method to automatically adapt methods to use on it. Exemple 1:
Is necessary to create notifier database before start using EON advanced notification from v2.0
A script exist to automaticaly create database on running system if default mysql root password as not changed :
docs/db/create_database.sh
Just launch this script to create database.
A script has be writted to migrate one version to other more easier.
You'll find it in notifier/scripts/updates/v2.1_to_v2.1-1.sh
Two commands are necessary to create into nagios (by lilac configuration into EyesOfNetwork).
eon-host-notifier :
$USER3$/bin/notifier.pl -t host -c $USER3$/etc/notifier.cfg -r $USER3$/etc/notifier.rules -T "$LONGDATETIME$" -h "$HOSTNAME$" -e "$HOSTSTATE$" -i "$HOSTADDRESS$" -n "$NOTIFICATIONTYPE$" -C "$CONTACTNAME$" -M "$CONTACTEMAIL$" -O "$HOSTOUTPUT$" -A "$HOSTGROUPNAMES$" -G "$CONTACTGROUPNAMES$" -X "$TIME$" -Y "$HOSTNOTIFICATIONNUMBER$" -N "$CONTACTPAGER$"
eon-service-notifier :
$USER3$/bin/notifier.pl -t service -c $USER3$/etc/notifier.cfg -r $USER3$/etc/notifier.rules -T "$LONGDATETIME$" -h "$HOSTNAME$" -s "$SERVICEDESC$" -e "$SERVICESTATE$" -i "$HOSTADDRESS$" -n "$NOTIFICATIONTYPE$" -C "$CONTACTNAME$" -M "$CONTACTEMAIL$" -O "$SERVICEOUTPUT$" -A "$HOSTGROUPNAMES$" -B "$SERVICEGROUPNAMES$" -G "$CONTACTGROUPNAMES$" -X "$TIME$" -Y "$SERVICENOTIFICATIONNUMBER$" -N "$CONTACTPAGER$"
$USER3$
: Nagios ressource corresponding to USER3. (Default : /srv/eyesofnetwork/notifier)$LONGDATETIME$
: Human readable date (i.e. Mon Dec 18 08:35:12 CEST 1000)$HOSTNAME$
: Name of host$HOSTSTATE$
: State of host$HOSTADDRESS
: Address of host (IP / FQDN)$SERVICEDESC$
: Service description$SERVICESTATE$
: Service state$NOTIFICATIONTYPE$
: Type of notification$CONTACTNAME$
: Username of contact (login)$CONTACTEMAIL$
: e-mail of contact$HOSTOUTPUT$
: Output returned by nagios plugin$SERVICEOUTPUT$
: Output returned by nagios plugin$HOSTGROUPNAMES$
: Names of linked hosts groups$SERVICEGROUPNAMES$
: Names of linked services groups$CONTACTGROUPNAMES$
: Names of linked contacts groups$TIME
: Current time (i.e. 08:35:12)$HOSTNOTIFICATIONNUMBER
: Number of notification already sent for this host$SERVICENOTIFICATIONNUMBER
: Number of notification already sent for this service$CONTACTPAGER$
: Pager of contact (Mobile phone number)Notifier manual execution command :
# Generic command
./notifier.pl -t <host|service> -c <config_file_path> -r <rules_file_path> -T <YYYY-MM-DD-HH:mm:ss> -h <hostname> -A <hostgroup> -B <servicegroup> -s <servicename> -e <state> -i <hostaddress> -n <method> -C <contact_name> -M <contact_email> -O <output> -X <YYYY-MM-DD-HH:mm:ss> -Y <notification_number> -N <contact_pager>
# Exemple command
./notifier.pl -t service -c /srv/eyesofnetwork/notifier/etc/notifier.cfg -r /srv/eyesofnetwork/notifier/etc/notifier.rules -T 2017-07-27-10:05:00 -h localhost -A LINUX -B GENERIC-SERVICES -s memory -e CRITICAL -i 127.0.0.1 -n email -C admin -M "admin@localhost" -O "Test memory critical" -X 2017-07-27-10:05:00 -Y 1
Notifier manual execution command :
# Generic command
./notifier.pl -t <host|service> -c <config_file_path> -r <rules_file_path> -T <YYYY-MM-DD-HH:mm:ss> -h <hostname> -A <hostgroup> -B <servicegroup> -s <servicename> -e <state> -i <hostaddress> -n <method> -C <contact_email> -O <output> -X <YYYY-MM-DD-HH:mm:ss> -Y <notification_number> -N <contact_pager>
# Exemple command
./notifier.pl -t service -c /srv/eyesofnetwork/notifier/etc/notifier.cfg -r /srv/eyesofnetwork/notifier/etc/notifier.rules -T 2017-07-27-10:05:00 -h localhost -A LINUX -B GENERIC-SERVICES -s memory -e CRITICAL -i 127.0.0.1 -n email -C "admin@localhost" -O "Test memory critical" -X 2017-07-27-10:05:00 -Y 1
If you have an SQL Syntax error at notifier execution, probably you've not authorized characters in message body as quote or doublequote. Check this.