End Device Tracking Add-On for Cacti

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

please post a modified file.
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?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Yes, please do post updated file! :)

Witness:
1) I hope you do get the time for the overhaul - my company is really putting it to use these days (especially since I got that 4000 to start reporting)!
2) I'll try and get a traffic capture for you today, might I send it to you privately though - so I don't have to be so overly cautious with my cleaning?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

I'm still waiting for it to run again so that I can capture the DNS failures, but while doing so I greped the cacti.log and found the following:

Code: Select all

04/10/2006 11:36:34 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "REPLACE INTO `mac_track_ip_ranges`      (`ip_range`, `site_id`, `ips_current`, `ips_max_date`)      VALUES ('17.4.4','3',5','2006-04-10 11:32:14')"
Mean anything to anybody?

Btw, I decided to grep the log because mactrack's "process status" page keeps telling me it should have started again 7 minutes ago (it hasn't yet). :)
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

While running, it briefly displayed the following.
Attachments
mactrack dns.JPG
mactrack dns.JPG (78.32 KiB) Viewed 5610 times
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Witness, you have a new private message from me.
tadavis
Posts: 16
Joined: Thu Apr 06, 2006 1:38 pm

Post by tadavis »

knobdy wrote:I'm still waiting for it to run again so that I can capture the DNS failures, but while doing so I greped the cacti.log and found the following:

Code: Select all

04/10/2006 11:36:34 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "REPLACE INTO `mac_track_ip_ranges`      (`ip_range`, `site_id`, `ips_current`, `ips_max_date`)      VALUES ('17.4.4','3',5','2006-04-10 11:32:14')"
Mean anything to anybody?

Btw, I decided to grep the log because mactrack's "process status" page keeps telling me it should have started again 7 minutes ago (it hasn't yet). :)
Try running the upgrade_database script I posted..

Else, what version of MySQL are you running?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

tadavis wrote: Try running the upgrade_database script I posted..

Else, what version of MySQL are you running?
I did, pretty sure, and I'm running:
mysql Ver 14.7 Distrib 4.1.13, for suse-linux (powerpc) using readline 5.0
tadavis
Posts: 16
Joined: Thu Apr 06, 2006 1:38 pm

Post by tadavis »

Ok, the mysql is new enough..

Ah, have you dropped all the contents of the database since you ran the database_upgrade script?

It's probably trying to "replace" a value that does not exist..
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Is it enough to do it through the mactrack tools provided in the plugin?

Nope:

Code: Select all

04/12/2006 09:35:19 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "REPLACE INTO `mac_track_ip_ranges`      (`ip_range`, `site_id`, `ips_current`, `ips_max_date`)      VALUES ('10.10.14','3',4','2006-04-12 09:30:37')"
How would I do it otherwise (I went through and deleted all results via the plugin utilities)? Or, what else might be wrong?
spayne
Posts: 3
Joined: Wed Apr 12, 2006 10:35 am

Post by spayne »

knobdy wrote:Is it enough to do it through the mactrack tools provided in the plugin?

Nope:

Code: Select all

04/12/2006 09:35:19 AM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "REPLACE INTO `mac_track_ip_ranges`      (`ip_range`, `site_id`, `ips_current`, `ips_max_date`)      VALUES ('10.10.14','3',4','2006-04-12 09:30:37')"
How would I do it otherwise (I went through and deleted all results via the plugin utilities)? Or, what else might be wrong?
the problem is that you are missing a quotation mark

VALUES ('10.10.14','3','4','2006-04-12 09:30:37'

you need to edit poller_mactrack.php

old:

Code: Select all

$ip_range["site_id"] . "',"
new:

Code: Select all

$ip_range["site_id"] . "','" 
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

spayne wrote: the problem is that you are missing a quotation mark
Found it on line 429 - but how would that have happened?! :-?
spayne
Posts: 3
Joined: Wed Apr 12, 2006 10:35 am

Post by spayne »

knobdy wrote: Found it on line 429 - but how would that have happened?! :-?
It looks like this is a bug in the new poller_mactrack.php file that was posted a few days ago.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The database_upgrade.php file was altered by Cigamit the other day to add a missing field to the mac_track_ip_ranges (sp) table. So users having issues with the IP range management, you should rerun the upgrade script.

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?
fozzy
Cacti User
Posts: 54
Joined: Mon Jan 09, 2006 11:33 am
Location: SE of LIML
Contact:

Post by fozzy »

another very nice addon :)
thank you .

I'd just point out a couple of issues i'm having.

it could be worth putting some download instructions as to how to get th elatest release in the first post of the thread.. it's been more or les a tresure hunt :D

in the mac/ip reports it would be nice to have an ALL option for sites too. at least now using site: N/A and device all doesn't give me any output
Would it be possible to order numerically the ports?

right now it's alphabeticaly so 3/24 comes before 3/3.


Stil working to find out why some devices aren't iscovered correctly but that must be a chair/keyboard intrerface problem 8)

Thanks again for the nice work.
Luca

EDIT: a small additional note: cat 2980 and cat3524 require the use of get_generic_switch_ports
jhunterlogin
Posts: 5
Joined: Tue Jan 10, 2006 5:11 pm

mactrack poller not working automatically.

Post by jhunterlogin »

I can manually do polling by php ./poller_mactrack.php -d -f. If I try automatically I get no love. here is what I see in mysql under the settings. I guess I could run this thing out of cron but I would really rather not.

mt_maint_time | 12:00am
mt_data_retention | 2weeks
mt_snmp_ver | 2
mt_snmp_community | xxxxxxxx
mt_snmp_communities | public:private:secret
mt_snmp_timeout | 500
mt_snmp_retries | 3
mt_prev_base_time | 10:00pm
mt_last_run_time | 1145756029
mactrack_scan_date | 2006-04-21 20:24:04
mt_prev_db_maint_time | 12:00am
mt_scan_date | 2006-04-22 19:33:49
stats_mactrack | Time:56.8947 ConcurrentProcesses:7 Devices:8 |
| mt_mac_delim | : |
| mt_reverse_dns | on |
| mt_dns_primary | x.x.x.x
| mt_dns_secondary |x.x.x.x |
| mt_dns_timeout | 800 |
| mt_dns_prime_interval | 120 |
| mt_snmp_port | 161 |
| plugin_update_check_time | 1
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest