I use this script to generate a template for switch like devices. It isn't elegant, but it does the job! After you run it make sure output has .xml extension then just import the file. This template says for a "Template_Brocade_5300", so if you want to change it to something else then just search and replace all the "Template_Brocade_5300" strings with whatever you want to call it. Good luck #!/bin/sh # script to build snmp config for Zabbix echo "Please fill in the following" read -p "SNMP Community string? " SNMP read -p "How many ports? " COUNT read -p "Port SNMP starting number? " ID read -p "Output filename? " OUTPUT PORT="00" GPORT="00" GCOUNT=$COUNT GID=$ID # create the base of the file echo -en " \t \t\t \t\t\t1 \t\t\t \t\t\t0.0.0.0 \t\t\t10050 \t\t\t3 \t\t\t \t\t\t\tTemplates \t\t\t " > $OUTPUT #Generate the items portion # interface description, octets in, octets out, operational status and speed echo -en "\t\t\t " >>$OUTPUT while [ $PORT -lt $COUNT ] ; do echo -en "\t\t\t\t \t\t\t\t\tPort $(printf "%02.2d" $PORT) description \t\t\t\t\t \t\t\t\t\t600 \t\t\t\t\t35 \t\t\t\t\t0 \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t0 \t\t\t\t\t0 \t\t\t\t\t1 \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t$SNMP \t\t\t\t\tIF-MIB::ifDescr.$ID \t\t\t\t\t161 \t\t\t\t\t \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t\t \t\t\t\t\t \t\t\t\t \t\t\t\t \t\t\t\t\tPort $(printf "%02.2d" $PORT) data in \t\t\t\t\t \t\t\t\t\t60 \t\t\t\t\t35 \t\t\t\t\t365 \t\t\t\t\t0 \t\t\t\t\tbps \t\t\t\t\t1 \t\t\t\t\t1 \t\t\t\t\t0.125 \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t$SNMP \t\t\t\t\tIF-MIB::ifInOctets.$ID \t\t\t\t\t161 \t\t\t\t\t \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t\t \t\t\t\t\t \t\t\t\t \t\t\t\t \t\t\t\t\tPort $(printf "%02.2d" $PORT) operationsal status \t\t\t\t\t \t\t\t\t\t60 \t\t\t\t\t35 \t\t\t\t\t365 \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t0 \t\t\t\t\t0 \t\t\t\t\t1 \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t$SNMP \t\t\t\t\tIF-MIB::ifOperStatus.$ID \t\t\t\t\t161 \t\t\t\t\t \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t\t \t\t\t\t\t \t\t\t\t \t\t\t\t \t\t\t\t\tPort $(printf "%02.2d" $PORT) data out \t\t\t\t\t \t\t\t\t\t60 \t\t\t\t\t35 \t\t\t\t\t365 \t\t\t\t\t0 \t\t\t\t\tbps \t\t\t\t\t1 \t\t\t\t\t1 \t\t\t\t\t0.125 \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t$SNMP \t\t\t\t\tIF-MIB::ifOutOctets.$ID \t\t\t\t\t161 \t\t\t\t\t \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t\t \t\t\t\t\t \t\t\t\t \t\t\t\t \t\t\t\t\tPort $(printf "%02.2d" $PORT) speed \t\t\t\t\t \t\t\t\t\t600 \t\t\t\t\t35 \t\t\t\t\t365 \t\t\t\t\t0 \t\t\t\t\tbps \t\t\t\t\t0 \t\t\t\t\t0 \t\t\t\t\t1 \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t$SNMP \t\t\t\t\tIF-MIB::ifSpeed.$ID \t\t\t\t\t161 \t\t\t\t\t \t\t\t\t\t0 \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t\t \t\t\t\t\t \t\t\t\t " >> $OUTPUT #increment the counters PORT=$[$PORT+1] ID=$[$ID+1] done echo -en "\t\t\t " >>$OUTPUT #Generate the graphs #Interface octets in (Green) and octets out (Blue) echo -en "\t\t\t " >>$OUTPUT while [ $GPORT -lt $GCOUNT ] ; do echo -en "\t\t\t\t \t\t\t\t\t0 \t\t\t\t\t1 \t\t\t\t\t1 \t\t\t\t\t0 \t\t\t\t\t0.0000 \t\t\t\t\t100.0000 \t\t\t\t\t0 \t\t\t\t\t0 \t\t\t\t\t0.0000 \t\t\t\t\t0.0000 \t\t\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t0 \t\t\t\t\t\t\t1 \t\t\t\t\t\t\t009900 \t\t\t\t\t\t\t1 \t\t\t\t\t\t\t2 \t\t\t\t\t\t\t0 \t\t\t\t\t\t\t5 \t\t\t\t\t\t \t\t\t\t\t\t \t\t\t\t\t\t\t0 \t\t\t\t\t\t\t2 \t\t\t\t\t\t\t0000CC \t\t\t\t\t\t\t1 \t\t\t\t\t\t\t2 \t\t\t\t\t\t\t0 \t\t\t\t\t\t\t5 \t\t\t\t\t\t \t\t\t\t\t \t\t\t\t " >>$OUTPUT #increment the counters GPORT=$[$GPORT+1] GID=$[$GID+1] done echo -en "\t\t\t " >>$OUTPUT # create the end of the file echo -en "\t\t \t \t \t " >>$OUTPUT echo "Done!" exit