TECHZEN Zenoss User Community ARCHIVE  

custom zenpython datasource issue

Subject: custom zenpython datasource issue
Author: Jay Stanley
Posted: 2015-01-06 11:45

I have created a new zenpack. It contains a new component that is added manually and a new datasource for that component.

Everything runs great, except when I have more than one component on a device. The datasource only seems to run against one component.

Any ideas on what I should look at



Subject: I think I understand now.. in
Author: Jay Stanley
Posted: 2015-01-06 12:53

I think I understand now.. in config_key I need to set the first param to context.id (component.id) instead of context.device().id



Subject: PythonDataSource.config_key() should return..
Author: Chet Luther
Posted: 2015-01-07 13:35

Close. Your override of PythonDataSource.config_key() should return something like the following..

return (context.device().id, datasource.getCycleTime(context), context.id)

For the most part you should always return device and cycletime as the first and second elements, and anything else you want after that. Since "context" would be the component because the datasource is in a monitoring template bound to a component.



< Previous
SMART monitoring for HDDs and SSDs
  Next
Zenpython Daemon Crashing Frequently after upgrade to Windows 2.2.0
>