|
|
| Author |
Message |
bloms
Joined: 25 Jan 2008 Posts: 7
|
Posted: Fri Mar 28, 2008 12:10 pm Post subject: Mactrack installation |
|
|
Hello,
I am using cacti on a W2k3 server using apache.
I tried to install mactrack...
I did the base standard procedure (update config.php/global.php and copy files and execute the sql file).
I had already tried to set the sites configuration and got an error message [red]"Save Failed"[/red]
I now have tried to delete the old tables defined and rebuild the tables with the sql file: up to there ... i recieve no errors messages.
But as i try the database_upgrade.php script i get a lot of errors.
| Code: | C:\apache\htdocs\cacti\plugins\mactrack>c:\php\php.exe database_upgrade.php
Unlinked OID in IF-MIB: snmpV2 ::= { internet 6 }
ERROR: Modify Column, Table -> mac_track_devices, Column -> snmp_timeout, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> snmp_retries, Failed!
SUCCESS: Add Column, Table -> mac_track_ports, Column -> dns_hostname, Already Exists!
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> dns_hostname, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ips, Column -> dns_hostname, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> snmp_port, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> macs_active, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> snmp_sysName, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> snmp_sysLocation, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> snmp_sysContact, Already Exists!
SUCCESS: Create Table, Table -> mac_track_scanning_functions, Already Exists!
ERROR: Execute SQL, Change Primary Key For 'mac_track_devices', Failed!
SUCCESS: Add Index, Table -> mac_track_devices, Index -> device_id, Already Exists!
SUCCESS: Add Column, Table -> mac_track_sites, Column -> total_oper_ports, Already Exists!
ERROR: Execute SQL, Change Primary Key For 'mac_track_device_types', Failed!
SUCCESS: Add Index, Table -> mac_track_device_types, Index -> device_type_id, Already Exists!
ERROR: Modify Column, Table -> mac_track_scanning_functions, Column -> scanning_function, Failed!
ERROR: Modify Column, Table -> mac_track_scanning_functions, Column -> description, Failed!
SUCCESS: Create Table, Table -> mac_track_scan_dates, Already Exists!
SUCCESS: Execute SQL, Addition of Scan Dates, Ok
SUCCESS: Add Index, Table -> mac_track_devices, Index -> snmp_sysDescr, Already Exists!
SUCCESS: Add Index, Table -> mac_track_devices, Index -> snmp_sysObjectID, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> device_type_id, Already Exists!
SUCCESS: Add Index, Table -> mac_track_devices, Index -> device_type_id, Already Exists!
SUCCESS: Add Index, Table -> mac_track_ports, Index -> port_name, Already Exists!
SUCCESS: Add Index, Table -> mac_track_ports, Index -> dns_hostname, Already Exists!
ERROR: Modify Column, Table -> mac_track_devices, Column -> ips_total, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> vlans_total, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> ports_total, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> ports_active, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> ports_trunk, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> macs_active, Failed!
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> updated, Already Exists!
SUCCESS: Add Index, Table -> mac_track_temp_ports, Index -> updated, Already Exists!
SUCCESS: Add Index, Table -> mac_track_temp_ports, Index -> ip_address, Already Exists!
SUCCESS: Create Table, Table -> mac_track_ip_ranges, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ip_ranges, Column -> ips_max_date, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ip_ranges, Column -> ips_current_date, Already Exists!
SUCCESS: Add Column, Table -> mac_track_processes, Column -> device_id, Already Exists!
SUCCESS: Add Column, Table -> mac_track_processes, Column -> process_id, Already Exists!
ERROR: Modify Column, Table -> mac_track_devices, Column -> snmp_readstring, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> snmp_readstrings, Failed!
ERROR: Execute SQL, Change mac_track_temp_ports to Memory Table, Failed!
ERROR: Execute SQL, Change mac_track_ips to Memory Table, Failed!
SUCCESS: Create Table, Table -> mac_track_approved_macs, Already Exists!
ERROR: Modify Column, Table -> mac_track_devices, Column -> ignorePorts, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> snmp_readstring, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> snmp_readstrings, Failed!
SUCCESS: Create Table, Table -> mac_track_oui_database, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ports, Column -> vendor_mac, Already Exists!
SUCCESS: Add Index, Table -> mac_track_ports, Index -> vendor_mac, Already Exists!
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> vendor_mac, Already Exists!
SUCCESS: Add Index, Table -> mac_track_temp_ports, Index -> vendor_mac, Already Exists!
SUCCESS: Execute SQL, Add Vendor Macs To 'mac_track_ports', Ok
SUCCESS: Execute SQL, Add Vendor Macs To 'mac_track_temp_ports', Ok
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> authorized, Already Exists!
SUCCESS: Add Index, Table -> mac_track_temp_ports, Index -> authorized, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ports, Column -> authorized, Already Exists!
SUCCESS: Add Index, Table -> mac_track_ports, Index -> authorized, Already Exists!
SUCCESS: Create Table, Table -> mac_track_macwatch, Already Exists!
SUCCESS: Create Table, Table -> mac_track_macauth, Already Exists!
ERROR: Create Table, Table -> mac_track_vlans, Failed!
ERROR: Execute SQL, Add VLANS to VLAN Table, Failed!
ERROR: Modify Column, Table -> mac_track_devices, Column -> description, Failed!
ERROR: Add Column, Table -> mac_track_devices, Column -> device_name, Failed!
ERROR: Add Index, Table -> mac_track_devices, Index -> device_name, Failed!
ERROR: Add Column, Table -> mac_track_sites, Column -> customer_contact, Failed!
ERROR: Add Column, Table -> mac_track_sites, Column -> netops_contact, Failed!
ERROR: Add Column, Table -> mac_track_sites, Column -> facilities_contact, Failed!
ERROR: Add Column, Table -> mac_track_sites, Column -> site_info, Failed!
ERROR: Add Column, Table -> mac_track_device_types, Column -> serial_number_oid, Failed!
ERROR: Execute SQL, Move Device Names from the 'description' field to the 'device_name' field., Failed!
SUCCESS: Execute SQL, Blank out the 'description' field as it will now be used
for something else, Ok
ERROR: Add Column, Table -> mac_track_macwatch, Column -> email_addresses, Failed!
ERROR: Add Column, Table -> mac_track_macwatch, Column -> mac_id, Failed!
ERROR: Add Column, Table -> mac_track_macwatch, Column -> date_last_seen, Failed!
ERROR: Add Column, Table -> mac_track_macauth, Column -> mac_id, Failed!
ERROR: Add Column, Table -> mac_track_ports, Column -> device_name, Failed!
ERROR: Add Column, Table -> mac_track_temp_ports, Column -> device_name, Failed!
ERROR: Add Column, Table -> mac_track_devices, Column -> notes, Failed!
ERROR: Modify Column, Table -> mac_track_ips, Column -> description, Failed!
SUCCESS: Delete Column, Table -> mac_track_devices, Column -> serial_number, Column Does NOT Exist!
SUCCESS: Delete Column, Table -> mac_track_devices, Column -> asset_id, Column Does NOT Exist!
ERROR: Create Table, Table -> mac_track_interfaces, Failed!
SUCCESS: Add Column, Table -> mac_track_scanning_functions, Column -> type, Already Exists!
ERROR: Add Column, Table -> mac_track_device_types, Column -> ip_scanning_function, Failed!
SUCCESS: Execute SQL, Update the Scanning Function Type to 'Mac' for undefined types, Ok
ERROR: Execute SQL, Set the IP Scanning function to N/A for Device Type 1, Failed!
ERROR: Execute SQL, Set the IP Scanning function to 'get_standard_arp_table' for Routers and L3 Switches, Failed!
ERROR: Add Column, Table -> mac_track_interfaces, Column -> vlan_trunk, Failed!
ERROR: Add Column, Table -> mac_track_devices, Column -> user_name, Failed!
ERROR: Add Column, Table -> mac_track_devices, Column -> user_password, Failed!
Updating Device Types in Devices Table. Please be patient.
Device Types Updated, You have '0' Good Device Type Mapping and '0' Bad Device Type Mapping.
If the Bad Device type mapping is greater than '0', you should inspect your devices for unmapped device types.
Importing the Vendor MAC Address Table from the IEEE
Getting OUI Database from the IEEE |
How do i have to run this script: through an explorer ( firefox/iexplore ) through php.exe ? |
|
| Back to top |
|
 |
Dr.Dritz
Joined: 02 Apr 2003 Posts: 42 Location: Southern Denmark
|
Posted: Mon Mar 31, 2008 8:17 am Post subject: Same experience: Device Types are missing |
|
|
Hello,
I have the same experience.
Complete new v.8.7b install on a brand new machine.
After MacTrack installation there are no device types.
When i run "database_upgrade.php" the following appears:
---------------------snip------------------------
PHP Warning: reset(): Passed variable is not an array or object in /var/www/html/cacti-0.8.7b/lib/functions.php on line 146
PHP Warning: Variable passed to each() is not an array or object in /var/www/html/cacti-0.8.7b/lib/functions.php on line 147
PHP Warning: reset(): Passed variable is not an array or object in /var/www/html/cacti-0.8.7b/lib/functions.php on line 146
PHP Warning: Variable passed to each() is not an array or object in /var/www/html/cacti-0.8.7b/lib/functions.php on line 147
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> snmp_timeout, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> snmp_retries, Ok
SUCCESS: Add Column, Table -> mac_track_ports, Column -> dns_hostname, Already Exists!
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> dns_hostname, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ips, Column -> dns_hostname, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> snmp_port, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> macs_active, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> snmp_sysName, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> snmp_sysLocation, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> snmp_sysContact, Already Exists!
SUCCESS: Create Table, Table -> mac_track_scanning_functions, Already Exists!
SUCCESS: Execute SQL, Change Primary Key For 'mac_track_devices', Ok
SUCCESS: Add Index, Table -> mac_track_devices, Index -> device_id, Already Exists!
SUCCESS: Add Column, Table -> mac_track_sites, Column -> total_oper_ports, Already Exists!
SUCCESS: Execute SQL, Change Primary Key For 'mac_track_device_types', Ok
SUCCESS: Add Index, Table -> mac_track_device_types, Index -> device_type_id, Already Exists!
SUCCESS: Modify Column, Table -> mac_track_scanning_functions, Column -> scanning_function, Ok
SUCCESS: Modify Column, Table -> mac_track_scanning_functions, Column -> description, Ok
SUCCESS: Create Table, Table -> mac_track_scan_dates, Already Exists!
SUCCESS: Execute SQL, Addition of Scan Dates, Ok
SUCCESS: Add Index, Table -> mac_track_devices, Index -> snmp_sysDescr, Already Exists!
SUCCESS: Add Index, Table -> mac_track_devices, Index -> snmp_sysObjectID, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> device_type_id, Already Exists!
SUCCESS: Add Index, Table -> mac_track_devices, Index -> device_type_id, Already Exists!
SUCCESS: Add Index, Table -> mac_track_ports, Index -> port_name, Already Exists!
SUCCESS: Add Index, Table -> mac_track_ports, Index -> dns_hostname, Already Exists!
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> ips_total, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> vlans_total, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> ports_total, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> ports_active, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> ports_trunk, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> macs_active, Ok
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> updated, Already Exists!
SUCCESS: Add Index, Table -> mac_track_temp_ports, Index -> updated, Already Exists!
SUCCESS: Add Index, Table -> mac_track_temp_ports, Index -> ip_address, Already Exists!
SUCCESS: Create Table, Table -> mac_track_ip_ranges, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ip_ranges, Column -> ips_max_date, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ip_ranges, Column -> ips_current_date, Already Exists!
SUCCESS: Add Column, Table -> mac_track_processes, Column -> device_id, Already Exists!
SUCCESS: Add Column, Table -> mac_track_processes, Column -> process_id, Already Exists!
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> snmp_readstring, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> snmp_readstrings, Ok
SUCCESS: Execute SQL, Change mac_track_temp_ports to Memory Table, Ok
SUCCESS: Execute SQL, Change mac_track_ips to Memory Table, Ok
SUCCESS: Create Table, Table -> mac_track_approved_macs, Already Exists!
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> ignorePorts, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> snmp_readstring, Ok
SUCCESS: Modify Column, Table -> mac_track_devices, Column -> snmp_readstrings, Ok
SUCCESS: Create Table, Table -> mac_track_oui_database, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ports, Column -> vendor_mac, Already Exists!
SUCCESS: Add Index, Table -> mac_track_ports, Index -> vendor_mac, Already Exists!
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> vendor_mac, Already Exists!
SUCCESS: Add Index, Table -> mac_track_temp_ports, Index -> vendor_mac, Already Exists!
SUCCESS: Execute SQL, Add Vendor Macs To 'mac_track_ports', Ok
SUCCESS: Execute SQL, Add Vendor Macs To 'mac_track_temp_ports', Ok
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> authorized, Already Exists!
SUCCESS: Add Index, Table -> mac_track_temp_ports, Index -> authorized, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ports, Column -> authorized, Already Exists!
SUCCESS: Add Index, Table -> mac_track_ports, Index -> authorized, Already Exists!
SUCCESS: Create Table, Table -> mac_track_macwatch, Already Exists!
SUCCESS: Create Table, Table -> mac_track_macauth, Already Exists!
SUCCESS: Create Table, Table -> mac_track_vlans, Already Exists!
SUCCESS: Execute SQL, Add VLANS to VLAN Table, Ok
ERROR: Modify Column, Table -> mac_track_devices, Column -> description, Column Does NOT Exist!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> device_name, Already Exists!
SUCCESS: Add Index, Table -> mac_track_devices, Index -> device_name, Already Exists!
SUCCESS: Add Column, Table -> mac_track_sites, Column -> customer_contact, Already Exists!
SUCCESS: Add Column, Table -> mac_track_sites, Column -> netops_contact, Already Exists!
SUCCESS: Add Column, Table -> mac_track_sites, Column -> facilities_contact, Already Exists!
SUCCESS: Add Column, Table -> mac_track_sites, Column -> site_info, Already Exists!
SUCCESS: Add Column, Table -> mac_track_device_types, Column -> serial_number_oid, Already Exists!
ERROR: Execute SQL, Move Device Names from the 'description' field to the 'device_name' field.,Failed!
ERROR: Execute SQL, Blank out the 'description' field as it will now be used for something else,Failed!
SUCCESS: Add Column, Table -> mac_track_macwatch, Column -> email_addresses, Already Exists!
SUCCESS: Add Column, Table -> mac_track_macwatch, Column -> mac_id, Already Exists!
SUCCESS: Add Column, Table -> mac_track_macwatch, Column -> date_last_seen, Already Exists!
SUCCESS: Add Column, Table -> mac_track_macauth, Column -> mac_id, Already Exists!
SUCCESS: Add Column, Table -> mac_track_ports, Column -> device_name, Already Exists!
SUCCESS: Add Column, Table -> mac_track_temp_ports, Column -> device_name, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> notes, Already Exists!
ERROR: Modify Column, Table -> mac_track_ips, Column -> description, Column Does NOT Exist!
SUCCESS: Delete Column, Table -> mac_track_devices, Column -> serial_number, Column Does NOT Exist!
SUCCESS: Delete Column, Table -> mac_track_devices, Column -> asset_id, Column Does NOT Exist!
SUCCESS: Create Table, Table -> mac_track_interfaces, Already Exists!
SUCCESS: Add Column, Table -> mac_track_scanning_functions, Column -> type, Already Exists!
SUCCESS: Add Column, Table -> mac_track_device_types, Column -> ip_scanning_function, Already Exists!
SUCCESS: Execute SQL, Update the Scanning Function Type to 'Mac' for undefined types, Ok
SUCCESS: Execute SQL, Set the IP Scanning function to N/A for Device Type 1, Ok
SUCCESS: Execute SQL, Set the IP Scanning function to 'get_standard_arp_table' for Routers and L3 Switches, Ok
SUCCESS: Add Column, Table -> mac_track_interfaces, Column -> vlan_trunk, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> user_name, Already Exists!
SUCCESS: Add Column, Table -> mac_track_devices, Column -> user_password, Already Exists!
Updating Device Types in Devices Table. Please be patient.
Device Types Updated, You have '0' Good Device Type Mapping and '0' Bad Device Type Mapping.
If the Bad Device type mapping is greater than '0', you should inspect your devices for unmapped device types.
Importing the Vendor MAC Address Table from the IEEE
PHP Warning: reset(): Passed variable is not an array or object in /var/www/html/cacti-0.8.7b/lib/functions.php on line 146
PHP Warning: Variable passed to each() is not an array or object in /var/www/html/cacti-0.8.7b/lib/functions.php on line 147
PHP Warning: reset(): Passed variable is not an array or object in /var/www/html/cacti-0.8.7b/lib/functions.php on line 146
PHP Warning: Variable passed to each() is not an array or object in /var/www/html/cacti-0.8.7b/lib/functions.php on line 147
PHP Notice: Undefined variable: oui_file in /var/www/html/cacti-0.8.7b/plugins/mactrack/mactrack_import_ouidb.php on line 70
Getting OUI Database from the IEEE
OUI Database Download from IEEE Complete
..................................................................................................................
There were '11316' Entries Added/Updated in the database.
There were '0' Records Removed from the database.
Database Upgrade Complete
---------------------snap-----------------------------------------------
and the following error in the log:
03/31/2008 02:45:16 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE mac_track_devices SET description='''
03/31/2008 02:45:16 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1054', SQL:"UPDATE mac_track_devices SET device_name=description WHERE device_name IS NULL OR device_name='''
| Quote: | Cacti Version - 0.8.7b
Plugin Architecture - 2.1
Poller Type - CMD.php
Server Info - Linux 2.6.18-53.el5PAE
Web Server - Apache/2.2.3 (Red Hat)
PHP - 5.1.6
PHP Extensions - libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp
MySQL - 5.0.22
RRDTool - 1.2.23
SNMP - 5.3.1
PluginsHost Info (hostinfo - v0.2)
Device Tracking (mactrack - v1.1) |
|
|
| Back to top |
|
 |
