zenorr
2012-08-14 15:24:34 UTC
zenorr [http://community.zenoss.org/people/zenorr] created the discussion
"using d.collectDevice() and d.DeviceLoader.loadDevice() pollutes STDERR"
To view the discussion, visit: http://community.zenoss.org/message/67824#67824
--------------------------------------------------------------
Hi,
I'm developing a script to sync Zenoss (Core 3.2.1) from a tech-CMDB. It is working quite well, but I have some anger with the zendmd commands collectDevice() and DeviceLoader.loadDevice(). They pollute STDERR of my script with all sorts of info messages like :
INFO:zen.Device:device name 'xxx' for ip '10.19.30.9'
INFO:zen.Device:xxx's IP address has been set to 10.19.30.9.
INFO:zen.Device:setting tag to ''
INFO:zen.Device:setting serialNumber to ''
or
INFO:zen.Utils:Executing command: /opt/zenoss/zenoss/bin/zenmodeler run --now --monitor localhost -F -d xxx
2012-08-14 17:05:25,606 INFO zen.ZenModeler: Connecting to localhost:8789
2012-08-14 17:05:25,614 INFO zen.ZenModeler: Connected to ZenHub
2012-08-14 17:05:25,688 INFO zen.ZenModeler: Collecting for device xxx
What I see is that the zenoss scripts behind these API calls both use log.info() call, but I can't figure how to avoid this to propagate up to my STDERR console.
My own script has this :
logger.propagate = False
but I still get the "pollution" from the above API calls.
I get the dmd using:
dmd = ZenScriptBase(connect=True, noopts=True).dmd
Help appreciated...
Charles
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67824#67824]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
"using d.collectDevice() and d.DeviceLoader.loadDevice() pollutes STDERR"
To view the discussion, visit: http://community.zenoss.org/message/67824#67824
--------------------------------------------------------------
Hi,
I'm developing a script to sync Zenoss (Core 3.2.1) from a tech-CMDB. It is working quite well, but I have some anger with the zendmd commands collectDevice() and DeviceLoader.loadDevice(). They pollute STDERR of my script with all sorts of info messages like :
INFO:zen.Device:device name 'xxx' for ip '10.19.30.9'
INFO:zen.Device:xxx's IP address has been set to 10.19.30.9.
INFO:zen.Device:setting tag to ''
INFO:zen.Device:setting serialNumber to ''
or
INFO:zen.Utils:Executing command: /opt/zenoss/zenoss/bin/zenmodeler run --now --monitor localhost -F -d xxx
2012-08-14 17:05:25,606 INFO zen.ZenModeler: Connecting to localhost:8789
2012-08-14 17:05:25,614 INFO zen.ZenModeler: Connected to ZenHub
2012-08-14 17:05:25,688 INFO zen.ZenModeler: Collecting for device xxx
What I see is that the zenoss scripts behind these API calls both use log.info() call, but I can't figure how to avoid this to propagate up to my STDERR console.
My own script has this :
logger.propagate = False
but I still get the "pollution" from the above API calls.
I get the dmd using:
dmd = ZenScriptBase(connect=True, noopts=True).dmd
Help appreciated...
Charles
--------------------------------------------------------------
Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/67824#67824]
Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]