Cacti EZ and mactrack issues

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Cacti EZ and mactrack issues

Post by cwahlin »

I can't seem to get mactrack in CactiEZ to work. I am getting a bunch of sql errors:

11/11/2006 10:54:01 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"
11/11/2006 10:54:01 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed "SELECT * FROM mac_track_processes WHERE device_id = 0"
11/11/2006 10:54:01 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='-1'"
11/11/2006 10:54:01 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT count(*) FROM mac_track_processes WHERE device_id > 0"
11/11/2006 10:54:00 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='3'"
11/11/2006 10:54:00 PM - MACTRACK: Poller[0] ERROR: Site not found in database. Can not continue.
11/11/2006 10:54:00 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('3', '1635', 'Running', NOW())"
11/11/2006 10:53:59 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())"
11/11/2006 10:53:59 PM - THOLD: Poller[0] Checking Thresholds
11/11/2006 10:53:54 PM - SYSTEM STATS: Time:232.5697 Method:cactid Processes:1 Threads:1 Hosts:33 HostsPerProcess:33 DataSources:8188 RRDsProcessed:3083
11/11/2006 10:50:50 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT COUNT(*) FROM mac_track_processes WHERE device_id='0'"
11/11/2006 10:50:50 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT mac_track_processes.process_id, mac_track_devices.description, mac_track_processes.device_id, mac_track_processes.start_date FROM mac_track_devices INNER JOIN mac_track_processes ON (mac_track_devices.device_id = mac_track_processes.device_id) WHERE mac_track_processes.device_id != '0'"

...help? :)

/Carl
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Moved to Plugin General.

Hopefully someone will see it here that will know how to help you out.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
brononi
Cacti User
Posts: 123
Joined: Tue Aug 29, 2006 1:58 am
Location: Belgium
Contact:

Post by brononi »

see following reply :oops:
Last edited by brononi on Tue Nov 14, 2006 5:58 am, edited 1 time in total.
User avatar
brononi
Cacti User
Posts: 123
Joined: Tue Aug 29, 2006 1:58 am
Location: Belgium
Contact:

Post by brononi »

I've got the same problem over here.

The thing i've noticed is following:
- Cisco 650x and 29xx works
- Cisco 35xx doesn't work.
Is there maybe a problem with the templates?
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

I guess it could be. I am trying to poll 6509:s with Sup720. Haven't tried our 35xx yet, but I'll try some different switches and see if I can get any of them to work.

/Carl
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Looks like your problem may be here. I am planning a 2.0 and this and other issues will be addressed.
11/11/2006 10:54:00 PM - MACTRACK: Poller[0] ERROR: Site not found in database. Can not continue.
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?
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

Atleast I got a lot less sql errors assigning a site :lol:

11/22/2006 11:46:03 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT COUNT(*) FROM mac_track_processes WHERE device_id='0'"
11/22/2006 11:46:03 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT mac_track_processes.process_id, mac_track_devices.description, mac_track_processes.device_id, mac_track_processes.start_date FROM mac_track_devices INNER JOIN mac_track_processes ON (mac_track_devices.device_id = mac_track_processes.device_id) WHERE mac_track_processes.device_id != '0'"

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

Post by cigamit »

Check your cacti database and ensure that you actually have a mac_track_processes table in there.
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

I have the mac_track_processes table and it is empty. I re-imported the mactrack.sql, but I still have the same problem (and it is still empty):

11/28/2006 01:43:32 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT COUNT(*) FROM mac_track_processes WHERE device_id='0'"
11/28/2006 01:43:32 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT mac_track_processes.process_id, mac_track_devices.description, mac_track_processes.device_id, mac_track_processes.start_date FROM mac_track_devices INNER JOIN mac_track_processes ON (mac_track_devices.device_id = mac_track_processes.device_id) WHERE mac_track_processes.device_id != '0'"

/Carl
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What version of MySQL?
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?
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

Running mysql 5.0.27-1

Not sure if this causes the problem, or is caused by it? Just tried running the mactrack poller from the command line:

php -q /var/www/html/plugins/mactrack/poller_mactrack.php -f -d
PHP Warning: session_start(): open(/var/lib/php/session/sess_e2pes71mfm3nh3ncgka5i7vjb5, O_RDWR) failed: Permission denied (13) in /var/www/html/include/config.php on line 138
PHP Warning: Unknown: open(/var/lib/php/session/sess_e2pes71mfm3nh3ncgka5i7vjb5, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0

/Carl
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This looks like a permissions problem. Can you correct that issue first and then update me. Also, please run the following and post:

php -v

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?
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

[root@cacti ~]# php -v
PHP 5.1.6 (cli) (built: Nov 2 2006 16:46:15)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with eAccelerator v0.9.5, Copyright (c) 2004-2006 eAccelerator, by eAccelerator

After fixing the permissions error the poller seems to finnish ok without errors:

[cactiuser@cacti root]$ php -q /var/www/html/plugins/mactrack/poller_mactrack.php -f -d
DEBUG: About to enter MacTrack poller processing
DEBUG: Into Processing. Checking to determine if it's time to run.
DEBUG: Checking if user changed the start time
DEBUG: Checking if user changed the maintenance time
DEBUG: The next run time has been determined to be at '2006-11-28 15:37:20'
DEBUG: The next database maintenance run time has been determined to be at '2006-11-29 1:00:00'
DEBUG: Either a scan has been forced, or it's time to check for macs
DEBUG: CMD: /usr/bin/php -q /var/www/html/plugins/mactrack/mactrack_scanner.php -id=1 -d
DEBUG: CMD: /usr/bin/php -q /var/www/html/plugins/mactrack/mactrack_scanner.php -id=2 -d
DEBUG: A process cycle launch just completed.
DEBUG: Interum IP addresses to MAC addresses association pass complete.
DEBUG: Finished transferring scan results to main table.
DEBUG: Finished updating site table with collection statistics.
11/28/2006 02:38:04 PM - SYSTEM MACTRACK STATS: Time:2.1256 ConcurrentProcesses:7 Devices:2

BUT, I still get sql errors in the cactilog:

11/28/2006 02:38:09 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='1'"
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='2'"
11/28/2006 02:38:04 PM - SYSTEM MACTRACK STATS: Time:2.1256 ConcurrentProcesses:7 Devices:2
11/28/2006 02:38:04 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"
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed "SELECT * FROM mac_track_processes WHERE device_id = 0"
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "DELETE FROM mac_track_processes WHERE device_id='-1'"
11/28/2006 02:38:04 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "SELECT count(*) FROM mac_track_processes WHERE device_id > 0"
11/28/2006 02:38:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('1', '13807', 'Running', NOW())"
11/28/2006 02:38:02 PM - CMDPHP: Poller[0] ERROR: SQL Exec Failed "INSERT INTO mac_track_processes (device_id, process_id, status, start_date) VALUES ('2', '13809', 'Running', NOW())"
11/28/2006 02:38:02 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())"

Status for my Catalyst 6509 show up as "error" and the only thing I see is the number of IPs. Everything else says 0. Maybe that's because it has a Sup720 which isn't in the device types? (maybe it needs a different scanning function?)

/Carl
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Boy Carl, it's been a long time. Maybe Jimmy can add value. I don't remember adding a device id of -1 to the process table. If the add failed, there must be something going on with the table. Maybe you should run the database_upgrade.php file to insure you have the latest structure.

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?
cwahlin
Cacti User
Posts: 91
Joined: Fri Oct 10, 2003 7:23 am

Post by cwahlin »

Running database_upgrade introduced a whole new set of sql errors :lol:
For every command it tries to invoke I get "SQL Exec Failed "ALTER TABLE".

Probably doesn't help that I'm no sql guru.

I'll wait and see if cigamit has some input. Thanks for your help so far TheWitness!

/Carl
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests