no data output on data query (get)

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

Moderators: Developers, Moderators

szogun3k
Posts: 14
Joined: Thu Apr 13, 2006 4:48 am

no data output on data query (get)

Post by szogun3k »

i have strange behaviour of my script that is used by this xml. when i make verbose query on device everithing is fine it reads all data from input direction (ip, ip2,mac) after that it even makes graphs but without any data a make some debug function in my script to see with which args it is started and i get only few (index, query ip,query ip2, query mac)but i never get with 'get {indexed_item}'
this is what i have in data input method on input string

Code: Select all

<path_cacti>/scripts/stat.pl <ip>
input type i try evething what it was there i also have in this one input field <ip> and 2 output fields 'up' and 'down'
i also make data query with 2 field also named up down which corresponds to this XML with fields ifOut and ifIn
but in both ways my scipt is not executed with any args to cllect data.

Code: Select all

 <interface>
        <name>statystyki</name>
        <description>statystyki</description>
        <script_path>perl |path_cacti|/scripts/stat.pl</script_path>
        <arg_index>index</arg_index>
        <arg_query>query</arg_query>
        <arg_get>get</arg_get>
        <arg_num_indexes>num_indexes</arg_num_indexes>
        <output_delimeter>:</output_delimeter>
        <index_order>IfIndex</index_order>
        <index_order_type>alphabetic</index_order_type>
        <index_title_format>|chosen_order_field|</index_title_format>

        <fields>
                <ifIndex>
                        <name>ip</name>
                        <direction>input</direction>
                        <query_name>ip2</query_name>
                </ifIndex>
                <ifName>
                        <name>Nazwa</name>
                        <direction>input</direction>
                        <query_name>ip</query_name>
                </ifName>
                <ifMac>
                        <name>MAC</name>
                        <direction>input</direction>
                        <query_name>mac</query_name>
                </ifMac>
                <IfOut>
                        <name>download</name>
                        <direction>output</direction>
                        <query_name>down</query_name>
                </IfOut>
                <IfIn>
                        <name>upload</name>
                        <direction>output</direction>
                        <query_name>up</query_name>
                </IfIn>
        </fields>
</interface>
if you need anything else to help in solving this problem just write this.
i didnt mentiont that my script can return data in diffrent ways (i made it when i try to solve this problem alone)[/code]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

When creating a Script Query, no definitions for a Data Input Method are required! If you want to hand over parameters to your script, please use sth like

Code: Select all

<arg_prepend>|host_hostname| |host_snmp_community| |host_snmp_version|</arg_prepend>
depending on what you need as an input to your script.
Reinhard
szogun3k
Posts: 14
Joined: Thu Apr 13, 2006 4:48 am

Post by szogun3k »

problem is not that i dont get any data, problem is i dont get data from output
on verbose query almost everything is fine
staty.pl index returns indexes
staty.pl query ip returns correct data
other queries also returns correct data, but there is no data collected to graphs and rrd files
in my debug mode i have only recorded that cacti only runs index and query args it never run get method to collect data to indexes, i also in my script made something like this
(correspond to XML input and output)
staty.pl query down returns index:down values for all indexes
staty.pl query up returns index:up values for all indexes
all values up,down are integer and greater or equal 0
but still its not runnig my script with correct args
( i think it should be

Code: Select all

 staty.pl get {index} up
which returns value as interger
or

Code: Select all

staty.pl get {index}
which return value like up:integer1 down:integer2
but as i wrote before its not making get method.
(indexes are ip addresses)
maybe there is a problem wich so many indexes (181 and more)??
also i found that when i add

Code: Select all

<arg_prepend>|host_hostname|</arg_prepend>
it is much easier to add other routers (without making another script and XML)

my script recognize those args:
index, query, get with no matter which arg that is i made it to log args that are entered to scripts, my script also make connection to to |host_hostname| to collect data and it needs about 20ms to collect all of theme.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I'm quite sure that (at least for the latest cactid)

Code: Select all

<script_path>perl |path_cacti|/scripts/stat.pl</script_path>
should be replaced by

Code: Select all

<script_path>/full/path/to/perl |path_cacti|/scripts/stat.pl</script_path>
Please post your script and I'll give it a try
Reinhard
szogun3k
Posts: 14
Joined: Thu Apr 13, 2006 4:48 am

Post by szogun3k »

i try it too, but i think this is something in cacti because us you can see this XML is propably ok (Verbose query in device returns correct ip,ip2,mac values) but cacti (cmd.php or cactid no matter it is the same effect) dont collect other data like output with which it should make graphs.
i. e.
i add new associated data queries.
select my data query. no problem
i push verbose query. no problem
to this point everything is perect i see that cacti runs my script with proper args
i select create graphs for this host. no problem
i see table with IPs,MACs and names of all indexes. no problem
i select those IPs to make graph. no problem
and now, sometimes it makes graphs and sometime i does not( no rrd file), but even if it make graph it is empty, and i see that my script runs never more. and that is a real problem to me.[/i]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You may be correct.
But all actions you perform online will use some other ENVIRONMENT compared to that of cactid (and, perhaps cmd.php) run by the poller. So, that what's running fine via browser may go wrong via poller.
So the full path is really recommended. But your problems may have some other source. So please switch Settings->Logging Level to DEBUG for ONE polling cycle and post the outcome of this run.
Reinhard
szogun3k
Posts: 14
Joined: Thu Apr 13, 2006 4:48 am

Post by szogun3k »

Code: Select all

 04/13/2006 11:00:22 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select realm_id from user_auth_realm where user_id=1"
04/13/2006 11:00:22 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select username from user_auth where id=1"
04/13/2006 11:00:22 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select user_auth_realm.realm_id from user_auth_realm where user_auth_realm.user_id='1' and user_auth_realm.realm_id='15'"
04/13/2006 11:00:22 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select id from user_auth where username='guest'"
04/13/2006 11:00:22 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select cacti from version"
04/13/2006 10:59:01 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_command"
04/13/2006 10:59:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_output"
04/13/2006 10:59:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('stats_poller','Time:1.0801 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0')"
04/13/2006 10:59:01 PM - SYSTEM STATS: Time:1.0801 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
04/13/2006 10:59:01 PM - 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/13/2006 10:59:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/13/2006 10:59:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('date',NOW())"
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())"
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] ERROR: Either there are no items in the cache or polling is disabled
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "SELECT count(*) from poller_item WHERE (action=2 AND (host_id >= 0 and host_id <= 14))"
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "SELECT * from poller_item WHERE (host_id >= 0 and host_id <= 14) ORDER by host_id"
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select * from host where (disabled = '' and id >= 0 and id <= 14) ORDER by id"
04/13/2006 10:59:00 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/html/kakti/cmd.php 0 14]
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_time"
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('path_webroot','/var/www/html/kakti')"
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id from host where disabled = '' order by id"
04/13/2006 10:59:00 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item"
us i see there is nothing here :cry: maybe you can find anything
this is log from cmd.php
for a few mins i put another debug log for cactid if its diffrent.
for future questions:
yes i select to log everything also snmp graph rrd events
yes i select to log poller stats warnings and errors
this log is propably for 2 items added (but not graphed) but i cant see in this log any device
device No 14 its that unfortunate device with ma script query
szogun3k
Posts: 14
Joined: Thu Apr 13, 2006 4:48 am

Post by szogun3k »

Code: Select all

 04/13/2006 11:09:01 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_command"
