Location: PHPKode > projects > LSMS SNMP to MRTG toolset > www/snmpmrtg/ip-snmpsummary.php
<?php
// (C)Copyright John Baker 2004/2005/2006
//
// This file is part of lsms2mrtg.
//
// lsms2mrtg is free software;you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation;either version 2 of the License, or
// (at your option) any later version.
//
// lsms2mrtg is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY;without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with lsms2mrtg;if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// For more informationn please visit http://gnulsms2mrtg.sourceforge.net/
include 'generic.inc';
include 'jbsnmplib.inc';
echo $htmlheader;
echo "<HTML><title>TCP, UDP, IP & SNMP Summary Page</title>";
error_reporting(0);

$runallot=isallot($host,$community);
$runfortinet=isfortinet($host,$community);

if (snmpget($host,$community, "system.sysObjectID.0")) {
}
else {
    exit("Could not get snmp to ".$community."@".$host."<BR>Please check the host and community");
}
echo "<font size=+2 color=$globaltitlecolour><B>TCP, UDP, IP & SNMP Summary Page for ".$host."</b></font>";
echo "<HR><BR>";

if ($runallot==0) {
echo "<font size=+2><u>IP Summary</u></font><BR>";
echo "<table border=1 cellpadding=0 bgcolor=$gentablebg bordercolor=$gentableborder class=\"framelook\" >";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>IP Forwarding Status</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getipForwarding($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>IP datagrams received</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getipInReceives($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>IP datagram requests</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getipOutRequests($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>IP datagrams IN discarded</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getipInDiscards($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>IP datagram OUT discarded</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getipOutDiscards($host,$community));
echo "</TD></TR>";
echo "</table>";
echo "<BR><BR><font size=+2><u>TCP Summary</u></font><BR>";
echo "<table border=1 cellpadding=0 bgcolor=$gentablebg bordercolor=$gentableborder class=\"framelook\" >";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP retransmitting algorithm</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpalgo($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Min Retransmitting Timeout</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpmintimeout($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Max Retransmitting Timeout</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpmaxtimeout($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Active Opens</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpActiveOpens($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Passive Opens.</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpPassiveOpens($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Attempt Fails</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpAttemptFails($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Established Resets.</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpEstabResets($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Current Established</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpCurrEstab($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Segments Received</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpInSegs($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Segments Sent</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpOutSegs($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>TCP Segments Retransmitted</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (gettcpRetransSegs($host,$community));
echo "</TD></TR>";
echo "</table>";
echo "<BR><BR><font size=+2><u>UDP Summary</u></font><BR>";
echo "<table border=1 cellpadding=0 bgcolor=$gentablebg bordercolor=$gentableborder class=\"framelook\" >";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>UDP datagrams delivered</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getudpInDatagrams($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>UDP datagrams sent</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getudpOutDatagrams($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>UDP datagrams received with no response from port</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getudpNoPorts($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>UDP datagrams received with Errors</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getudpInErrors($host,$community));
echo "</TD></TR>";
echo "</table>";
echo "<BR>";}

if ($runfortinet==0) {
echo "<BR><font size=+2><u>SNMP Summary</u></font><BR>";
echo "<table border=1 cellpadding=0 bgcolor=$gentablebg bordercolor=$gentableborder class=\"framelook\" >";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>SNMP Messages In</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getsnmpInPkts($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>SNMP Messages Out</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getsnmpOutPkts($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>SNMP Message version that were unsupported</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getsnmpInBadVersions($host,$community));
echo "</TD></TR>";
echo "<TR><TD class=\"celllook\" ><font color=$gentabletext>SNMP Messages delivered with unknow community</TD><TD align=right class=\"celllook\" ><font color=$gentabletext>";
echo (getsnmpInBadCommunityNames($host,$community));
echo "</TD></TR>";
echo "</table>";}
echo "<BR>";
jsrefresh();
?>
Return current item: LSMS SNMP to MRTG toolset