• OWL energy monitor to nagios

    Date: 2012.09.02 | Category: Uncategorized

    nagios owl 550x196 OWL energy monitor to nagios

    I have been able to get my CM160 owl energy monitor to provide data to nagios. This allows me to track energy usage in my house.

    It’s disgraceful how bad Owl’s support is for linux users but it’s great to see the community being so active in writing drivers/support to make it a reality.

    Here is my check_owl.sh – I run this as a nagios command:

    meh=`tail -n 1 /var/log/owl.txt | cut -d' ' -f7`
    /usr/bin/printf "power is $meh | $meh"
    exit 0
    

    Replace the path /var/log/owl.txt with your owl output log file.

    To test it do:

    tail -n 1 /var/log/owl.txt | cut -d' ' -f7
    

    You should get a value as a response.

    My nagios command(commands.cfg) looks like this:

    define command{
      command_name check_owl
      command_line /usr/lib/nagios/plugins/check_owl.sh
    }
    

    and my service like this:

    define service{
            use                             generic-service         ; Name of service template to use
            host_name                       localhost
            service_description             Power usage
            check_command                   check_owl!20!5
            action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$register
            }