You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: John S. <jo...@uk...> - 2001-08-27 21:41:42
|
[Cc:ed to mynms-users - Sam, I suggest you subscribe to this list (visit mynms.sourceforge.net) and join the thousands of other happy myNMS users ;-)] ----- Original Message ----- From: Sam Smith <s....@re...> To: <jo...@uk...> Sent: Friday, August 24, 2001 1:16 PM Subject: NMS > Hi John, > > > How does NMS get the mapping of mac address to HP ports out of the HP's? > I know it does an SNMP walk, and pulls the mac addresses out that way, but there > seems to be no obvious mapping to the port names. > > As far as I can tell, there is some information encoded in the dot1dbridge MIB > which may or may not be useful. Do you know if this is documented anywhere (either > in NMS or elsewhere)? from the dot1dbridge MIB you get the mapping of MAC address to ifIndex, and somewhere else (I forget just where) there's a mapping of ifIndex to port names. This works for HP switches but is far from universally implemented, and needs some sort of empirical heuristic (OK, kludge :) to cope with different vendors' ways of doing things. As for documentation the MIBs themselves are self-documenting (at least, the comments in there are as much as I've ever found) and my code is of course <ahem> prolifically commented :-) (Reminds me of a discussion I heard of between a developer and a user where the developer said "the documentation is in the code" and after the user complained they could not find anything said that was a typo and they'd meant to say "the documentation is the code".) hth, -- John Stumbles jo...@uk... http://www.stumbles.org/John +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
|
From: John S. <jo...@uk...> - 2001-06-21 22:13:46
|
Yup, I was thinking that.
ATM the way the config file works you could say something in My_Config.cf
like:
OS # uncomment yours
NAME = Linux
# NAME = Solaris
# NAME = FreeBSD
... etc ...
and include the actual code in the config file:
PING
Solaris {my $ip=shift; `/usr/sbin/ping $ip 1`=~/alive/;}
Linux {my $ip=shift; `/bin/ping -c $ip`=~/(\d) packets received/ or
die; return $1}
(NB that should be tabs not spaces after Solaris and Linux above)
and in the code say
sub ping
{
my $IPadd = shift;
return &{$CONFIG{PING}{ $CONFIG{OS}{NAME} }}($IPadd) ;
}
I haven't tried that and it's late, so that may be horribly wrong ;-)
--
John Stumbles jo...@uk... http://www.stumbles.org/John
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
----- Original Message -----
From: Asher Yanich <aya...@cs...>
To: myNMS mailing list <MyN...@li...>
Sent: Thursday, June 21, 2001 8:20 PM
Subject: [MyNMS-users] resolving some portability issues.
>
> I suggest we either have a config option ARCH for architecture, or we
> decide for ourselves:
>
> $arch = `uname -r`;
>
> Than we have our condition for ping, and groking the process state on
> other architectures.
>
> ~asher
>
>
> _______________________________________________
> MyNMS-users mailing list
> MyN...@li...
> http://lists.sourceforge.net/lists/listinfo/mynms-users
>
|
|
From: Asher Y. <aya...@cs...> - 2001-06-21 19:20:25
|
I suggest we either have a config option ARCH for architecture, or we decide for ourselves: $arch = `uname -r`; Than we have our condition for ping, and groking the process state on other architectures. ~asher |
|
From: Asher Y. <aya...@cs...> - 2001-06-20 16:50:35
|
In moving our mrtg from a linux box to this FreeBSD box that we are going
to use as a network monitor station, I found a really nice shell script
which does pings based on cases.. which could be brought into perl. This
could be brought into the code, or Net::Ping::External could be used,
which basically tries to do the same thing, as a perl module...
#!/bin/sh
case `uname -s` in
Linux) PINGCMD='ping -c 1' ;;
SunOS) PINGCMD='ping' ;;
FreeBSD) PINGCMD='ping -c 1' ;;
esac
if ($PINGCMD $1 > /dev/null 2> /dev/null);then
exit 1
else
exit 0
fi
> Linux
> =====
> (and probably any other Unix except Solaris) in My_Utils.pm we need
> something like this:
> ############################################################################
> ##
> sub ping
> {
> my $devIP = shift or return 1 ;
> my $PING = $CONFIG{PROG}{PING} or die "CONFIG{PROG}{PING} not defined
> in config file";
> # (Linux)ping with 1 second timeout to see if host is up:
> print "$CONFIG{PROG}{PING} $devIP\n";
> `$PING $devIP` =~ /(\d) packets received/
> or die "output of ping was not in expected format (nn packets
> received)" ;
> return $1; # return the number of packets received (i.e. false is
> 0)
> }
> ############################################################################
~asher
|
|
From: John S. <joh...@nt...> - 2001-06-19 23:54:45
|
to summarise email discussions past, here is a summary of issues
The version on sourceforge is actually 1.01 or something like that: I
released a revised version a day or so after the original. I can't remember
atm what that fixed (a thinko of some sort on my part).
Documentation:
==============
in Installation.html under 'WWW sub-directory structure' I should have
mentioned that you've got to create symlinks (could be hard links) from the
various subdirectories for your users' groups (like noc, etc) and from
Query.cgi in your www directory to /usr/local/myNMS/bin/Query
Linux
=====
(and probably any other Unix except Solaris) in My_Utils.pm we need
something like this:
############################################################################
##
sub ping
{
my $devIP = shift or return 1 ;
my $PING = $CONFIG{PROG}{PING} or die "CONFIG{PROG}{PING} not defined
in config file";
# (Linux)ping with 1 second timeout to see if host is up:
print "$CONFIG{PROG}{PING} $devIP\n";
`$PING $devIP` =~ /(\d) packets received/
or die "output of ping was not in expected format (nn packets
received)" ;
return $1; # return the number of packets received (i.e. false is
0)
}
############################################################################
##
SNMP community string
=====================
In SNMP_info, in the subroutine "get_device_snmp_system" you may have to
put:
unless ($SNMP->{sess} ) # have we got an SNMP session handle?
{
return 0 unless $SNMP->{IPadd} ; # must have an IPadd
$SNMP->{sess} = new SNMP::Session ( DestHost => $SNMP->{IPadd}, Community
=> 'public');
#^^^^^^^^^^^^^^^^^^^^
}
or whatever other community string to use (but this ought to be at least
a config parameter, and one might need a scheme for using different
community strings with different hosts).
FreeBSD:
========
There's a problem that Proc::ProcessTable doesn't work for FreeBSD because
"You need access to /dev/kmem to get detailed process information....
scripts using Proc::ProcessTable have to be suid scripts with root and/or
kmem rights" but grokking the output of 'ps' should do the trick.
Perl 5.6
========
if (defined %some_hash)
now produces warnings: doing
if (%some_hash)
seems to be the preferred way. This affects My_DButils.pm. I think a:
perl -pi.bak -e 's/defined \%/%/g;' My_DButils.pm
should fix it.
mySQL
=====
In My_DButils may need to add vars
my $db_user = '' ;
my $db_passwd = '' ;
(or these could be config params)
and after:
my $DB = shift || die "$0: sub DB_init must have name of database to
use\n";
my $data_source = 'dbi:mysql:' . $DB ; # use mySQL
change:
$dbh = DBI->connect($data_source) ;
to:
$dbh = DBI->connect($data_source, $db_user, $db_passwd) ;
sysServices
===========
the devices on our network (at least, the ones I was interested in) had a
failry clean division between sysServices == 2 for switches, 6 for routers.
Apparently Baystack 450s (at least) use the value 3 so all bits of code to
do with dot1d tables especially needs changing. This isn't as simple a
change as those above.
Query
=====
there seems to be an issue with the HOSTS query not working, but we haven't
got to the bottom of this yet.
= = = = = = = = = = = = = =
I will roll these up into a new release when I get A Round Tuit: In the
meantime I hope making these changes to the original will not be too
arduous.
regards,
--
John Stumbles http://www.stumbles.org/John
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
From: John S. <joh...@nt...> - 2001-06-17 23:06:10
|
-- John Stumbles http://www.stumbles.org/John +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |