PDA

View Full Version : Generating network templates with MRTG


tof233
08-12-2010, 10:25
Hello,
I just created this php script to automatically generate templates for Network equipements using snmp:

This script was created to automatically generate templates of network equipments for Zabbix.

To use it, you first need to install php-cli (or php5-cli) and MRTG.

USAGE:
In a shell:
# cd /path/to/php/script
# php Generate_network_template.php Equipment_IP Equipment_Community Equipment_Name
Now you just need to import the generated xml file into Zabbix

I tested it on a Cisco Catalyst 4500 and a Juniper SSG 320M

I hope this could help some users.

fmrapid
08-12-2010, 20:49
Very interesting idea.

I was actually toying with the idea of migrating or converting genDevConfig to output Zabbix XML instead of Cricket XML-ish format.

The idea is to use a framework on which intelligence can be added and templates can be re-used.

configmaker is a venerable tool that has a lot of templates built for it. Cool stuff.

One key piece missing from Zabbix, is that a lot of information generated by external scripts cannot be used! Only data field associated with the item is the description everything else is related to processing (formulas, protocols, data types, etc.).

Where is the meta data associated with the item, data to be stored such as:


Item related info
custom keywords
hardware information
software information
links to external html


Basic stuff that Cricket and MRTG and other monitoring systems figured out long ago.

Items should have a number of associated text fields and/or html fields. These fields, including the item descriptions should be populated/updated by scripts through discovery or scripts using the API outside of Zabbix itself.

If the description field can accommodate all this information, then tell me how, otherwise, add additional fields in the database for item related descriptive data(meta-data).

Cheers,

fmrapid