check_xml2snmp.pl
This is a plugin Translate a XML file to snmp request monitored SNMP and return code
Usage:
./check_xml2snmp.pl [-v] -H  -C  [-2] | (-l login -x passwd)  [-P ] -F  -T status|bw|error [-t ] [-V] [-u ] --type-secondaryOptions:
| Flag | Description | ||||||
|---|---|---|---|---|---|---|---|
| -v, --verbose | print extra debugging information | ||||||
| -h, --help | print this help message | ||||||
| -H, --hostname=HOST | name or IP address of host to check | ||||||
| -C, --community=COMMUNITY NAME | community name for the host's SNMP agent (implies v 1 protocol) | ||||||
| -2, --v2c | use SNMP v2 (instead of SNMP v1) | ||||||
| -P, --port=PORT | SNMPd port (Default 161) | ||||||
| -t, --timeout=INTEGER | timeout for SNMP in seconds (Default: 5) | ||||||
| -V, --version | prints version number | ||||||
| -F, --file XML data | |||||||
| -T, --type=status|bw|error | This allows to use pre-defined system type Currently support systems types are: 
 | ||||||
| --value-secondary | --value-secondary give select interface and bandwith off interface variable : 
 | ||||||
| separator off each variable (:) | separator off each group variable (,) | 
--value-secondary if="FastEthernet0/1":maxbw=4Mb,if="FastEthernet0/5":maxbw=2Mb--value-secondary if="FastEthernet0/1",if="FastEthernet0/5"check_xml2snmp.pl -F interface-2.xml -H xx.xx.xx.xx -C *********** --show
 ---------Describ Interface : Index Interface---------
 : FastEthernet0/0 : index : 1
 : FastEthernet0/1 : index : 2
 : Null0 : index : 3
 : Tunnel0 : index : 4
 : Tunnel1 : index : 5
 : Tunnel2 : index : 6
 : NVI0 : index : 7
 : Tunnel3 : index : 8
 : Tunnel4 : index : 9
 : Tunnel5 : index : 10
 : Tunnel6 : index : 11
 : Tunnel7 : index : 12
 : Loopback0 : index : 13
 : Tunnel8 : index : 14
 : Tunnel9 : index : 15
 : Loopback1 : index : 16
 : Tunnel10 : index : 17
 : FastEthernet0/0/0 : index : 20
 : FastEthernet0/0/1 : index : 21
 : FastEthernet0/0/2 : index : 22
 : FastEthernet0/0/3 : index : 23
 : Vlan1 : index : 24
 : Vlan90 : index : 25
 : Vlan81 : index : 26
 : Tunnel11 : index : 27
 : Tunnel12 : index : 29check_xml2snmp.pl -F interface-2.xml -H **.**.**.** -C *********** -T status --value-secondary if=FastEthernet0/1
OK OK ifOperStatus FastEthernet0/0  - ifOperStatus FastEthernet0/0  = 1 up,  |ifOperStatus(FastEthernet0/0)=1check_xml2snmp.pl -F equallogic.xml -2 -H **.**.**.** -C ************ -T power --value-secondary idlike=1.1215703825
 OK OK PowerSupplyCurrentState Power Cooling Module 0  - PowerSupplyCurrentState Power Cooling Module 0  = 1 normal,  OK PowerSupplyCurrentState Power Cooling Module 1  - PowerSupplyCurrentState Power Cooling Module 1  = 1 normal,  |PowerSupplyCurrentState(Power Cooling Module 0)=1 PowerSupplyCurrentState(Power Cooling Module 1)=1