Owl Monitoring System

From DNSSEC-Tools
Jump to: navigation, search
{{#if:| {{#if:| {{#if:| {{#if:| {{#if:| {{#if:|
DNSSEC-Tools Component
Owl Monitoring System
This describes Owl Monitoring System, which in the Network-Monitoring Tools category within the DNSSEC-Tools Components framework of tools.
Tool Name: Owl Monitoring System
Tool Type: Network-Monitoring Tools
Manual: Monitoring System.html Manual


Example: Monitoring System-example.txt Example


CLI: Monitoring System-help.txt Help


Tutorial: Tutorial


How To: Monitoring System-dnssec-howto.txt How To


Download: Owl Monitoring System



The Owl Monitoring System uses timed Domain Name System (DNS) queries to monitor basic network functionality. The system consists of a manager host and a set of sensor hosts. The Owl sensors perform periodic DNS queries and report to the Owl manager the time taken for each query. Over time, this shows the responsiveness of the DNS infrastructure.

The Owl Monitoring System was designed such that the Owl sensor hosts need not be under the same administrative control as the Owl manager host. In fact, each sensor in a set of Owl sensors may be under administrative control of different organizations and still report to a single Owl manager.

An Owl sensor may provide its data to more than one Owl manager. In such situations, the managers operate independently of each other and do not know of each other's existence. Throughout the installation manuals, it will be assumed that an installation will have a single manager. Special instructions for multiple-manager environments will be given where needed.

Contact between sensors and their manager may be initiated and performed by the sensor or the manager. This is a configuration decision that must be made on a case by case basis. The push or pull model may cover all of an Owl manager's sensors. For example, a particular manager may initiate sensor data retrieval from all of its sensors. Also, the push/pull model may be specific to each sensor, so a particular manager could retrieve data from one sensor but wait for another sensor to provide its data.

The Owl Installation Manual provides an operational overview of the Owl system, installation instructions for the Owl and supporting third-party software. Configuration instructions for the Owl software are also provided, along with configuration information for the required third-party software.

Quickstart Instructions

This set of instructions assume the following:

  • nagios is installed in /usr/local/nagios
  • nagiosgraph is installed in /usr/local/nagiosgraph.
  • The nagios user and group are defined as nagios:nagios
  • The owl-manager files are present in the /opt/src/manager directory
  • The owl-sensor files are present in the /opt/src/sensor directory

Step 0: Install pre-requisite packages

  • Perl packages:
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm 
# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
# rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
# rpm -i rpmforge-release-0.5.2-2.el6.rf.i686.rpm 
# yum install rrdtool
# sudo yum install perl-CGI rrdtool-perl perl-Time-HiRes
# yum install perl-Log-Dispatch perl-Log-Dispatch-FileRotate Net-DNS
  • rrsync:
# wget http://ftp.samba.org/pub/unpacked/rsync/support/rrsync
# sudo cp rrsync /usr/local/bin/rrsync
# sudo chmod +x /usr/local/bin/rrsync

Install Manager on Centos with Nagios and Nagiosgraph pre-installed

Step 1: Create the owlmanager user and set an initial password

# useradd -m owl-manager
# passwd owl-manager

Step 2: Create a directory for storing owl-manager data files

# mkdir -p /var/opt/owl/data
# mkdir /var/opt/owl/archive
# chown -R owl-manager /var/opt/owl

Step 3: Install binaries for owl-manager utilities

# mkdir -p /usr/local/owl/bin
# cp /opt/src/manager/bin/owl-* /usr/local/owl/bin/

Step 4: Install and customize the owl-dnswatch and owl-perfdata scripts

# cd /usr/local/nagios/libexec/
# cp /opt/src/manager/libexec/owl-dnswatch /opt/src/manager/libexec/owl-perfdata ./
# chown nagios:nagios owl-dnswatch owl-perfdata
# chcon -u system_u owl-dnswatch owl-perfdata 
  • Modify /usr/local/nagios/libexec/owl-dnswatch as follows:


my $OWLDIR = "/owl";


my $OWLDIR = "/var/opt/owl";
  • Modify /usr/local/nagios/libexec/owl-perfdata as follows:


my $GRAPHINSERT = "/owl/nagiosgraph/bin/insert.pl";


my $GRAPHINSERT = "/usr/local/nagiosgraph/bin/insert.pl";

Step 5: Set owl parameters for rrd

  • Set the following options in /usr/local/nagiosgraph/etc/nagiosgraph.conf
   heartbeat = 2400
   stepsize = 60
   step = 1 10 60 1440
   resolution = 525600 105120 43824 3650
  • Add the following to the end of /usr/local/nagiosgraph/etc/map
# Service type: Owl Monitor - DNS response data from owl-dnswatch
#       template:  /perfdata:owl-dnswatch=t:n ms/
#       example:   owl-dnswatch=1350339723:26 ms
/perfdata:.*owl-dnswatch=(\d+):(\d+) ms;/
and push @s, [ 'dnswatch',
             [ 'dnswatch', GAUGE, $2 ] ];
/perfdata:.*owl-dnswatch=(\d+):(\d+) ms$/
and push @s, [ 'dnswatch',
             [ 'dnswatch', GAUGE, $2 ] ];
# Service type: Owl Monitor - DNS anycast response data
#       template:  /perfdata:owl-anycaster=t:n ip h/
#       example:   owl-anycaster=1350491407:112 ms H2
/perfdata:.*owl-anycaster=(\d+):(\d+) ms (\S+) (\S+);/
and push @s, [ "anycast_$4",
             [ 'anycast', GAUGE, $2 ] ];
/perfdata:.*owl-anycaster=(\d+):(\d+) ms (\S+) (\S+)$/
and push @s, [ "anycast_$4",
             [ 'anycast', GAUGE, $2 ] ];

Step 6: Add nagios templates and objects for use by Owl

  • Copy owl templates
# cp /opt/src/manager/nagios-objects/owl-*.cfg \
  • Add templates to the nagios configuration

In /usr/local/nagios/etc/nagios.cfg add the following lines:

# Standard Nagios templates and objects for use by the Owl Monitoring System. 
# And one final one for Owl's hostgroups file. 
  • Process owl plugins for service commands

In /usr/local/nagios/etc/nagios.cfg set service_perfdata_command as follows:


Note: that we assume that other settings for process_performance_data, service_perfdata_file, service_perfdata_file_template, service_perfdata_file_mode, service_perfdata_file_processing_interval, and service_perfdata_file_processing_command are already configured as part of the installation for nagiosgraph.

Note also that the setting for service_perfdata_file_processing_command must be commented out if service_perfdata_command is defined above.

Step 7: Create a user account for the sensor

#useradd -m sensor
#passwd sensor
# su sensor
[sensor]$ mkdir ~/.ssh
[sensor]$ chmod 700 ~/.ssh
[sensor]$ touch ~/.ssh/authorized_keys
[sensor]$ chmod 640 ~/.ssh/authorized_keys

Adding new sensor (sensor-1)

Step 1: Set up the owl-user account on the sensor machine

# useradd -m owl-user
# passwd owl-user
# su owl-user
[owl-user]$ mkdir ~/.ssh
[owl-user]$ chmod 700 ~/.ssh
[owl-user]$ cd ~/.ssh
[owl-user]$ ssh-keygen

Step 2: Copy owl sensor data to the user account on the sensor machine

[owl-user]$ cd
[owl-user]$ mkdir data/ old.data/ log/ conf/ bin/ perllib/
[owl-user]$ cp /opt/src/sensor/bin/*  ./bin/
[owl-user]$ cp /opt/src/sensor/common/perllib/* ./perllib/
[owl-user]$ cp /opt/src/sensor/conf/owl.conf ~/conf

Step 3: Create an owl sensor config file for sensor-1 on the sensor machine

  • Modify ~/conf/owl.conf as follows
host name sensor-1
host dnstimer-args -config /home/owl-user/conf/owl.conf
host transfer-args -config /home/owl-user/conf/owl.conf
host admin  root@localhost
data dir  data
data interval 60
data archive old.data
log dir log
remote  ssh-user sensor@owlmanager.example.com

Setp 4: Initialize the sensor on the manager machine

Note: This is on the manager machine:

  • Create the sensor directories on the manager machine
# /usr/local/owl/bin/owl-initsensor /var/opt/owl/data \
         /var/opt/owl/archive sensor-1
  • Create a new sensor config file
# /usr/local/owl/bin/owl-newsensor \
           -out /usr/local/nagios/etc/objects/sensor-1.cfg\
  • Create the nagios objects for the sensor

In /usr/local/nagios/etc/nagios.cfg add the following line just before the config line for owl-hostgroups.cfg:

  • Add the sensor to the hostgroup

In /usr/local/nagios/etc/objects/owl-hostgroups.cfg add the following line:

members         sensor-1

Step 5: Add the sensor sshkey to the manager

Note: This is on the manager machine:

Add the following line to ~sensor/.ssh/authorized_keys to allow sensor-1 to rsync data to the manager machine:

command="/usr/local/bin/rrsync /var/opt/owl/data/sensor1" ssh-rsa AAAA...Qw== sensor@sensor1.example.com

Step 6: Start the sensor

Note: This is on the sensor machine

[owl-user]$ ./bin/owl-dnstimer
[owl-user]$ ./bin/owl-transfer 

Verify that the sensor is able to rsync the data to the manager ( check /var/opt/owl/data/sensor-1/data on the manager).