Pages: [1]   Go Down
Author Topic: SNMP Recon Script  (Read 225 times)
0 Members and 1 Guest are viewing this topic.
gmonk63
Newbie
*

Karma: 0
Offline Offline

Posts: 8


View Profile
« on: November 11, 2011, 07:59:25 PM »

First off just want to say good work... I really like the features and easy of use Pandora FMS provides... I have been slowly getting familiar Pandora FMS 4.0 and was wondering about the SNMP recon script.  The lab I have setup solely consists of network switches which I have set up with SNMP however when using the recon script each new switch discovered is added by ip address.  Is there a way to force it to add a new discovered device by sysname  for instance if I have a switch with an ip address of 192.168.0.250 instead of listing this as the Agent Name could the script us the snmp sysname  when adding it to the database.


Thanks,

Gary 
Logged

gmonk63
Newbie
*

Karma: 0
Offline Offline

Posts: 8


View Profile
« Reply #1 on: November 13, 2011, 12:25:44 AM »

Ok I managed to achieve the desired results by adding this code within snmpdevices.pl


# Resolve the address
 my $host_name = gethostbyaddr(inet_aton($addr), AF_INET);

        my $sysname =`/usr/bin/snmpwalk -OUEvqt -c $target_community  -v2c $addr  SNMPv2-MIB::sysName.0`;
        $host_name = $sysname unless defined ($host_name);


The only issues is the agent does not show up on the gis map  but it does show on the network topology map any ideas... This is my first attempt at perl so keep in mind im not an expert

Logged

Pages: [1]   Go Up
Print
 
Jump to:  


SourceForge.net Logo  This site is monitored by Pandora FMS   ArticaST