add_graphs CLI script keeps hanging

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
pointy
Posts: 8
Joined: Sat Jul 26, 2008 12:58 pm
Location: Washington, DC

add_graphs CLI script keeps hanging

Post by pointy »

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?
pointy
Posts: 8
Joined: Sat Jul 26, 2008 12:58 pm
Location: Washington, DC

Post by pointy »

Anyone have any ideas? :-?
pointy
Posts: 8
Joined: Sat Jul 26, 2008 12:58 pm
Location: Washington, DC

Post by pointy »

Bumping this. Does anyone have any ideas?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please try latest SVN cacti/branches/0.8.7
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest