[ previous ] [ next ] [ threads ]
 
 From:  "Mohammed Ismail" <m dot ismael at gmail dot com>
 To:  "'Adam Armstrong'" <lists at memetic dot org>
 Cc:  <m0n0wall at lists dot m0n0 dot ch>
 Subject:  RE: [m0n0wall] ng0 snmp could not read interface
 Date:  Mon, 4 May 2009 19:19:05 +0300
This is the output when I followed the instruction, 
xx.xxx.com
Interfaces : -m: not found
*-----
IP Addresses : .!.
IPv6 Addresses :
Temperatures :

Then I changed In /discovery/interfaces.php 
$cmd  = $config['snmpbulkwalk'] . " -m IF-MIB -O nsq -" . $device['snmpver']
. " -c " . $device['community'] . " " .
$device['hostname'].":".$device['port'];

######<<< made it >>> 'snmpwalk'
 
$cmd  = $config['snmpwalk'] . " -m IF-MIB -O nsq -" . $device['snmpver'] . "
-c " . $device['community'] . " " . $device['hostname'].":".$device['port'];
##
Now it is reading lo0, enc0 but no ng at all
Also I added the new config like and put # in front of old $config['bad_if']
And the output is like 
xx.xxx.com
Interfaces : ++++X
IP Addresses : +A!.
IPv6 Addresses :
Temperatures :
##
Polling xx.xxx.com ( device_id 8 )

Pings : yes :)
SNMP : yes :)
Polling temperatures
Polling device network statistics...
Polling interfaces
Looking at xl0 on xx.xxx.com
Looking at xl1 on xx.xxx.com
Looking at lo0 on xx.xxx.com
Looking at enc0 on xx.xxx.com


Then I removed leading # in /discovery/interfaces.php
    if($config['ifdescr'][$device['os']]) {
      $ifDescr = shell_exec($config['snmpget'] . " -O qv -" .
$device['snmpver'] . " -c " . $device['community'] . " " .
$device['hostname'].":".$device['port'] . " ifDescr.$ifIndex");
      $ifDescr = str_replace("No Such Object available on this agent at this
OID", "", $ifDescr);
      $ifDescr = str_replace("No Such Instance currently exists at this
OID", "", $ifDescr);
      $ifDescr = trim(str_replace("\"", "", $ifDescr));
    } else { $ifDescr = trim(str_replace("\"", "", $ifName)); }

It started to read all virtual interfaces including ng0-ng253 I guess 
Suddenly I got 411 interfaces instead of 77 I had before. Reading 14
m0n0wall.
,, 
I am sorry I don't understand php codes, but I really need the ng0 interface
so bad, so I can receive logs each under it's m0n0wall.
As logs are being sent through ng0 IP address.

Best Regards, and thanks for help,
Mohammed Ismail.

Observer 0.5.0
M0n0wall 1.3b11, 1.3b13 , 1.3b16

----Original Message-----
From: Adam Armstrong [mailto:lists at memetic dot org] 
Sent: Monday, May 04, 2009 1:35 AM
To: Mohammed Ismail
Cc: m0n0wall at lists dot m0n0 dot ch; manuel at m0n0 dot ch
Subject: Re: [m0n0wall] ng0 snmp could not read interface

Hi,

There was a hard-coded regular expression matching /ng[0-9]/, which I've 
removed and replaced with an array-driven regexp matcher.

Please replace your includes/discovery/interfaces.php with :

http://www.observernms.org/svn/observer/trunk/includes/discovery/interfaces.
php

Please also add :

$config['bad_if_regexp'] = array("/serial[0-9]:/");

To your config.php. You can add/remove entries from thsi array and 
they'll be matched like the existing bad_if array (albiet more slowly).

I've tested it on my m0n0wall and it works ok :

jersey.memetic.org
Interfaces : .....+.
IP Addresses : ...S+
IPv6 Addresses :
Temperatures :

You can see it on the demo : 
http://demo.observernms.org/device/2/ports/details/ (login demo/demo)

I notice that there are no IPv6 addresses being reported by m0n0 
(atleast with 1.3b15 on the test device). Does the snmpd need recompiled 
with --use-ipv6 or something?

Thanks,
adam.