End Device Tracking Add-On for Cacti

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

egarnel wrote:I spoke to soon. I am using the plugin version and it is only half working.
I was able to pull info form the 6506 720b via the command line, but nothing shows in Cacti.

Jimmy is still working on the plugin version from what I understand, so I will most likely disable it in the meantime.

this is the device id I used to create the device type s72033_rp-PSV-M
for the 720 sup
The plugin version is exactly in synch with the add-on version, so the functionality should be working exactly the same. I'm unsure as to whether the posted one is the same as my working SVN copy, so I can post another for everyone to test if need be.
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

That would work for me - since some of the fixes in the last one didn't appear to work on my box and I'm always looking forward to updates that will solve problems I can't figure out. :)
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well hello everyone. I have been off for a bit. Not on vacation, but starting a new job. Unfortunately with the job change, I have lost access to a working SNMP farm if you would of switches to test.

As a result, it is going to be very difficult for me to test/release future versions. I could use a little help in that arena, if you all know what I mean (aka Access, under contract if your companies desire).

If anyone is interested in helping me keep this thing going, please send me an e-mail using the link below.

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Dr.Dritz
Posts: 44
Joined: Wed Apr 02, 2003 2:48 pm
Location: Southern Denmark

Happy aniversary TheWitness

Post by Dr.Dritz »

Congrat. to the new job and your 5000 posts aniversary.
:D
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

LOL, thanks for noticing that. I guess that should meen something profound. I'll sleep on it...

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
williem
Cacti User
Posts: 69
Joined: Tue Feb 08, 2005 10:36 am

Job change

Post by williem »

Larry,

Good luck on the job change! I keep pounding on mactrack. It looks really good. I have it hitting my cisco, nortel, and cabletron equipment. It is giving me very good info. I am going back through my old mac8 scanning code to see if I canget mactrack to scan the mmac8 with an emme-e6 card. It is a bit wierd. Unfortunately, I have a bunch of those still in the network.


Regards,

Willie
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
jaime_pineiro
Posts: 4
Joined: Tue Nov 30, 2004 11:18 am
Location: Freehold

can you add a config setting to mactrack

Post by jaime_pineiro »

there is one problem with using mactrack in an enviroment with PIX firewalls, they act as routers but do not have arp entries that are accessible through SNMP. I can get a file with mac and IP addresses to
be croned to a folder. Can you add a feature to make mactrack read such
a file, plus also query routers for arp/IP entries?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Jaime,

Please run the following command and e-mail results to me. Also, please check to see that you have update code.

snmpwalk -v 1 -c <your_community> <your_hostname> > pix.txt

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
jaime_pineiro
Posts: 4
Joined: Tue Nov 30, 2004 11:18 am
Location: Freehold

PIX snmp output.

Post by jaime_pineiro »

I have attached the output of the snmpwalk, but it is not much. I have this email from cisco which I have posted below. Currently I use RANCID to get the arp/IP entries via "show arp" on the PIX, this dumps the arp entries in the manner below. This is then taken by a script and processed to map the ports on our network. the script can also check for trunk ports via CISCO-VTP-MIB::vlanTrunkPortDynamicStatus. I can also tell when people are useing hubs because multiple macs show up on a non-trunking port.

RACID PIX output:
<tab>interfacename<space>IP address<space>mac-address
inside 172.20.1.1 00b3.3ea1.ae5b


EMAIL from: CISCO
Hello Jaime,

Thank you for your reply. While checking the Link I've sent you regarding
the command reference configuration, I've noticed that the only commands
supported by the SNMP on the PIX are:

-show block
-show conn
-show CPU usage
- Show mem
-Failover status

If you'd like to check this info, please go to:
http://www.cisco.com/univercd/cc/td/doc ... _63/cmdref
/s.htm#wp1191051

It's right below the table 8-6.
Attachments
pix-snmp.txt
PIX snmp output
(11.26 KiB) Downloaded 201 times
Dr.Dritz
Posts: 44
Joined: Wed Apr 02, 2003 2:48 pm
Location: Southern Denmark

SMNP and integer values

Post by Dr.Dritz »

Dear fellows,
I still have a problem collecting mac info from my devices, and I suspect my problem to be a misconfig of my SNMP installation.
Mactrack is telling me that no ports exist:
-------------------------------------------------------------
DEBUG: SQL: UPDATE mac_track_devices SET ports_total='0',device_type_id='44',sca
n_type = '1',vlans_total='0',ports_active='0',ports_trunk='0',macs_active='0',sn
mp_readstring='public',snmp_sysName='Stack SB B5',snmp_sysLocation='SDU SB B5',s
nmp_sysContact='xxxxx',snmp_sysObjectID='.1.3.6.1.4.1.5624.2.1.11',snmp_s
ysDescr='Vertical Horizon Stack',snmp_sysUptime='258162747',snmp_status='3',last
_runmessage='Data collection completed ok',last_rundate='2006-02-28 23:07:04',la
st_runduration='11.1601' WHERE device_id ='3'
----------------------------------------------------------

