"Serial Number Collection Method" option doesn't exist

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
Syntax
Posts: 10
Joined: Thu Jul 14, 2011 1:55 am

"Serial Number Collection Method" option doesn't exist

Post by Syntax »

Hello,

I'm running cacti 0.8.7g and mactrack 2.9 and I would like to use snmpwalk instead of snmpget for a device types which I'm currently working on. However even if it the option "Serial Number Collection Method" is present in the "MacTrack Device Types" page. It actually doesn´t exist in the Mysql table either in the php code... :(

Is it for a next version ? or is there already a patch or something for fix this and be able to choose the OID collection method ?

Thx for helping.

Edit: Hum, in fact I figured out that it is snmpwalk which is always used..so it's ok for me. But there is still this problem that people think they can choose between snmpget and snmpwalk, but actually no.
williem
Cacti User
Posts: 69
Joined: Tue Feb 08, 2005 10:36 am

Re: "Serial Number Collection Method" option doesn't exist

Post by williem »

Here is how I implemented the serial number in my modified version of MackTrack. In the db_update_device_status I update the serial_no field. You also need to add the same type information in each of the device type phps (ie cisco, foundry, norbay, cabletron, rapier, ...)

Regards,
Willie
function get_generic_switch_ports($site, &$device, $lowPort = 0, $highPort = 0) {
global $debug, $scan_date;

/* initialize port counters */
$device["ports_total"] = 0;
$device["ports_active"] = 0;
$device["ports_trunk"] = 0;
$device["serial_no"] = ""; /* initialize the serial_no so it will work till i get everything set */

/* get the ifIndexes for the device */
$ifIndexes = xform_standard_indexed_data(".1.3.6.1.2.1.2.2.1.1", $device);

/* get the ifTypes for the device */
$ifTypes = xform_standard_indexed_data(".1.3.6.1.2.1.2.2.1.3", $device);

/* get the ifNames for the device */
$ifNames = xform_standard_indexed_data(".1.3.6.1.2.1.31.1.1.1.1", $device);

/* get ports that happen to be link ports */
$link_ports = get_link_port_status($device);

/* get the ifInOctets for the device */
$ifInOctets = xform_standard_indexed_data(".1.3.6.1.2.1.2.2.1.10", $device);

/* get the ifAdminstatus for the device */
$ifAdminStatus = xform_standard_indexed_data(".1.3.6.1.2.1.2.2.1.7", $device);

/* get the ifOperstatus for the device */
$ifOperStatus = xform_standard_indexed_data(".1.3.6.1.2.1.2.2.1.8", $device);

$serialOID = $device["serialOID"];
if (empty($serialOID)){
$serialOID = ".1.3.6.1.2.1.47.1.1.1.1.11.1";
}
$serialno = xform_standard_indexed_data($serialOID, $device);
$device["serial_no"] = $serialno;

/* get the serial number out of the array */
foreach($serialno as $ifIndex) {
$device["serial_no"] = $ifIndex;
}
Cacti 0.8.6h | Cactid 0.8.6g | 64k devices | W2k3 IIS | PHP 5.3 | RRDtool 1.0.49 | Perl 5.8.5 | Dell Servers 8 gig ram
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest