![]() |
![]() |
Subject: | How to add networks programmatically in Zenoss via command line using REST curl or zendmd script |
Author: | Ken Jenkins |
Posted: | 2015-02-23 12:47 |
While I can manually add networks using the Zenoss portal, I need the ability to script adding networks in Zenoss Core 4.2.5.
Zenoss Portal
Infrastructure - Networks -
+ (Add network/mask)
+ (Add network/mask)
Please note that within a /24 network there may be many sub-networks /29, /27, /25, etc.
10.10.10.0/24 -
10.10.10.1/27
10.10.10.33/27
10.10.10.97/29
10.10.10.129/25
10.10.10.65/27
How can I add networks using REST curl or a zendmd script
Help is appreciated.
Thank you,
Ken
Subject: | zendmd POC: |
Author: | Jan Garaj |
Posted: | 2015-02-23 15:33 |
zendmd POC:
# list current networks
dmd.Networks.objectIds(spec="IpNetwork")
dmd.Networks.addIpAddress('10.10.10.0',24)
commit()
#maybe also reindex()
#dmd.Networks.reIndex()
# list current networks
dmd.Networks.objectIds(spec="IpNetwork")
# can be useful for IpRealms
dmd.Networks.getTreeItems()
Devops Monitoring Expert advice:
Dockerize/automate/monitor all the things.
DevOps stack:
Docker / Kubernetes / Mesos / Zabbix / Zenoss / Grafana / Puppet / Ansible / Vagrant / Terraform /
Elasticsearch
< |
Previous Help me with graphs zenoss 4.2.5 and centos 6.5 |
Next How can I change the value of a property for a device class? |
> |