You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm struggling with getting this to work properly.
Traceback (most recent call last):
File "/etc/salt/eventsd_workers/Zabbix_Return_Worker.py", line 170, in _store
self.zbx_datacontainer.add(data)
File "/usr/local/lib/python2.7/dist-packages/protobix/datacontainer.py", line 69, in add
self.add_item(host, key, data[host][key])
File "/usr/local/lib/python2.7/dist-packages/protobix/datacontainer.py", line 48, in add_item
if self._config.data_type == "items":
AttributeError: 'dict' object has no attribute 'data_type'
Previously I was using add_item but this was affected by the same.
I also tried to set it like self.zbx_datacontainer.data_type = 'items' and self.zbx_datacontainer.data_type('items') but had no luck with those either.
Am I doing something wrong? This is (more or less) also in the tests so ISTM this should work?
The text was updated successfully, but these errors were encountered:
Hello,
Thanks for the report.
As far as I can see, you're passing a dict as argument to datacontainer.
But config argument must be an instance of ZabbixAgentConfig.
You can have a look on protobix.SampleProbe to see how it works.
You could also use SampleProbe in Zabbix_Return_Worker.py to avoid managing all the details
I'm struggling with getting this to work properly.
The datacontainer is setup like this:
Later on we try to send data:
Previously I was using
add_item
but this was affected by the same.I also tried to set it like
self.zbx_datacontainer.data_type = 'items'
andself.zbx_datacontainer.data_type('items')
but had no luck with those either.Am I doing something wrong? This is (more or less) also in the tests so ISTM this should work?
The text was updated successfully, but these errors were encountered: