Integration into SKOOR

Alarming

The SKOOR installation will automatically add the following line to the eranger user crontab on both primary and standby hosts:

*/5 * * * * sudo /opt/eranger/bin/eranger-server-replication.pl status /var/opt/run/eranger/collector/tmp/replication.status > /dev/null 2>&1

If the replication is in sync the output file replication.status will look like:

# Mon Jan 15 19:15:04 2018
# Status is OK, if there is at least one slave, FAILED otherwise
# Legend: 'Slave: <seconds-last-read> (<ip>)'
# slaves: 1
Status: OK
Slave: 2 (10.1.0.89)

The numerical value on the last line (2 here) is the time elapsed (in seconds) since the last time the primary transferred data to the standby.

If the replication is not in sync or not working the file will have the following content:

# Mon Jan 15 19:20:08 2018
# Status is OK, if there is at least one slave, FAILED otherwise
# Legend: 'Slave: <seconds-last-read> (<ip>)'
# slaves: 1
Status: FAILED
Slave:  (0)

The replication can be monitored using the preconfigured parsefile job in SKOOR below the device SKOOR Engine localhost:

To activate the job, set its Interval parameter to e.g. 10 minutes.

Notification of primary server unavailability

Assuming an AlarmGroup is linked below the device SKOOR Engine localhost, as long as the SKOOR engine is still running it will generate alarm messages as soon as the replication has failed.

If for some reason the SKOOR engine itself is not running anymore, the system can not send an alarm. For this reason a dedicated email address should be defined in eranger-replication.cfg:

...
email=support@skoor.com
# email_status=/var/opt/run/eranger/collector/tmp/replication.status
# server_ping=/opt/eranger/bin/eranger-server-ping.pl
...

  Since above status cronjob is also run by cron every 5 minutes on the standby, it will check the primary using eranger-server-ping.pl. Once it detects that the SKOOR daemons are not running anymore on the primary it will send exactly one email to the recipient defined in above configuration file. In other words:

The standby server does basic monitoring of the primary server.

This simple notification email will have as

  • Subject: eranger-server-replication.pl

  • Body: 10.1.0.88 is down

If more than one email address should be notified, separate them by a comma. Example:

email=support@skoor.com,youraccount@domain.com