bloms
Joined: 25 Jan 2008 Posts: 7
|
Posted: Tue Apr 01, 2008 7:37 am Post subject: Mactrack installation |
|
|
OK ...
the error was in my database:
- during the installation i used the root user to execute macktrack.sql.
- my server does not have the right to access the internet.
-> i had to 're' GRANT cactiuser all privilegeds on the database for "database_update.php" script to end up correctly.
-> i copied the file oui.txt to my server and modify "mactrack_functions.php" to work on my local file.
After those changes i can add sites and devices into mactrack.
AND AGAIN ...
After adding our core switch to the mactrack devices, and execute mactrack_scanner.php and poller_macktrack.php i get database errors.
The error states:
| Code: | | DEBUG: ERROR: Device with Id of '' not found in database. Can not continue. |
|
|
| Back to top |
|
 |
Dr.Dritz
Joined: 02 Apr 2003 Posts: 42 Location: Southern Denmark
|
Posted: Thu Apr 03, 2008 10:50 am Post subject: Back on track |
|
|
OK!
I missed to :
# mysql -u cactiuser -p cacti < mactrack.sql.0.0.1
and then
# php database_upgrade.php
Now at least, I can add devices so I guess I'm over the hill
Thanks for listening
- Dritz |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9470 Location: MI, USA
|
|
| Back to top |
|
 |
eegilbert
Joined: 21 Sep 2006 Posts: 9
|
Posted: Thu Apr 03, 2008 2:53 pm Post subject: |
|
|
I get the same error message and I've even tried the new plugin arch posted this morning.
I don't have mactrack installed anymore, so is it possible this is not related to it?
How should I go about debugging this, I don't see any thing in the cacti.log file and nothing on the web page that would give me more verbose information.
Thank you,
Erric |
|
| Back to top |
|
 |
eegilbert
Joined: 21 Sep 2006 Posts: 9
|
Posted: Fri Apr 04, 2008 11:41 am Post subject: |
|
|
hmmm. Well, it's working now and not a peep of an error message.
I did manually drop the tables and re-import the two sql files and finally ran the database_update.php on the command line.
I did this several times yesterday, I don't know what was magical about the last time, but like I said things are working just fine right now...
Erric |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|