TECHZEN Zenoss User Community ARCHIVE  

Change interface description

Subject: Change interface description
Author: [Not Specified]
Posted: 2015-09-17 07:33

How do I change the description field in Infrastructure>Devices>Components>Interfaces



Subject: You can do this with the API
Author: [Not Specified]
Posted: 2015-09-17 08:05

You can do this with the API DeviceRouter setInfo method. If you haven't worked with it, start here: http://wiki.zenoss.org/Working_with_the_JSON_API

Get the uids of the interfaces:

zenoss_api device_router DeviceRouter getComponents '{"uid":"/zport/dmd/Devices/Server/Windows/devices/SERVER","meta_type":"IpInterface","keys":["uid"]}'

Set the description on a given interface:

zenoss_api device_router DeviceRouter setInfo '{"uid":"/zport/dmd/Devices/Server/Windows/devices/SERVER/os/interfaces/VMware Accelerated AMD PCNet Adapter","description":"test"}'



Subject: It does seem like something
Author: [Not Specified]
Posted: 2015-09-17 08:19

It does seem like something that should be possible thru the UI but I don't see that it is. There's other ways. I'm sure someone will come along and post a Python-zendmd method for setting the Description field but it won't be any less complicated. Personally I am not comfortable using the zendmd for "write" operations to the database...

The JSON API looks complex if you haven't delved into it but if you support Zenoss in your org, getting familiar with the API will be a big timesaver down the road. The examples look gross and they are but the power is combining those methods into more useful scripts. I've posted a bunch of Perl scripts using the API on my github, https://github.com/dpirmann/zenosstools ... but I don't have one prepared to set the interface description.

Dave



Subject: Thanks again! I just didnt
Author: [Not Specified]
Posted: 2015-09-17 09:08

Thanks again! I just didnt know if I was missing something obvious. I setup Zenoss to monitor a SCADA systems network components, and send email alerts. I am not a network admin or anything like that, just a computer geek from way back. I am impressed with the power and functionality of Zenoss, but there is a lot to learn! Thanks for the link to your git- I will check it out when I have some time.



< Previous
Check multiple urls with a single device
  Next
Setup e-mail
>