I have started an analysis of my problem by examining the outputs of the different statements involved.
Finding: I get "ethernetCsmacd(6)" as "ifType"
There is a comparison to the value 6 to determine if this interface is worth collecting data from.
So that's why I haven't got any ports on my devices.

From the original mactrack_functions.php:
--------------------------------------------------
/* get the operational status of the ports */
$active_ports_array = xform_standard_indexed_data(".1.3.6.1.2.1.2.2.1.8", $device);
$indexes = array_keys($active_ports_array);

$i = 0;
foreach($active_ports_array as $port_info) {
if (($ifInterfaces[$indexes[$i]]["ifType"] >= 6) &&
($ifInterfaces[$indexes[$i]]["ifType"] <= 9)) {
if ($port_info == 1) {
$ports_active++;
}
$ports_total++;
}
$i++;
}
-------------------------------------------------



To test my thesis I compare ifType to "ethernetCsmacd(6)" instead of 6 in mactrack_functions.php:

From the modified mactrack_functions.php
----------------------------------------------------
/* get the operational status of the ports */
$active_ports_array = xform_standard_indexed_data(".1.3.6.1.2.1.2.2.1.8", $device);
$indexes = array_keys($active_ports_array);

/* TEST the value of "ifType" of port 2 */
print($ifInterfaces[$indexes[2]]["ifType"]);

$i = 0;
foreach($active_ports_array as $port_info) {
if (($ifInterfaces[$indexes[$i]]["ifType"] >= "ethernetCsmacd(6)") &&
($ifInterfaces[$indexes[$i]]["ifType"] <= "ethernetCsmacd(6)")) {
if ($port_info == 1) {
$ports_active++;
}
$ports_total++;
}
$i++;
}
--------------------------------------------------

And I suddently have 97 ports! :
---------------------------------------------
C:\Inetpub\wwwroot\Cacti\plugins\mactrack>php -q mactrack_scanner.php -d -id=3 |
more
C:/usr/etc/snmp/snmp.conf: line 2: Warning: Unknown token: persistentDir.
C:/usr/etc/snmp/snmp.conf: line 3: Warning: Unknown token: tempFilePattern.
DEBUG: HOST: 192.168.153.45 is alive, processing has begun.
DEBUG: Scanning function is 'get_cabletron_switch_ports'
DEBUG: ifIndexes data collection complete
DEBUG: ifTypes data collection complete.
DEBUG: ifNames data collection complete.
DEBUG: ifInterfaces assembly complete.
DEBUG: Cabletron securefast marker obtained
ethernetCsmacd(6)INFO: HOST: 192.168.153.45, TYPE: Vertical Horizon Stack, TOTAL
PORTS: 97, OPER PORTS: 0
DEBUG: No user ports on this network.
DEBUG: Cabletron securefast marker empty
DEBUG: SQL: UPDATE mac_track_devices SET ports_total='97',device_type_id='44',sc
an_type = '1',vlans_total='0',ports_active='0',ports_trunk='0',macs_active='0',s
nmp_readstring='public',snmp_sysName='Stack SB B5',snmp_sysLocation='SDU SB B5',
snmp_sysContact='xxxxx',snmp_sysObjectID='.1.3.6.1.4.1.5624.2.1.11',snmp_
sysDescr='Vertical Horizon Stack',snmp_sysUptime='258166973',snmp_status='3',las
t_runmessage='Data collection completed ok',last_rundate='2006-02-28 23:07:04',l
ast_runduration='11.3964' WHERE device_id ='3'
-----------------------------------------------------------------------------------------

?? Is it possible that SNMP was only to collect INTERGER values from devices and that I have missed some setting for that in my installation?

I hope someone can turn my light on.

- Dr.Dritz
torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

scandate selection failure

Post by torstentfk »

Hi,

if I display "All" scan cycles I find the search string (lower half of picture).
if I limit the date range mactrack does not find it (upper half).

What is wrong in my installation?

Torsten
Attachments
mactrack.JPG
mactrack.JPG (106.23 KiB) Viewed 4866 times
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

I have started an analysis of my problem by examining the outputs of the different statements involved.
Finding: I get "ethernetCsmacd(6)" as "ifType"
The RFC 1213 specify that the ifType should be an integer (in your case, it should have been '6').
I think the SNMP agent you are querying needs to be updated (if an update is available)
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Post by chadd »

ceyounger wrote:I really want to get this working...I can taste it!

After much hair-pulling and gnashing of teeth I can input device types, sites, and devices.

But the poller runs once or twice then never runs again--I have to run it manually. I've got DB errors everytime I do run the poller:

02/10/2006 08:33:53 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "UPDATE `mac_track_ip_ranges` SET ips_max=ips_current, ips_max_date=ips_current_date WHERE ips_current > ips_max"

And finally, nothing shows up on the MAC Track tab itself no matter what filter I run. Ports shows up in the console selections though.

Any suggestions for what to do?
i am having the same problem.. I have not been able to fix it, but I would love some help! Anyone?

Here are some error examples:

03/08/2006 10:32:10 AM - SYSTEM STATS: Time:9.2487 Method:cactid Processes:1 Threads:5 Hosts:19 HostsPerProcess:19 DataSources:1737 RRDsProcessed:883
03/08/2006 10:32:11 AM - THOLD: Poller[0] Checking Thresholds
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "delete from mac_track_processes where start_date < '2006-03-08 10:12:11'"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT count(*) FROM mac_track_processes"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "TRUNCATE TABLE mac_track_processes"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT device_id FROM mac_track_devices WHERE disabled='' ORDER BY site_id"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('-1', '0', 'Running', NOW())"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] NOTE: MACTRACK has no devices to process at this time

03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT Count(*) FROM mac_track_devices"
03/08/2006 10:32:11 AM - SYSTEM MACTRACK STATS: Time:0.0129 ConcurrentProcesses:7 Devices:
03/08/2006 10:34:07 AM - SYSTEM STATS: Time:6.4407 Method:cactid Processes:1 Threads:5 Hosts:19 HostsPerProcess:19 DataSources:1737 RRDsProcessed:883

Notice. At the beginning and the end of the mactrack cycle, the cactid poller works beautifully. I don't know why mactrack is choosing to use the CMD.PHP poller... I am more concerned with the errors though. I did notice that a couple of the files had '^M' in them alot, but I corrected the ones I found with a dos2unix.pl script. I am at a bit of a loss.. Thanks for any help in advance.
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

chadd wrote:
ceyounger wrote:I really want to get this working...I can taste it!

After much hair-pulling and gnashing of teeth I can input device types, sites, and devices.

But the poller runs once or twice then never runs again--I have to run it manually. I've got DB errors everytime I do run the poller:

02/10/2006 08:33:53 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "UPDATE `mac_track_ip_ranges` SET ips_max=ips_current, ips_max_date=ips_current_date WHERE ips_current > ips_max"

And finally, nothing shows up on the MAC Track tab itself no matter what filter I run. Ports shows up in the console selections though.

Any suggestions for what to do?
i am having the same problem.. I have not been able to fix it, but I would love some help! Anyone?

Here are some error examples:

03/08/2006 10:32:10 AM - SYSTEM STATS: Time:9.2487 Method:cactid Processes:1 Threads:5 Hosts:19 HostsPerProcess:19 DataSources:1737 RRDsProcessed:883
03/08/2006 10:32:11 AM - THOLD: Poller[0] Checking Thresholds
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "delete from mac_track_processes where start_date < '2006-03-08 10:12:11'"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT count(*) FROM mac_track_processes"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "TRUNCATE TABLE mac_track_processes"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT device_id FROM mac_track_devices WHERE disabled='' ORDER BY site_id"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('-1', '0', 'Running', NOW())"
03/08/2006 10:32:11 AM - CMDPHP: Poller[0] NOTE: MACTRACK has no devices to process at this time

03/08/2006 10:32:11 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT Count(*) FROM mac_track_devices"
03/08/2006 10:32:11 AM - SYSTEM MACTRACK STATS: Time:0.0129 ConcurrentProcesses:7 Devices:
03/08/2006 10:34:07 AM - SYSTEM STATS: Time:6.4407 Method:cactid Processes:1 Threads:5 Hosts:19 HostsPerProcess:19 DataSources:1737 RRDsProcessed:883

Notice. At the beginning and the end of the mactrack cycle, the cactid poller works beautifully. I don't know why mactrack is choosing to use the CMD.PHP poller... I am more concerned with the errors though. I did notice that a couple of the files had '^M' in them alot, but I corrected the ones I found with a dos2unix.pl script. I am at a bit of a loss.. Thanks for any help in advance.
I assume you actually imported the database file? As it seems that none of the proper tables exist for you.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Post by chadd »

Yes I did. Here is the latest:

I nuked all the tables for mactracker.
I reimported the .sql file.
now, I have no devices configured in mactracker, but I am still getting this error. i.e. I have it set to poll every 1hour:

03/08/2006 12:14:08 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('-1', '0', 'Running', NOW())"

I made sure that the table is there, and it is, but it is an empty set.

Any suggestions?

Also, why is it using CMDPHP instead of Cactid?

Also Cigamit, are you going to have this plugin on cactiusers.org for download, or is this being done in a different way?

Thanks,

-chadd.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests