Greetings, cacti-ers:
I'm trying to populate my new cacti database, and to do that I had the following command running for $host_id increments up to the maximum host_id number(100):
php add_graphs.php --host-id=$host_id --graph-type=ds --graph-template-id=2 --snmp-query-id=1 --snmp-query-type-id=20 --snmp-field=ifOperStatus --snmp-value=Up
This worked fine, giving me the correct results, until I got to around host 97, when the script stopped working - it would simply hang.
When I looked into the mysql database, I found this line when I did 'shot processlist;' :
| 45160226 | cactiuser | HOST:46046 | cacti1 | Query | 29 | Copying to tmp table | SELECT DISTINCT data_input_fields.data_name AS `name`, data_input_fields.name AS `description`, d |
Adding graphs through the web interface works fine, but the CLI script is entirely nonfunctional now. When I kill the hung-up process, it tells me:
PHP Warning: Invalid argument supplied for foreach() in /XXX/cacti-0.8.7b/lib/api_automation_tools.php on line 194
PHP Warning: Invalid argument supplied for foreach() in /XXX/cacti-0.8.7b/lib/api_automation_tools.php on line 238
ERROR: Unknown snmp-query-id (1)
Try --list-snmp-queries
My best guess is that the "tmp table" is filled up and I need to clear it, but I'm not sure as to how to go about finding where the tmp table is, or whether that actually is even the issue. Any ideas?
add_graphs CLI script keeps hanging
Moderators: Developers, Moderators
Who is online
Users browsing this forum: No registered users and 1 guest