I simply can not use the gentemplate.pl .
I want to create a template for the switches based on the MIB - II since there from where I get the owner and not the manufacturer gives me the information . As I understand the script , if not set the OID starts where the tree owner he would take all the standard MIB infomações .
In the wiki ( https://www.zabbix.com/wiki/scripts/gentemplate.pl ) the explanation is simple and straightforward , but it does not find the OIDs and only adds an item and nothing icmp monitoring SNMP.
How am I using ?
I created a file snmp_switch with content:
"snmpwalk -v2c -cpublic $IP_ADDRESS"
And then ran the script with the file created:
"./gentemplate.pl snmp_switch"
Face it no longer meets the sysName and asks me to enter it
"sysName.0 was not found, enter system name:"
After I enter and confirm it apparently worked beauty:
"Making items...
Making graphs...
Doing interface graphs and triggers"
Only by checking the output file snmp_switch.xml he just generated the item / trigger icmpping the template.
Content generated xml template :
"<?xml version="1.0"?>
<zabbix_export version="1.0" date="27.04.09" time="14.23">
<hosts>
<host name="Template_TESTE">
<useip>0</useip>
<dns></dns>
<ip>0.0.0.0</ip>
<port>10050</port>
<status>3</status>
<groups>
<group>Templates</group>
</groups>
<items>
<item type="3" key="icmpping" value_type="3">
<description>ping</description>
<ipmi_sensor></ipmi_sensor>
<delay>300</delay>
<history>7</history>
<trends>365</trends>
<status>0</status>
<units></units>
<multiplier>0</multiplier>
<delta>0</delta>
<formula></formula>
<lastlogsize>0</lastlogsize>
<logtimefmt></logtimefmt>
<delay_flex></delay_flex>
<params></params>
<trapper_hosts></trapper_hosts>
<snmp_community></snmp_community>
<snmp_oid></snmp_oid>
<snmp_port>161</snmp_port>
<snmpv3_securityname></snmpv3_securityname>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase></snmpv3_authpassphrase>
<snmpv3_privpassphrase></snmpv3_privpassphrase>
</item>
</items>
<triggers>
<trigger>
<description>Host unreachable</description>
<type>0</type>
<expression>{{HOSTNAME}:icmpping.last(0)}#1</expressio
n>
<url></url>
<status>0</status>
<priority>1</priority>
<comments>Host unreachable</comments>
</trigger>
</triggers>
<graphs>
</graphs>
</host>
</hosts>
</zabbix_export>"
If someone has already used successfully can give me a help would be grateful.
Pardon the bad English, google translate.
I want to create a template for the switches based on the MIB - II since there from where I get the owner and not the manufacturer gives me the information . As I understand the script , if not set the OID starts where the tree owner he would take all the standard MIB infomações .
In the wiki ( https://www.zabbix.com/wiki/scripts/gentemplate.pl ) the explanation is simple and straightforward , but it does not find the OIDs and only adds an item and nothing icmp monitoring SNMP.
How am I using ?
I created a file snmp_switch with content:
"snmpwalk -v2c -cpublic $IP_ADDRESS"
And then ran the script with the file created:
"./gentemplate.pl snmp_switch"
Face it no longer meets the sysName and asks me to enter it
"sysName.0 was not found, enter system name:"
After I enter and confirm it apparently worked beauty:
"Making items...
Making graphs...
Doing interface graphs and triggers"
Only by checking the output file snmp_switch.xml he just generated the item / trigger icmpping the template.
Content generated xml template :
"<?xml version="1.0"?>
<zabbix_export version="1.0" date="27.04.09" time="14.23">
<hosts>
<host name="Template_TESTE">
<useip>0</useip>
<dns></dns>
<ip>0.0.0.0</ip>
<port>10050</port>
<status>3</status>
<groups>
<group>Templates</group>
</groups>
<items>
<item type="3" key="icmpping" value_type="3">
<description>ping</description>
<ipmi_sensor></ipmi_sensor>
<delay>300</delay>
<history>7</history>
<trends>365</trends>
<status>0</status>
<units></units>
<multiplier>0</multiplier>
<delta>0</delta>
<formula></formula>
<lastlogsize>0</lastlogsize>
<logtimefmt></logtimefmt>
<delay_flex></delay_flex>
<params></params>
<trapper_hosts></trapper_hosts>
<snmp_community></snmp_community>
<snmp_oid></snmp_oid>
<snmp_port>161</snmp_port>
<snmpv3_securityname></snmpv3_securityname>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authpassphrase></snmpv3_authpassphrase>
<snmpv3_privpassphrase></snmpv3_privpassphrase>
</item>
</items>
<triggers>
<trigger>
<description>Host unreachable</description>
<type>0</type>
<expression>{{HOSTNAME}:icmpping.last(0)}#1</expressio
n>
<url></url>
<status>0</status>
<priority>1</priority>
<comments>Host unreachable</comments>
</trigger>
</triggers>
<graphs>
</graphs>
</host>
</hosts>
</zabbix_export>"
If someone has already used successfully can give me a help would be grateful.
Pardon the bad English, google translate.
Comment