04/13/2006 11:09:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_output"
04/13/2006 11:09:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('stats_poller','Time:1.0903 Method:cactid Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0')"
04/13/2006 11:09:01 PM - SYSTEM STATS: Time:1.0903 Method:cactid Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
04/13/2006 11:09:01 PM - 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/13/2006 11:09:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_id,end_time from poller_time where poller_id = 0"
04/13/2006 11:09:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('date',NOW())"
04/13/2006 11:09:01 PM - CACTID: Poller[0] Time: 0.6317 s, Threads: 1, Hosts: 2
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MYSQL Free & Close Completed
04/13/2006 11:09:01 PM - CACTID: Poller[0] CACTID: Net-SNMP API Shutdown Completed
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: Allocated Variable Memory Freed
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: PHP Script Server Pipes Closed
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: Thread Cleanup Complete
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '3': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '3': 'insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())'
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '2': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '2': 'replace into settings (name,value) values ('date',NOW())'
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 0
04/13/2006 11:09:01 PM - CACTID: Poller[0] Host[14] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '25': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '25': 'SELECT action,hostname,snmp_community,snmp_version,snmp_username,snmp_password,rrd_name,rrd_path,arg1,arg2,arg3,local_data_id,rrd_num,snmp_port,snmp_timeout FROM poller_item WHERE host_id=14 ORDER BY arg1'
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '1': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '1': 'update poller_reindex set assert_value='29589471' where host_id='14' and data_query_id='12' and arg1='.1.3.6.1.2.1.1.3.0''
04/13/2006 11:09:01 PM - CACTID: Poller[0] Host[14] RECACHE: Processing 1 items in the auto reindex cache for '195.205.236.1'
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '24': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '24': 'SELECT data_query_id,action,op,assert_value,arg1 FROM poller_reindex WHERE host_id=14'
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '0': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Insert ID '0': '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='1.411200',max_time='221.425000',cur_time='1.607420',avg_time='116.729058',total_polls='1655',failed_polls='0',availability='100.0000' where id='14''
04/13/2006 11:09:01 PM - CACTID: Poller[0] Host[14] SNMP Result: Host responded to SNMP
04/13/2006 11:09:01 PM - CACTID: Poller[0] Host[14] PING Result: UDP: Host is Alive
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: The UDP Ping return_code was -1, errno was 111, total_time was 1199.9607
04/13/2006 11:09:01 PM - CACTID: Poller[0] WARNING: Falling back to UDP Ping due to not running asroot. Please use "chmod xxx0 /usr/bin/cactid" to resolve.
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '23': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '23': 'SELECT id, hostname,snmp_community,snmp_username,snmp_password,snmp_version,snmp_port,snmp_timeout,status,status_event_count,status_fail_date,status_rec_date,status_last_error,min_time,max_time,cur_time,avg_time,total_polls,failed_polls,availability FROM host WHERE id=14'
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 1
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: Valid Thread to be Created
04/13/2006 11:09:01 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'kaktus' on 'localhost'...
04/13/2006 11:09:01 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'kaktus' on 'localhost'...
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: In Poller, About to Start Polling of Host
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 0
04/13/2006 11:09:01 PM - CACTID: Poller[0] Host[0] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '22': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '22': 'SELECT action,hostname,snmp_community,snmp_version,snmp_username,snmp_password,rrd_name,rrd_path,arg1,arg2,arg3,local_data_id,rrd_num,snmp_port,snmp_timeout FROM poller_item WHERE host_id=0 ORDER BY arg1'
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: The Value of Active Threads is 1
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: Valid Thread to be Created
04/13/2006 11:09:01 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'kaktus' on 'localhost'...
04/13/2006 11:09:01 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'kaktus' on 'localhost'...
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: In Poller, About to Start Polling of Host
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: Initial Value of Active Threads is 0
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '21': OK
04/13/2006 11:09:01 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '21': 'SELECT id FROM host WHERE disabled='' AND id BETWEEN 0 AND 14 ORDER BY id'
04/13/2006 11:09:01 PM - CACTID: Poller[0] CACTID: Initializing PHP Script Server
04/13/2006 11:09:00 PM - CACTID: Poller[0] CACTID: Initializing Net-SNMP API
04/13/2006 11:09:00 PM - CACTID: Poller[0] MYSQL: Connected to MySQL database 'kaktus' on 'localhost'...
04/13/2006 11:09:00 PM - CACTID: Poller[0] MYSQL: Connecting to MySQL database 'kaktus' on 'localhost'...
04/13/2006 11:09:00 PM - CACTID: Poller[0] CACTID: Version 0.8.6f starting
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 10
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '20': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '20': 'SELECT value FROM settings WHERE name = 'max_get_size''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The PHP Script Server is Not Required
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: StartHost='0', EndHost='14', TotalPHPScripts='0'
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '19': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '19': 'SELECT action FROM poller_item WHERE action=2 AND host_id BETWEEN 0 AND 14 LIMIT 1'
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The number of php script servers to run is 1
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '18': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '18': 'SELECT value FROM settings WHERE name = 'php_servers''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The script timeout is 25
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '17': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '17': 'SELECT value FROM settings WHERE name = 'script_timeout''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The number of concurrent processes is 1
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '16': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '16': 'SELECT value FROM settings WHERE name = 'concurrent_processes''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The polling interval is the system default
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '15': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '15': 'SELECT value FROM settings WHERE name = 'poller_interval''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The threads variable is 1
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '14': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '14': 'SELECT value FROM settings WHERE name = 'max_threads''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The log_pstats variable is 1
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '13': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '13': 'SELECT value FROM settings WHERE name = 'log_pstats''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The log_pwarn variable is 1
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '12': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '12': 'SELECT value FROM settings WHERE name = 'log_pwarn''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The log_perror variable is 1
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '11': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '11': 'SELECT value FROM settings WHERE name = 'log_perror''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The ping_timeout variable is 400
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '10': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '10': 'SELECT value FROM settings WHERE name = 'ping_timeout''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The ping_retries variable is 1
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '9': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '9': 'SELECT value FROM settings WHERE name = 'ping_retries''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The ping_method variable is 2
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '8': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '8': 'SELECT value FROM settings WHERE name = 'ping_method''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The ping_failure_count variable is 2
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '7': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '7': 'SELECT value FROM settings WHERE name = 'ping_failure_count''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The ping_recovery_count variable is 3
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '6': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '6': 'SELECT value FROM settings WHERE name = 'ping_recovery_count''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The availability_method variable is 1
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '5': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '5': 'SELECT value FROM settings WHERE name = 'availability_method''
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: The path_php variable is /usr/bin/php
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '4': OK
04/13/2006 11:09:00 PM - CACTID: Poller[0] DEBUG: MySQL Query ID '4': 'SELECT value FROM settings WHERE name = 'path_php_binary''
04/13/2006 11:09:00 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/cactid/bin/cactid, ARGS: 0 14]
04/13/2006 11:09:00 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "truncate table poller_time"
04/13/2006 11:09:00 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "replace into settings (name,value) values ('path_webroot','/var/www/html/kakti')"
04/13/2006 11:09:00 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select id from host where disabled = '' order by id"
04/13/2006 11:09:00 PM - CMDPHP: Poller[0] DEBUG: SQL Cell: "select count(*) from poller_item"
this is log from cactid strange it is much longer then cmd.php
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

szogun3k wrote:device No 14 its that unfortunate device with ma script query
Fine, that you're running cactid. This allows for more precise debugging. Please run

Code: Select all

cactid --verbosity=5 14 14
to selectively poll host 14 (and omitting all other stuff). I need ALL output from that
Reinhard
szogun3k
Posts: 14
Joined: Thu Apr 13, 2006 4:48 am

Post by szogun3k »

Code: Select all

CACTID: Using cactid config file [/etc/cactid.conf]
CACTID: DEBUG: MySQL Query ID '0': 'SELECT value FROM settings WHERE name = 'path_webroot''
CACTID: DEBUG: MySQL Query ID '0': OK
CACTID: DEBUG: MySQL Query ID '1': 'SELECT value FROM settings WHERE name = 'path_cactilog''
CACTID: DEBUG: MySQL Query ID '1': OK
CACTID: DEBUG: The path_php_server variable is /var/www/html/kakti/script_server.php
CACTID: DEBUG: The path_cactilog variable is /var/www/html/kakti/log/cacti.log
CACTID: DEBUG: MySQL Query ID '2': 'SELECT value FROM settings WHERE name = 'log_destination''
CACTID: DEBUG: MySQL Query ID '2': OK
CACTID: DEBUG: The log_destination variable is 1 (FILE)
CACTID: DEBUG: MySQL Query ID '3': 'SELECT value FROM settings WHERE name = 'path_php_binary''
CACTID: DEBUG: MySQL Query ID '3': OK
CACTID: DEBUG: The path_php variable is /usr/bin/php
CACTID: DEBUG: MySQL Query ID '4': 'SELECT value FROM settings WHERE name = 'availability_method''
CACTID: DEBUG: MySQL Query ID '4': OK
CACTID: DEBUG: The availability_method variable is 1
CACTID: DEBUG: MySQL Query ID '5': 'SELECT value FROM settings WHERE name = 'ping_recovery_count''
CACTID: DEBUG: MySQL Query ID '5': OK
CACTID: DEBUG: The ping_recovery_count variable is 3
CACTID: DEBUG: MySQL Query ID '6': 'SELECT value FROM settings WHERE name = 'ping_failure_count''
CACTID: DEBUG: MySQL Query ID '6': OK
CACTID: DEBUG: The ping_failure_count variable is 2
CACTID: DEBUG: MySQL Query ID '7': 'SELECT value FROM settings WHERE name = 'ping_method''
CACTID: DEBUG: MySQL Query ID '7': OK
CACTID: DEBUG: The ping_method variable is 2
CACTID: DEBUG: MySQL Query ID '8': 'SELECT value FROM settings WHERE name = 'ping_retries''
CACTID: DEBUG: MySQL Query ID '8': OK
CACTID: DEBUG: The ping_retries variable is 1
CACTID: DEBUG: MySQL Query ID '9': 'SELECT value FROM settings WHERE name = 'ping_timeout''
CACTID: DEBUG: MySQL Query ID '9': OK
CACTID: DEBUG: The ping_timeout variable is 400
CACTID: DEBUG: MySQL Query ID '10': 'SELECT value FROM settings WHERE name = 'log_perror''
CACTID: DEBUG: MySQL Query ID '10': OK
CACTID: DEBUG: The log_perror variable is 1
CACTID: DEBUG: MySQL Query ID '11': 'SELECT value FROM settings WHERE name = 'log_pwarn''
CACTID: DEBUG: MySQL Query ID '11': OK
CACTID: DEBUG: The log_pwarn variable is 1
CACTID: DEBUG: MySQL Query ID '12': 'SELECT value FROM settings WHERE name = 'log_pstats''
CACTID: DEBUG: MySQL Query ID '12': OK
CACTID: DEBUG: The log_pstats variable is 1
CACTID: DEBUG: MySQL Query ID '13': 'SELECT value FROM settings WHERE name = 'max_threads''
CACTID: DEBUG: MySQL Query ID '13': OK
CACTID: DEBUG: The threads variable is 1
CACTID: DEBUG: MySQL Query ID '14': 'SELECT value FROM settings WHERE name = 'poller_interval''
CACTID: DEBUG: MySQL Query ID '14': OK
CACTID: DEBUG: The polling interval is the system default
CACTID: DEBUG: MySQL Query ID '15': 'SELECT value FROM settings WHERE name = 'concurrent_processes''
CACTID: DEBUG: MySQL Query ID '15': OK
CACTID: DEBUG: The number of concurrent processes is 1
CACTID: DEBUG: MySQL Query ID '16': 'SELECT value FROM settings WHERE name = 'script_timeout''
CACTID: DEBUG: MySQL Query ID '16': OK
CACTID: DEBUG: The script timeout is 25
CACTID: DEBUG: MySQL Query ID '17': 'SELECT value FROM settings WHERE name = 'php_servers''
CACTID: DEBUG: MySQL Query ID '17': OK
CACTID: DEBUG: The number of php script servers to run is 1
CACTID: DEBUG: MySQL Query ID '18': 'SELECT action FROM poller_item WHERE action=2 AND host_id BETWEEN 14 AND 14 LIMIT 1'
CACTID: DEBUG: MySQL Query ID '18': OK
CACTID: DEBUG: StartHost='14', EndHost='14', TotalPHPScripts='0'
CACTID: DEBUG: The PHP Script Server is Not Required
CACTID: DEBUG: MySQL Query ID '19': 'SELECT value FROM settings WHERE name = 'max_get_size''
CACTID: DEBUG: MySQL Query ID '19': OK
CACTID: DEBUG: The Maximum SNMP OID Get Size is 10
CACTID: CACTID: Version 0.8.6f starting
CACTID: MYSQL: Connecting to MySQL database 'kaktus' on 'localhost'...
CACTID: MYSQL: Connected to MySQL database 'kaktus' on 'localhost'...
CACTID: CACTID: Initializing Net-SNMP API
CACTID: CACTID: Initializing PHP Script Server
CACTID: DEBUG: MySQL Query ID '20': 'SELECT id FROM host WHERE disabled='' AND id BETWEEN 14 AND 14 ORDER BY id'
CACTID: DEBUG: MySQL Query ID '20': OK
CACTID: DEBUG: Initial Value of Active Threads is 0
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'kaktus' on 'localhost'...
CACTID: MYSQL: Connected to MySQL database 'kaktus' on 'localhost'...
CACTID: DEBUG: MySQL Query ID '21': 'SELECT action,hostname,snmp_community,snmp_version,snmp_username,snmp_password,rrd_name,rrd_path,arg1,arg2,arg3,local_data_id,rrd_num,snmp_port,snmp_timeout FROM poller_item WHERE host_id=0 ORDER BY arg1'
CACTID: DEBUG: MySQL Query ID '21': OK
CACTID: Host[0] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: The Value of Active Threads is 0
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'kaktus' on 'localhost'...
CACTID: MYSQL: Connected to MySQL database 'kaktus' on 'localhost'...
CACTID: DEBUG: MySQL Query ID '22': 'SELECT id, hostname,snmp_community,snmp_username,snmp_password,snmp_version,snmp_port,snmp_timeout,status,status_event_count,status_fail_date,status_rec_date,status_last_error,min_time,max_time,cur_time,avg_time,total_polls,failed_polls,availability FROM host WHERE id=14'
CACTID: DEBUG: MySQL Query ID '22': OK
CACTID: DEBUG: The UDP Ping return_code was -1, errno was 111, total_time was 1852.0355
CACTID: Host[14] PING Result: UDP: Host is Alive
CACTID: Host[14] SNMP Result: Host responded to SNMP
CACTID: DEBUG: MySQL Insert ID '0': '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='1.411200',max_time='221.425000',cur_time='2.199415',avg_time='116.382903',total_polls='1660',failed_polls='0',availability='100.0000' where id='14''
CACTID: DEBUG: MySQL Insert ID '0': OK
CACTID: DEBUG: MySQL Query ID '23': 'SELECT data_query_id,action,op,assert_value,arg1 FROM poller_reindex WHERE host_id=14'
CACTID: DEBUG: MySQL Query ID '23': OK
CACTID: Host[14] RECACHE: Processing 1 items in the auto reindex cache for '195.205.236.1'
CACTID: DEBUG: MySQL Insert ID '1': 'update poller_reindex set assert_value='30436607' where host_id='14' and data_query_id='12' and arg1='.1.3.6.1.2.1.1.3.0''
CACTID: DEBUG: MySQL Insert ID '1': OK
CACTID: DEBUG: MySQL Query ID '24': 'SELECT action,hostname,snmp_community,snmp_version,snmp_username,snmp_password,rrd_name,rrd_path,arg1,arg2,arg3,local_data_id,rrd_num,snmp_port,snmp_timeout FROM poller_item WHERE host_id=14 ORDER BY arg1'
CACTID: DEBUG: MySQL Query ID '24': OK
CACTID: Host[14] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: The Value of Active Threads is 0
CACTID: DEBUG: MySQL Insert ID '2': 'replace into settings (name,value) values ('date',NOW())'
CACTID: DEBUG: MySQL Insert ID '2': OK
CACTID: DEBUG: MySQL Insert ID '3': 'insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())'
CACTID: DEBUG: MySQL Insert ID '3': OK
CACTID: DEBUG: Thread Cleanup Complete
CACTID: DEBUG: PHP Script Server Pipes Closed
CACTID: DEBUG: Allocated Variable Memory Freed
CACTID: CACTID: Net-SNMP API Shutdown Completed
CACTID: DEBUG: MYSQL Free & Close Completed
CACTID: Time: 0.6250 s, Threads: 1, Hosts: 2

heh now i see that cactid realy try to run my host but i dons see any errors maybe error is that udp ping returns -1 and some error code but on next line it wrote host ok is a live. so i dont understand what it talks to me
:x





i also try to made some hack and switch rrd file to my (data on server is also collect with rrdtool and even i make form theme graphs but i like tree view in cacti)
my hack:
i transfer rrd file from host to localmachine.
i change rrd file in data source in graph
but on graph i get |query_ifIndex| in title, and not ip which should be displayed and correcty ( i think) readed from script.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

While the ping time is huge, the UDP ping said that the target is alive. So this one's good. Bute

Code: Select all

CACTID: DEBUG: MySQL Query ID '24': 'SELECT action,hostname,snmp_community,snmp_version,snmp_username,snmp_password,rrd_name,rrd_path,arg1,arg2,arg3,local_data_id,rrd_num,snmp_port,snmp_timeout FROM poller_item WHERE host_id=14 ORDER BY arg1' 
seems to give no results, as the poller finishes directly afterwards. This occurs, when no Graph has been requested. Please have a look at the Poller Cache and try to find entries for this host. I assume you'll find none. So cacti hasn't got any clue what to do for this host. In this case, the Create Graphs for this Host must have had a problem. Did you get a response Created ... from this?
Reinhard
szogun3k
Posts: 14
Joined: Thu Apr 13, 2006 4:48 am

Post by szogun3k »

yes i've got returned message that "many graphs" has been created and that rrd file are present in rra directory, another thing i saw that some data sources created for graphs has no rrd in data source path, and then when i go to graph managment and turn on graph debug it says that there is no rrd file. isnt it strange? there is no data source path but graph knows what source path is.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

szogun3k wrote:yes i've got returned message that "many graphs" has been created and that rrd file are present in rra directory, another thing i saw that some data sources created for graphs has no rrd in data source path, and then when i go to graph managment and turn on graph debug it says that there is no rrd file. isnt it strange? there is no data source path but graph knows what source path is.
Please delete ALL resources (Graphs, Data Sources) for the failing Data Query of that Host. Then, re-create them and post a screenshot of the returned result
Of course, cacti knows about the data source paths because it defines them. But creation of rrd files is done by the poller. Following conditions must hold: the host must be detected as "up", the poller cache must hold an item (with path) to be retrieved, the rrd file must not exist yet. Then, the poller will try to create the file; and will of course retrieve data and fill the file.
Reinhard
szogun3k
Posts: 14
Joined: Thu Apr 13, 2006 4:48 am

Post by szogun3k »

this is only a part of all returned data, but all are the same us i wrote before there is more then 200 graphs created at the time for every host
Attachments
snapshot1
snapshot1
snap1.JPG (75.4 KiB) Viewed 6459 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post your perl script and the XML file. I need to reproduce this on my own.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests