mactrack_snmp.php on line 145 error

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
osiris123d
Cacti User
Posts: 59
Joined: Fri Mar 23, 2007 3:38 pm

mactrack_snmp.php on line 145 error

Post by osiris123d »

I am trying to use Mac Track for the first time and am having an issue. It isn't scanning for MAC addresses every 30 minutes. So far the only issue I have had is when I Click on "SNMP Options" then create something like "CiscoDevices". Then I click on CiscoDevices and try to add a snmp option

I set the
Version
Community String
SNMP Port
SNMP Timeout
SNMP Retries
Maximum OID's Per Get Request

Then when I click Save I get the following error

Notice: Undefined index: snmp_id in /usr/share/cacti/site/plugins/mactrack/mactrack_snmp.php on line 145

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/cacti/site/plugins/mactrack/mactrack_snmp.php:145) in /usr/share/cacti/site/plugins/mactrack/mactrack_snmp.php on line 145


I am not sure why this is erroring out. I think it might be why the mac track process is not kicking off for the first time.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: mactrack_snmp.php on line 145 error

Post by gandalf »

Please change that line to

Code: Select all

header("Location: mactrack_snmp.php?action=item_edit&id=" . $_POST["id"] . "&item_id=" . (empty($item_id) ? $_POST["id"] : $item_id));
and retry
R.
osiris123d
Cacti User
Posts: 59
Joined: Fri Mar 23, 2007 3:38 pm

Re: mactrack_snmp.php on line 145 error

Post by osiris123d »

Did that now I see the following at the top

Error: Save Failed: Field Input Error (Check Red Fields).

But no fields are in red :)

I also see the following in my logs

02/25/2011 03:06:02 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select max(sequence)+1 as seq from mac_track_snmp_items where snmp_id="
02/25/2011 03:06:02 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"SELECT * FROM mac_track_snmp WHERE id="
02/25/2011 03:06:00 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"select max(sequence)+1 as seq from mac_track_snmp_items where snmp_id="
02/25/2011 03:06:00 PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1064', SQL:"SELECT * FROM mac_track_snmp WHERE id="
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests