Stupid Question

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Stupid Question

Post by Sullen_Scrota »

Im sure this is a stupid question, but I cant work it out and google isnt helping

I have configured a data template, graph template, host template. A data query, host etc etc.

Im snmp polling the host, and the data is getting back to cacti. A device -> host _. Associated Data Query -> verbose query show all the oids.

but when running the poller with php -q cmd.php 2 2 all I get is

"There are no items in your poller for this polling cycle".

What have I missed ?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

did you create graphs ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Post by Sullen_Scrota »

fmangeant wrote:Hi

did you create graphs ?
Yes, I have created graphs.

For some reason the poller_item database table is never updated.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Errors in your log?

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Post by Sullen_Scrota »

There wasnt anything in the log, it just didnt seem to understand that it was supposed to contact this host and create a graph.

Im gonna start from scratch again.
Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Post by Sullen_Scrota »

Ok, this has to be something stupidly simple.

I have created

A data template
A graph template
A data query
a host template
a host

When I select create graphs for the host, it displays the graph template I created and the Data Query is successful, as it shows a successful walk of the index OID.

I select an item from the Data Query and click create.

I click on graphs in list mode, and it shows the graph I have created.

I click on the graph and get a broken link icon.

I run the poller and all it collects is the default localhost stuff.

If I use phpmyadmin to look in the poller_item table in the database, there is no entry for the graph I have just created.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Do you see a "Data Source" for that very host?
Reinhard
Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Post by Sullen_Scrota »

How do I check that the data source is associated with the host ?

Regards
Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Post by Sullen_Scrota »

If you mean does the host have an "Associated Data Queries" then yes it does.

This data query is also working as the status shows Success 123 items.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The third entry on the left menu bar under Management is named "Data Sources". Select this one and filter for your host. Then report your results
Reinhard
Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Post by Sullen_Scrota »

Screenshot attached (hopefully)
Attachments
Datasources.JPG
Datasources.JPG (92.68 KiB) Viewed 11953 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

To sum up:
You've got two Data Sources, but "System Utlities -> View Poller Cache" does not show anything for that very host. Running the poller against this host gives you nothing. But Verbose Query for that Data Query gives results.
You find the Graphs at Graph List (and surely at Graph Management). but selecting it gives broken results (DEBUG at graph management will show a missing rrd file).
The host itself is detected as up? Please switch poller verbosity to debug and poll again for host 2 only (as given above). Post results.
Reinhard
Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Post by Sullen_Scrota »

gandalf wrote:To sum up:
You've got two Data Sources,
Yes.
gandalf wrote: but "System Utlities -> View Poller Cache" does not show anything for that very host.
Correct.
gandalf wrote: Running the poller against this host gives you nothing.
Correct.
gandalf wrote:But Verbose Query for that Data Query gives results.
Correct.
gandalf wrote:You find the Graphs at Graph List (and surely at Graph Management). but selecting it gives broken results (DEBUG at graph management will show a missing rrd file).
Correct.
gandalf wrote:The host itself is detected as up?
The host status shows as unknown
gandalf wrote:Please switch poller verbosity to debug and poll again for host 2 only (as given above). Post results.
Reinhard
In Settings->General, I have set poller logging level to debug, and checked statistics, warnings and errors.

The following command

php cmd.php 2 2

gives the follwing output

[cactiuser@ntsgprspc cacti]$ php cmd.php 2 2
11/13/2007 09:14:14 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle !

The cacti.log for the next poller iteration shows the following

[cactiuser@ntsgprspc log]$ more cacti.log
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item where rrd_next_step<=0"
11/13/2007 09:15:01 PM - POLLER: Poller[0] DEBUG: Poller Int: '300', Cron Int: '300', Time Since Last: '301', Max Runtime '298', Poller Runs: '1'
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('poller_lastrun',1194988501)"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id from host where disabled = '' order by id"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('path_webroot','/home/www/html/cacti')"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "TRUNCATE TABLE poller_time"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT local_data_id, rrd_name FROM poller_output"
11/13/2007 09:15:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/bin/php, ARGS: -q /home/www/html/cacti/cmd.php 0 2]
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('date',NOW())"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id=0"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.r
rd_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 poll
er_output.rrd_name=poller_item.rrd_name) LIMIT 10000"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: " SELECT * FROM host WHERE (disabled = '' AND id >= 0 AND id <= 2) ORDER by id"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT * FROM poller_item WHERE (host_id >= 0 AND host_id <= 2 AND rrd_next_step <=
0) ORDER by host_id"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT count(*) FROM poller_item WHERE (action=2 AND host_id >= 0 AND host_id <= 2
AND rrd_next_step <= 0)"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_next_step - 300 WHERE (host_id >= 0 AND hos
t_id <= 2)"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_step - 300 WHERE (rrd_next_step < 0 AND hos
t_id >= 0 AND host_id <= 2)"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] WARNING: sockets support not enabled in PHP, falling back to SNMP ping
11/13/2007 09:15:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[1] Ping Time was not numeric
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] Host[1] PING: Ping not performed due to setting.
11/13/2007 09:15:01 PM - 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 = '0.00000', max_time = '0.00000', cur_time = '0', avg_time = '0', total_
polls = '321', failed_polls = '0', availability = '100' where hostname = '127.0.0.1'"
11/13/2007 09:15:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_reindex.data_query_id, poller_reindex.action, poller_reindex.op, poll
er_reindex.assert_value, poller_reindex.arg1 from poller_reindex where poller_reindex.host_id=1"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /home/www/html/cacti/scripts/linux_memory.pl MemFree:, output: 3324
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (3, 'mem_buffers',
'2007-11-13 21:15:01', '3324')"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /home/www/html/cacti/scripts/linux_memory.pl SwapFree:, output: 286588
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (4, 'mem_swap', '20
07-11-13 21:15:01', '286588')"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /home/www/html/cacti/scripts/loadavg_multi.pl, output: 1min:0.48 5min:0.12 10min:0.03
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (5, '', '2007-11-13
21:15:01', '1min:0.48 5min:0.12 10min:0.03')"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /home/www/html/cacti/scripts/unix_users.pl , output: 1
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (6, 'users', '2007-
11-13 21:15:01', '1')"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /home/www/html/cacti/scripts/unix_processes.pl, output: 151
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (7, 'proc', '2007-1
1-13 21:15:01', '151')"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] Time: 0.2529 s, Theads: N/A, Hosts: 2
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item where rrd_next_step<=0"
11/13/2007 09:15:02 PM - POLLER: Poller[0] DEBUG: Poller Int: '300', Cron Int: '60', Time Since Last: '1', Max Runtime '58', Poller Runs: '0.2'
11/13/2007 09:15:02 PM - POLLER: Poller[0] NOTE: Cron is configured to run too often! The Poller Interval is '300' seconds, with a minimum Cron period o
f '300' seconds, but only 1 seconds have passed since the poller last ran.
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id=0"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_output.output, poller_output.time, poller_output.local_data_id, poller_item.r
rd_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 poll
er_output.rrd_name=poller_item.rrd_name) "
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select data_template_rrd.data_source_name, data_input_fields.data_name from (data_tem
plate_rrd,data_input_fields) where data_template_rrd.data_input_field_id=data_input_fields.id and data_template_rrd.local_data_id=5"
11/13/2007 09:15:02 PM - POLLER: Poller[0] Parsed MULTI output field '1min:0.48' [map 1min->load_1min]
11/13/2007 09:15:02 PM - POLLER: Poller[0] Parsed MULTI output field '5min:0.12' [map 5min->load_5min]
11/13/2007 09:15:02 PM - POLLER: Poller[0] Parsed MULTI output field '10min:0.03' [map 10min->load_15min]
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='7' and rrd_name='proc' and time='2007-11-13 2
1:15:01'"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='6' and rrd_name='users' and time='2007-11-13
21:15:01'"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='5' and rrd_name='' and time='2007-11-13 21:15
:01'"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='4' and rrd_name='mem_swap' and time='2007-11-
13 21:15:01'"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='3' and rrd_name='mem_buffers' and time='2007-
11-13 21:15:01'"
11/13/2007 09:15:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /home/www/html/cacti/rra/localhost_proc_7.rrd --template proc
1194988501:151
11/13/2007 09:15:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /home/www/html/cacti/rra/localhost_users_6.rrd --template use
rs 1194988501:1
11/13/2007 09:15:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /home/www/html/cacti/rra/localhost_load_1min_5.rrd --template
load_1min:load_5min:load_15min 1194988501:0.48:0.12:0.03
11/13/2007 09:15:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /home/www/html/cacti/rra/localhost_mem_swap_4.rrd --template
mem_swap 1194988501:286588
11/13/2007 09:15:02 PM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /home/www/html/cacti/rra/localhost_mem_buffers_3.rrd --templa
te mem_buffers 1194988501:3324
11/13/2007 09:15:02 PM - SYSTEM STATS: Time:1.2079 Method:cmd.php Processes:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('stats_poller','Time:1.2079 Method:cmd.php Proces
ses:1 Threads:N/A Hosts:3 HostsPerProcess:3 DataSources:5 RRDsProcessed:5')"
11/13/2007 09:15:02 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_command"
[cactiuser@ntsgprspc log]$


Regards (and tyvm)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Status "unknown" is default for devices with no associated Graph Templates|Data Queries|Poller Item entries.
Please post XML to get an idea why nothing is entered into Poller cache
Reinhard
Sullen_Scrota
Posts: 14
Joined: Mon Nov 12, 2007 9:13 am

Post by Sullen_Scrota »

gandalf wrote:Status "unknown" is default for devices with no associated Graph Templates|Data Queries|Poller Item entries.
Please post XML to get an idea why nothing is entered into Poller cache
Reinhard
Im sorry, I dont understand your question
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests