Then you can say:$info{$hostkey}{$if}{if_name} = &get_snmp("$Cisco.$IfName.$if"); $info{$hostkey}{$if}{hw_type} = &get_snmp("$Cisco.$IfHwType.$if"); $info{$hostkey}{$if}{if_desc} = &get_snmp("$Generic.$ifDesc.$if"); $info{$hostkey}{$if}{if_speed} = &get_snmp("$Generic.$ifSpeed.$if"); $info{$hostkey}{$if}{bw_in} = &get_snmp("$Cisco.$IfInBitSec.$if"); $info{$hostkey}{$if}{bw_out} = &get_snmp("$Cisco.$IfOutBitSec.$if"); $info{$hostkey}{$if}{if_lineprot} = &get_snmp("$Cisco.$LineProto.$if") +; $info{$hostkey}{$if}{vm_Vlan} = &get_snmp("$Specific.$vmvlan.$if");
use CGI; $q = new CGI; print $q->start_table(); for ( keys %{ $info{$hostkey}{$if} } ) { print $q->Tr([$q->td([$_, $info{$hostkey}{$if}{$_}])]) . "\n"; } print end_table();
print "<table>\n"; for ( keys %{ $info{$hostkey}{$if} } ) { print "<tr><td>$_</td><td>$info{$hostkey}{$if}{$_}</td></tr>\n" } print "</table>"
In reply to Re: Generating HTML from SNMP data
by bobn
in thread Generating HTML from SNMP data
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |