Do not update/parse the first output field from script !?
Moderators: Developers, Moderators
Do not update/parse the first output field from script !?
HI,
I have a script/command(anything.sh) that returns tree( could be four, five, six....) outputs but when I see the graph, the first one output never is updated.
The first output is never parsed.
I can check on the poller.php output.
I am using RH9 with cacti 0.8.6h.
If I am not wrong , what could be ?!
What is happen with the first output ?!
I attached a .doc with the procedure that I am doing.
I really appreciate a help.
Sorry about my english.
Thanks in advanced,
Estruc - Rio de Janeiro - Brasil.
I have a script/command(anything.sh) that returns tree( could be four, five, six....) outputs but when I see the graph, the first one output never is updated.
The first output is never parsed.
I can check on the poller.php output.
I am using RH9 with cacti 0.8.6h.
If I am not wrong , what could be ?!
What is happen with the first output ?!
I attached a .doc with the procedure that I am doing.
I really appreciate a help.
Sorry about my english.
Thanks in advanced,
Estruc - Rio de Janeiro - Brasil.
- Attachments
-
- problem_cacti_first_output.doc
- (440 KiB) Downloaded 168 times
Actually I can use any kind of script/command from anywhere.
The problem persists.
In this example I am using a local script with tree simple outputs.
Sorry Lvm, I did not understand what you means like a screenshot of the script?s definition? Could you explain me what exactly you asked me for?
Thanks for your help.
Estruc.
The problem persists.
In this example I am using a local script with tree simple outputs.
Sorry Lvm, I did not understand what you means like a screenshot of the script?s definition? Could you explain me what exactly you asked me for?
Thanks for your help.
Estruc.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
AFAIK, you'll have to explicitely give the command processor needed for the script. E.g.orand the like.
I'm missing some lines from cacti log as well. Please check while running in DEBUG mode (Settings->Logging Level) and reset to normal afterwards
Reinhard
Code: Select all
/usr/bin/sh <your shell script>
Code: Select all
/usr/bin/perl <your perl script
I'm missing some lines from cacti log as well. Please check while running in DEBUG mode (Settings->Logging Level) and reset to normal afterwards
Reinhard
This is a cacti.log output in a range of a poller.
You can see that I created my script to generate a duplicate of the first one output in a second one. I did it to catch an output from the second one and bypass the problem, so I can have a graphic.
Unfortunately, the first one output still not parsing.
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id from host where disabled = '' order by id"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('path_webroot','/www/htdocs/cacti')"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_time"
04/27/2006 11:25:00 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /www/php/bin/php, ARGS: -q /www/htdocs/cacti/cmd.php 0 6]
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select * from host where (disabled = '' and id >= 0 and id <= 6) ORDER by id"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT * from poller_item WHERE (host_id >= 0 and host_id <= 6) ORDER by host_id"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT count(*) from poller_item WHERE (action=2 AND (host_id >= 0 and host_id <= 6))"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] Host[6] SNMP: Host responded to SNMP
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update host set status = '3', status_event_count = '0', status_fail_date = '0000-00-00 00:00:00', status_rec_date = '0000-00-00 00:00:00', status_last_error = '', min_time = '9.99999', max_time = '372.25000', cur_time = '230.16', avg_time = '290.98333333333', total_polls = '3', failed_polls = '0', availability = '100' where hostname = '10.xxx.yyy.www'"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_reindex.data_query_id, poller_reindex.action, poller_reindex.op, poller_reindex.assert_value, poller_reindex.arg1 from poller_reindex where poller_reindex.host_id=6"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('date',NOW())"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)"
04/27/2006 11:25:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/27/2006 11:25:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)"
04/27/2006 11:25:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/27/2006 11:25:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] Host[6] DS[12] CMD: /www/htdocs/cacti/scripts/memoria_wmi.sh 10.xxx.yyy.www, output: output1:522224 output2:522224 output3:467008 output4:1395220 output5:11400004/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (12,'','2006-04-27 11:25:00','output1:522224 output2:522224 output3:467008 output4:1395220 output5:114000')"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] Time: 3.2131 s, Theads: N/A, Hosts: 1
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select data_template_rrd.data_source_name, data_input_fields.data_name from (data_template_rrd,data_input_fields) where data_template_rrd.data_input_field_id=data_input_fields.id and data_template_rrd.local_data_id=12"
04/27/2006 11:25:04 AM - POLLER: Poller[0] Parsed MULTI output field 'output2:522224' [map output2->output2]
04/27/2006 11:25:04 AM - POLLER: Poller[0] Parsed MULTI output field 'output3:467008' [map output3->output3]
04/27/2006 11:25:04 AM - POLLER: Poller[0] Parsed MULTI output field 'output4:1395220' [map output4->output4]
04/27/2006 11:25:04 AM - POLLER: Poller[0] Parsed MULTI output field 'output5:114000' [map output5->output5]
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='12' and rrd_name='' and time='2006-04-27 11:25:00'"
04/27/2006 11:25:04 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /www/htdocs/cacti/rra/estruc_output5_12.rrd --template output2:output3:output4:output5 1146147900:522224:467008:1395220:114000
04/27/2006 11:25:04 AM - SYSTEM STATS: Time:4.1562 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('stats_poller','Time:4.1562 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1')"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_output"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_command"
Thanks for a help.
Estruc.
You can see that I created my script to generate a duplicate of the first one output in a second one. I did it to catch an output from the second one and bypass the problem, so I can have a graphic.
Unfortunately, the first one output still not parsing.
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id from host where disabled = '' order by id"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('path_webroot','/www/htdocs/cacti')"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_time"
04/27/2006 11:25:00 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /www/php/bin/php, ARGS: -q /www/htdocs/cacti/cmd.php 0 6]
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select * from host where (disabled = '' and id >= 0 and id <= 6) ORDER by id"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT * from poller_item WHERE (host_id >= 0 and host_id <= 6) ORDER by host_id"
04/27/2006 11:25:00 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT count(*) from poller_item WHERE (action=2 AND (host_id >= 0 and host_id <= 6))"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] Host[6] SNMP: Host responded to SNMP
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update host set status = '3', status_event_count = '0', status_fail_date = '0000-00-00 00:00:00', status_rec_date = '0000-00-00 00:00:00', status_last_error = '', min_time = '9.99999', max_time = '372.25000', cur_time = '230.16', avg_time = '290.98333333333', total_polls = '3', failed_polls = '0', availability = '100' where hostname = '10.xxx.yyy.www'"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_reindex.data_query_id, poller_reindex.action, poller_reindex.op, poller_reindex.assert_value, poller_reindex.arg1 from poller_reindex where poller_reindex.host_id=6"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('date',NOW())"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/27/2006 11:25:01 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)"
04/27/2006 11:25:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/27/2006 11:25:02 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)"
04/27/2006 11:25:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/27/2006 11:25:03 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] Host[6] DS[12] CMD: /www/htdocs/cacti/scripts/memoria_wmi.sh 10.xxx.yyy.www, output: output1:522224 output2:522224 output3:467008 output4:1395220 output5:11400004/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (12,'','2006-04-27 11:25:00','output1:522224 output2:522224 output3:467008 output4:1395220 output5:114000')"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] Time: 3.2131 s, Theads: N/A, Hosts: 1
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name)"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select data_template_rrd.data_source_name, data_input_fields.data_name from (data_template_rrd,data_input_fields) where data_template_rrd.data_input_field_id=data_input_fields.id and data_template_rrd.local_data_id=12"
04/27/2006 11:25:04 AM - POLLER: Poller[0] Parsed MULTI output field 'output2:522224' [map output2->output2]
04/27/2006 11:25:04 AM - POLLER: Poller[0] Parsed MULTI output field 'output3:467008' [map output3->output3]
04/27/2006 11:25:04 AM - POLLER: Poller[0] Parsed MULTI output field 'output4:1395220' [map output4->output4]
04/27/2006 11:25:04 AM - POLLER: Poller[0] Parsed MULTI output field 'output5:114000' [map output5->output5]
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='12' and rrd_name='' and time='2006-04-27 11:25:00'"
04/27/2006 11:25:04 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /www/htdocs/cacti/rra/estruc_output5_12.rrd --template output2:output3:output4:output5 1146147900:522224:467008:1395220:114000
04/27/2006 11:25:04 AM - SYSTEM STATS: Time:4.1562 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('stats_poller','Time:4.1562 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1')"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_output"
04/27/2006 11:25:04 AM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_command"
Thanks for a help.
Estruc.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
The script's output is ok. But the mapping is wrong, so the rrdtool update fails. Please post a bug referring to this post at http://bugs.cacti.net
Reinhard
Reinhard
Who is online
Users browsing this forum: No registered users and 1 guest