I need dynamic items, triggers and graphs for monitoring different network equipment. For example: I need print Port Description in the title of graphs. Port Description is changing during the time.
My algorithm is working as following:
perl script is pooling SNMP requests on network device one time per day and creates XML configuration file for each device. After that script is importing new configuration file to Zabbix server via command-line Import/Export facility. Due to this process I have actual Port Description in graphs any time.
Dear visitors of a forum, please vote for this facility
command-line import/export facility
In the appendix an example of a script to create XML configuration file for monitoring Cisco Router and Cisco Catalyst
Example:
./cisco_xml.pl Hostname HostIP 75 5 public 5 lab-cisco
P.S. Required Perl Lib Net-SNMP (example Net-SNMP-5.2.0 http://backpan.perl.org/authors/id/D/DT/DTOWN/)
You can:
1) Configure SNMP on switch or router
XXXXXXX - SNMP community
Example:
snmp-server community XXXXXXX RO 1
access-list 1 permit 10.0.2.0 0.0.0.255
access-list 1 deny any
On Zabbix Server
2) check SNMP configuration on device
HostIP - IP of you device
XXXXXXX - SNMP community
Example:
snmpwalk -v 2c -c XXXXXXX HostIP .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifIndex.5 = INTEGER: 5
IF-MIB::ifIndex.6 = INTEGER: 6
IF-MIB::ifIndex.7 = INTEGER: 7
IF-MIB::ifIndex.8 = INTEGER: 8
IF-MIB::ifIndex.9 = INTEGER: 9
IF-MIB::ifIndex.10 = INTEGER: 10
IF-MIB::ifIndex.11 = INTEGER: 11
IF-MIB::ifIndex.12 = INTEGER: 12
IF-MIB::ifIndex.13 = INTEGER: 13
IF-MIB::ifIndex.14 = INTEGER: 14
IF-MIB::ifIndex.15 = INTEGER: 15
IF-MIB::ifIndex.16 = INTEGER: 16
IF-MIB::ifIndex.17 = INTEGER: 17
IF-MIB::ifIndex.18 = INTEGER: 18
IF-MIB::ifIndex.19 = INTEGER: 19
IF-MIB::ifIndex.20 = INTEGER: 20
IF-MIB::ifIndex.21 = INTEGER: 21
IF-MIB::ifIndex.22 = INTEGER: 22
IF-MIB::ifIndex.23 = INTEGER: 23
IF-MIB::ifIndex.24 = INTEGER: 24
IF-MIB::ifIndex.25 = INTEGER: 25
IF-MIB::ifIndex.26 = INTEGER: 26
IF-MIB::ifIndex.27 = INTEGER: 27
IF-MIB::ifIndex.28 = INTEGER: 28
IF-MIB::ifIndex.29 = INTEGER: 29
IF-MIB::ifIndex.30 = INTEGER: 30
IF-MIB::ifIndex.31 = INTEGER: 31
IF-MIB::ifIndex.32 = INTEGER: 32
IF-MIB::ifIndex.33 = INTEGER: 33
IF-MIB::ifIndex.34 = INTEGER: 34
IF-MIB::ifIndex.35 = INTEGER: 35
IF-MIB::ifIndex.36 = INTEGER: 36
IF-MIB::ifIndex.37 = INTEGER: 37
3) run script (For Script Required Perl Lib Net-SNMP (example Net-SNMP-5.2.0 http://backpan.perl.org/authors/id/D/DT/DTOWN/)
./cisco_xml.pl Hostname HostIP 75 5 public 5 lab-cisco
Where
Hostname - Name of you device
HostIP - IP of you device
public - SNMP community
lab-cisco - Zabbix Group for device (group must exist in Zabbix)
4) Import xml file Template_Hostname.xml into Zabbix
If you see error in Apache log:
Fatal error: require_once() [function.require]: Failed opening required 'include/classes/class.domdocument.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/zabbix/include/config.inc.php on line 70
Check PHP module
I install:
php-gd
php-pear
php
php-bcmath
php-mysql
php-pdo
php-xml
php-mbstring
In some php builds it is required also php-dom module
5) Create host Hostname and link it with Template_Hostname
Latest versions of script
My algorithm is working as following:
perl script is pooling SNMP requests on network device one time per day and creates XML configuration file for each device. After that script is importing new configuration file to Zabbix server via command-line Import/Export facility. Due to this process I have actual Port Description in graphs any time.
Dear visitors of a forum, please vote for this facility
command-line import/export facility
In the appendix an example of a script to create XML configuration file for monitoring Cisco Router and Cisco Catalyst
Example:
./cisco_xml.pl Hostname HostIP 75 5 public 5 lab-cisco
P.S. Required Perl Lib Net-SNMP (example Net-SNMP-5.2.0 http://backpan.perl.org/authors/id/D/DT/DTOWN/)
You can:
1) Configure SNMP on switch or router
XXXXXXX - SNMP community
Example:
snmp-server community XXXXXXX RO 1
access-list 1 permit 10.0.2.0 0.0.0.255
access-list 1 deny any
On Zabbix Server
2) check SNMP configuration on device
HostIP - IP of you device
XXXXXXX - SNMP community
Example:
snmpwalk -v 2c -c XXXXXXX HostIP .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifIndex.5 = INTEGER: 5
IF-MIB::ifIndex.6 = INTEGER: 6
IF-MIB::ifIndex.7 = INTEGER: 7
IF-MIB::ifIndex.8 = INTEGER: 8
IF-MIB::ifIndex.9 = INTEGER: 9
IF-MIB::ifIndex.10 = INTEGER: 10
IF-MIB::ifIndex.11 = INTEGER: 11
IF-MIB::ifIndex.12 = INTEGER: 12
IF-MIB::ifIndex.13 = INTEGER: 13
IF-MIB::ifIndex.14 = INTEGER: 14
IF-MIB::ifIndex.15 = INTEGER: 15
IF-MIB::ifIndex.16 = INTEGER: 16
IF-MIB::ifIndex.17 = INTEGER: 17
IF-MIB::ifIndex.18 = INTEGER: 18
IF-MIB::ifIndex.19 = INTEGER: 19
IF-MIB::ifIndex.20 = INTEGER: 20
IF-MIB::ifIndex.21 = INTEGER: 21
IF-MIB::ifIndex.22 = INTEGER: 22
IF-MIB::ifIndex.23 = INTEGER: 23
IF-MIB::ifIndex.24 = INTEGER: 24
IF-MIB::ifIndex.25 = INTEGER: 25
IF-MIB::ifIndex.26 = INTEGER: 26
IF-MIB::ifIndex.27 = INTEGER: 27
IF-MIB::ifIndex.28 = INTEGER: 28
IF-MIB::ifIndex.29 = INTEGER: 29
IF-MIB::ifIndex.30 = INTEGER: 30
IF-MIB::ifIndex.31 = INTEGER: 31
IF-MIB::ifIndex.32 = INTEGER: 32
IF-MIB::ifIndex.33 = INTEGER: 33
IF-MIB::ifIndex.34 = INTEGER: 34
IF-MIB::ifIndex.35 = INTEGER: 35
IF-MIB::ifIndex.36 = INTEGER: 36
IF-MIB::ifIndex.37 = INTEGER: 37
3) run script (For Script Required Perl Lib Net-SNMP (example Net-SNMP-5.2.0 http://backpan.perl.org/authors/id/D/DT/DTOWN/)
./cisco_xml.pl Hostname HostIP 75 5 public 5 lab-cisco
Where
Hostname - Name of you device
HostIP - IP of you device
public - SNMP community
lab-cisco - Zabbix Group for device (group must exist in Zabbix)
4) Import xml file Template_Hostname.xml into Zabbix
If you see error in Apache log:
Fatal error: require_once() [function.require]: Failed opening required 'include/classes/class.domdocument.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/zabbix/include/config.inc.php on line 70
Check PHP module
I install:
php-gd
php-pear
php
php-bcmath
php-mysql
php-pdo
php-xml
php-mbstring
In some php builds it is required also php-dom module
5) Create host Hostname and link it with Template_Hostname
Latest versions of script

Comment