Getting Vera data to Nagios or other monitoring tool

Hi guys,

I have a potential commercial client and they are using Nagios for monitoring, alerting and graphing their IT infrastructure. They want to install a few Z-Wave devices for temperature monitoring and also energy usage. Anybody got any ideas how I will interface these?

I think a Nagios or Zenoss plugin will be excellent for commercial installations. Even if it’s possible to expose device values as SNMP that will be great.

thanks a lot.

did you see the dataMine graphing and logging plugin: http://forum.micasaverde.com/index.php/topic,7750.0.html
probably you can look into the possibility of modifying it to integrate with Nagios

thanks @capjay

Will have a look into that.

I’ve got a couple of Nagios check_* scripts that query Vera over its HTTP interface, for feeding into nagiosgraph.

Edit: Here is my check_vera script:

[code]#!/bin/sh

refreshUserData ()
{

Set user_data2_* variables

userData=$(curl -s “http://${host}:3480/data_request?id=lu_user_data2&output_format=xml”)
eval $(echo “$userData” | xsltproc
–stringparam serviceType “$serviceType”
–stringparam deviceName “$deviceName”
/opt/local/libexec/nagios/user_data2.xsl -)
}

refreshStatus ()
{
statusData=$(curl -s “http://${host}:3480/data_request?id=lu_status2&DeviceNum=$1&LoadTime=$4&DataVersion=$5&timeout=60&minimumdelay=1000&output_format=xml”)
eval $(echo “$statusData” | xsltproc
–stringparam serviceId “$2”
–stringparam variableName “$3”
/opt/local/libexec/nagios/status2.xsl -)
}

usage ()
{
echo “$0 -H host -d device_name -s service_type -v variable_name [-i interval] [-p host service]”
}

Process command-line arguments

while [ $# -gt 0 ]; do
case $1 in
–) break ;;
-h) usage; exit 0 ;;
-H) host=$2; shift 2 ;;
-d) deviceName=$2; shift 2 ;;
-s) serviceType=$2; shift 2 ;;
-v) variableName=$2; shift 2 ;;
-i) continuous=$2; shift 2 ;;
-p) passive=1; passiveHost=$2; passiveService=$3; shift 3 ;;
*) usage; exit 1 ;;
esac
done

Force load of user_data2.

user_data2_LoadTime=0
status2_LoadTime=0

while true; do
if [ “$user_data2_LoadTime” -eq 0 ]; then
refreshUserData
fi

if [ -z “$user_data2_deviceId” ]; then
message=“Device "$deviceName" not found”
exitStatus=3
else
refreshStatus “$user_data2_deviceId” “$user_data2_serviceId” “$variableName” “$status2_LoadTime” “$status2_DataVersion”

# Has user data changed?
if [ "$status2_UserData_DataVersion" -ne "$user_data2_DataVersion" ]; then
  user_data2_LoadTime=0
  continue
fi

# To do.
exitStatus=0
message="$variableName = $value"
perfdata="|'$variableName'=$value" 

fi

if [ -z “$passive” ]; then
echo “$message$perfdata”
else
echo “$(date +%s) PROCESS_SERVICE_CHECK_RESULT;$passiveHost;$passiveService;$exitStatus;$message$perfdata”
fi

if [ -z “$continuous” ]; then
exit $exitStatus;
fi

sleep $continuous;
done
[/code]

And here is how I check a couple of devices:

[code]# Check micasaverde Vera through its port-3480 interface.
define command {
command_name check_vera
command_line /opt/local/libexec/nagios/check_vera -H $HOSTADDRESS$ -d “$ARG1$” -s “$ARG2$” -v “$ARG3$”
}

define service {
use local-service,graphed-service
host_name veralite
service_description Whole house usage
check_command check_vera!Whole house usage!urn:schemas-micasaverde-com:service:EnergyMetering:1!Watts
}

define service {
use local-service,graphed-service
host_name veralite
service_description Solar array generation
check_command check_vera!Solar array generation!urn:schemas-micasaverde-com:service:EnergyMetering:1!Watts
}
[/code]

There are some shortcomings of the code: it doesn’t know what to do when there are two services with the same type (e.g., Cool and Heat setpoints on a thermostat). It also taxes the Vera a bit with all that XML and should really be using JSON. I poll only once every 5 minutes personally so I’m not it a rush to fix this.

[quote=“ideschamps, post:1, topic:171833”]Hi guys,

I have a potential commercial client and they are using Nagios for monitoring, alerting and graphing their IT infrastructure. They want to install a few Z-Wave devices for temperature monitoring and also energy usage. Anybody got any ideas how I will interface these?

I think a Nagios or Zenoss plugin will be excellent for commercial installations. Even if it’s possible to expose device values as SNMP that will be great.

thanks a lot.[/quote]

Any interest in support for Zabbix? (I prefer it to Nagios / Zenoss) I’m asking because I have a Zabbix plug-in “in the works.”

Hugh

Any interest in support for Zabbix? (I prefer it to Nagios / Zenoss) I'm asking because I have a Zabbix plug-in "in the works."

Hugh

I do like Zabbix and think the plugin will be very usefull, unfortunately I won’t be able to get the client to change their whole monitoring environment.

thanks

I’m assuming the “Zabbix Plugin” what written and released by hugheaves? I am a little lost on how to use it once its installed. Are there docs anywhere? Also, I’m a little concerned it may not work correctly on latest UI5 firmware. When I try running:

/etc/cmh-ludl/zabbix_agentd -p

I get to “net.dns” but then the following error is spit out:

/etc/cmh-ludl/zabbix_agentd: can’t resolve symbol ‘__dn_skipname’ in lib ‘/etc/cmh-ludl/zabbix_agentd’.

[quote=“hugheaves, post:5, topic:171833”][quote=“ideschamps, post:1, topic:171833”]Hi guys,

I have a potential commercial client and they are using Nagios for monitoring, alerting and graphing their IT infrastructure. They want to install a few Z-Wave devices for temperature monitoring and also energy usage. Anybody got any ideas how I will interface these?

I think a Nagios or Zenoss plugin will be excellent for commercial installations. Even if it’s possible to expose device values as SNMP that will be great.

thanks a lot.[/quote]

Any interest in support for Zabbix? (I prefer it to Nagios / Zenoss) I’m asking because I have a Zabbix plug-in “in the works.”

Hugh[/quote]

Hi jjlauer,

Yeah, sorry, I did release the plug-in, but it’s very “Alpha” at this stage, and in fact, I haven’t actually had chance to write any documentation.

The missing symbol does look like a firmware issue, as it the binary executes correctly on the version of UI5 that I’m running. What version of the UI5 firmware are you running?

Hugh

[quote=“jjlauer, post:7, topic:171833”]I’m assuming the “Zabbix Plugin” what written and released by hugheaves? I am a little lost on how to use it once its installed. Are there docs anywhere? Also, I’m a little concerned it may not work correctly on latest UI5 firmware. When I try running:

/etc/cmh-ludl/zabbix_agentd -p

I get to “net.dns” but then the following error is spit out:

/etc/cmh-ludl/zabbix_agentd: can’t resolve symbol ‘__dn_skipname’ in lib ‘/etc/cmh-ludl/zabbix_agentd’.

[quote=“hugheaves, post:5, topic:171833”][quote=“ideschamps, post:1, topic:171833”]Hi guys,

I have a potential commercial client and they are using Nagios for monitoring, alerting and graphing their IT infrastructure. They want to install a few Z-Wave devices for temperature monitoring and also energy usage. Anybody got any ideas how I will interface these?

I think a Nagios or Zenoss plugin will be excellent for commercial installations. Even if it’s possible to expose device values as SNMP that will be great.

thanks a lot.[/quote]

Any interest in support for Zabbix? (I prefer it to Nagios / Zenoss) I’m asking because I have a Zabbix plug-in “in the works.”

Hugh[/quote][/quote]

hugheaves any updates on zabbix plugin documentation? How can i get for example dimmer values= What agent key should i poll on zabbix server?

Heke,

Actually, I didn’t realize anyone was interested. I’ll create a new thread in the plug-in’s forum with some documentation / discussion. Give me a day or two to put it together.

Hugh

Hugh,

Well, I’m very interested! I installed the plugin, set the Zabbix server ip in its settings, but it is not showing up on the zabbix server… Any ideas? I’m new to zabbix…

[quote=“jjlauer, post:7, topic:171833”]I’m assuming the “Zabbix Plugin” what written and released by hugheaves? I am a little lost on how to use it once its installed. Are there docs anywhere? Also, I’m a little concerned it may not work correctly on latest UI5 firmware. When I try running:

/etc/cmh-ludl/zabbix_agentd -p

I get to “net.dns” but then the following error is spit out:

/etc/cmh-ludl/zabbix_agentd: can’t resolve symbol ‘__dn_skipname’ in lib ‘/etc/cmh-ludl/zabbix_agentd’.[/quote]
Same here. Running 1.5.459 firmware.

Hi Everyone,

I’ve created a new thread (with some documentation) for the Zabbix Plugin here:

http://forum.micasaverde.com/index.php/topic,13452.0.html

Please take a look, and let’s continue any discussion about Zabbix in the new thread.

Thanks,
Hugh