TECHZEN Zenoss User Community ARCHIVE  

zenpacklib: updating a component property at polling time ?

Subject: zenpacklib: updating a component property at polling time ?
Author: Charles Bueche
Posted: 2016-06-10 07:33

Hi,

I'm developing a zenpack to monitor Cisco FirePower devices. As usual with Cisco, they have bought yet another company and applied the Cisco label on top. The MIBs are completed by a nice REST implementation, nothing to complain about, even mostly better and more open than other Cisco devices.

I'm using zenpacklib to develop my zenpack, so far it works the way I want, unless I can't find how to update the disk percentage utilization property at polling time. I have defined the "PercentUtil"property in the class (bottom of this code piece) :

    CiscoFirePowerSmDisk:
base: [zenpacklib.Component]
label: Disk
plural_label: Disks
properties:
devicename:
order: 20
label: Device
MountPoint:
order: 30
label: MountPoint
content_width: 150
TotalKb:
order: 40
label: TotalKb
UsedKb:
order: 50
label: UsedKb
FreeKb:
order: 60
label: FreeKb
PercentUtil:
order: 70
label: PercentUtil
monitoring_templates:
- CiscoFirePowerSmDiskUsage

and then a "PercentUtil"alias in the data-source:

                datasources:
TotalKb:
type: SNMP
datapoints:
TotalKb: Gauge32
oid: 1.3.6.1.4.1.9.9.826.1.71.9.1.8
UsedKb:
type: SNMP
datapoints:
UsedKb:
aliases: {PercentUtil: '${here/TotalKb},/,100,*'}
oid: 1.3.6.1.4.1.9.9.826.1.71.9.1.9

but the column is never updated:

< Previous
Zenoss 5; Install from Github
  Next
Make files downloadable from the interface
>