Manoj,

I found the source of this problem, the SNMP V2 GET was not handling the
multi-line description in sysDescr.0 correctly.

To fix that apply the attached patch.

This only will happen to people trying to monitor a CatOS box with SNMPv2.

Javier

Manoj Khabe wrote:
> Hi Javier,
> Please find the snmpwalk output for requested OIDs,
> attached as zip file.
> 
> thanks,
> Manoj.
> --- Javier Szyszlican <[EMAIL PROTECTED]> wrote:
> 
> 
>>Hi Manoj.
>>
>>I need the WALKs for this OIDs:
>>
>>.1.3.6.1.2.1.1
>>.1.3.6.1.2.1.2
>>.1.3.6.1.4.1.9.5.1.4.1
>>
>>Javier
>>
>>

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Javier Szyszlican, Project Leader, JFFNMS
[EMAIL PROTECTED]

I hope JFFNMS or I were helpful to you, if you
can, please donate at http://jffnms.org/donate

diff -Nru -x'*.png' -x'*.ini' -x'*.*sql' -x'*.patch' 
jffnms-0.8.1/lib/api.network.inc.php 
jffnms-devel-2005-03-24/lib/api.network.inc.php
--- jffnms-0.8.1/lib/api.network.inc.php        2005-03-07 16:14:54.000000000 
-0300
+++ jffnms-devel-2005-03-24/lib/api.network.inc.php     2005-03-24 
14:42:49.592800920 -0300
@@ -91,7 +91,7 @@
 
        //logger ("Command ".$func."\n");
        @exec($func, $result, $aux);
-       
+
        if ((count($result)==1) && 
            (preg_match("/No Such (Object|Instance)/i", current($result)) ||
             preg_match("/No more variables left/i", current($result))))
@@ -99,7 +99,7 @@
 
        else {
        
-           if ($p["action"]=="get") $result = current($result);
+           if ($p["action"]=="get") $result = join("\n",$result);
 
            if ($p["include_oid"])
                foreach ($result as $key=>$aux) {
@@ -153,6 +153,7 @@
        //BUGFIXES FOR NET-SNMP 5
        $value=preg_replace("/INTEGER: /","",$value);
        
+       if (preg_match("/^\"(\S.+)\"$/",$value,$parts)) $value = $parts[1];
        if (preg_match("/STRING: \"(\S.+)\"/",$value,$parts)) $value = 
$parts[1];
        $value=preg_replace("/STRING: /","",$value);
 

Reply via email to