TECHZEN Zenoss User Community ARCHIVE  

Discovery publishing failed - what happened?

Subject: Discovery publishing failed - what happened?
Author: [Not Specified]
Posted: 2017-02-08 15:21

I've started to write a ZenPack for our device following the zenpacklib SDK documentation (https://zenpack-sdk.zenoss.com/en/latest/tutorial-http-api/modeler-plugin.html).

For now I am just hard coding a dummy relationship in the collect() call of my monitoring plugin.

When I attempt to "discover" these objects, it appears that everything is fine, but then the last line in the output says publishing failed. There's no prior indication that there's a problem. Is there a way to get more detailed logs to determine what caused it to fail

Here is the console output:

$ zendisc run --deviceclass=/Storage/DellEMCSCSeries --device=172.23.139.51
2017-02-08 21:19:48,224 INFO zen.ZenDisc: Connecting to localhost:8789
2017-02-08 21:19:48,243 INFO zen.ZenDisc: Connected to the zenhub/0 instance
2017-02-08 21:19:48,323 INFO zen.ZenDisc: Looking for 172.23.139.51
2017-02-08 21:19:48,323 INFO zen.ZenDisc: Found IP 172.23.139.51 for device 172.23.139.51
2017-02-08 21:19:56,147 INFO zen.ZenDisc: Finished scanning device with address 172.23.139.51
2017-02-08 21:19:56,147 INFO zen.ZenDisc: Discovered device 172.23.139.51.
2017-02-08 21:19:56,147 INFO zen.ZenDisc: Result: 172.23.139.51
2017-02-08 21:19:56,155 INFO zen.ZenDisc: skipping WMI-based collection, PySamba zenpack not installed
2017-02-08 21:19:56,156 INFO zen.ZenDisc: Python collection device 172.23.139.51
2017-02-08 21:19:56,156 INFO zen.ZenDisc: plugins: DellEMCSCStorage.SCMap
2017-02-08 21:19:56,156 INFO zen.PythonClient: Collecting SC storage objects for 172.23.139.51
2017-02-08 21:19:56,157 INFO zen.PythonClient: Python client finished collection for 172.23.139.51
2017-02-08 21:19:56,157 INFO zen.ZenDisc: Processing SC storage object results for 172.23.139.51: [ 'objmaps': [ 'modname': 'ZenPacks.zenoss.DellEMCSCStorage.StorageSystem',
'system_serialnumber': '60055'}>],
'parentId': '',
'relname': 'storageSystems'}>]
2017-02-08 21:19:56,158 INFO zen.ZenDisc: No command plugins found for 172.23.139.51
2017-02-08 21:19:56,159 INFO zen.ZenDisc: SNMP monitoring off for 172.23.139.51
2017-02-08 21:19:56,159 INFO zen.ZenDisc: No portscan plugins found for 172.23.139.51
2017-02-08 21:19:56,172 INFO zen.ZenDisc: No change in configuration detected
2017-02-08 21:19:56,172 INFO zen.ZenDisc: Scan time: 0.03 seconds
2017-02-08 21:19:56,173 INFO zen.ZenDisc: Daemon ZenDisc shutting down
2017-02-08 21:19:56,177 INFO zen.publisher: publishing failed: Connection was closed cleanly.



Subject: Looks like zendisc has run
Author: Jane Curry
Posted: 2017-02-11 09:13

Looks like zendisc has run zenmodeler and your modeler is a Python one

I would try:

zenmodeler run -v 10 -d > /tmp/test_model.out 2>&1

and

zenpython run -v 10 -d > /tmp/test_zenpython.out 2>&1

And then check those 2 files. The -v 10 is verbose logging. Make sure you redirect stderr to stdout with the "2>&1" bit on the end.

Do you have the ZenPack Developers' Guide https://www.skills-1st.co.uk/papers/jane/zpdevguide/

Cheers,

Jane

NB Please note that we are away from Feb 10 to March 10, 2017

Email: jane.curry@skills-1st.co.uk    Web: https://www.skills-1st.co.uk



Subject: Thanks Jane! That at least
Author: [Not Specified]
Posted: 2017-02-14 14:35

Thanks Jane! That at least gives me a path to start looking down. I get these errors for both:

2017-02-14 20:31:24,205 DEBUG zen.pbclientfactory: Lost connection to localhost:8789 - Connection to the other side was lost in a non-clean fashion: Connection lost.
2017-02-14 20:31:24,206 INFO zen.publisher: publishing failed: []

So at least I have something to go on to start.

Thanks for the Dev Guide link. I've found about 10 other outdated ones. Looks like yours may actually help. ;)



Subject: Can you show us what you are
Author: Jay Stanley
Posted: 2017-03-02 10:30

Can you show us what you are using for the relmap in your modeler code

Also, is this actually a Zenoss ZenPack or did you just use 'zenoss' as the company/owner name of the ZenPack



< Previous
Not able to stop the monitoring of a component (4.2.5)
  Next
Zenpack Microsoft Version 2.6.11 on zenoss core 4.2.5
>