EyesOfNetworkCommunity / notifier

EyesOfNetwork notifier
GNU General Public License v2.0
1 stars 0 forks source link

EyesOfNetwork advanced notifier unit.

NEWS

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.

v2.1-1

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.

V2.1

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:

Most important change on rules and commands configuration

To think

Is necessary to create notifier database before start using EON advanced notification from v2.0

Create database

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.

Roadmap

Tools

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

Nagios commands

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$"

Nagios macro used

Troubleshooting

Version 2.1-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_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

Version 2.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

SQL Syntax error

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.

Tracking not work

  1. Check if you’ve correctly activate tracking option in rules file (Last field on each rules file line).
  2. Check if your command name have the correct form as (example: sms-appCRITICAL).