cant get data query up when running cacti wth groundwork

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
halpita9
Posts: 8
Joined: Tue May 24, 2011 1:14 am

cant get data query up when running cacti wth groundwork

Post by halpita9 »

Hi

I have a question in setting up a Data Query in Cacti server running on Ubuntu OS.
It's run integrated to Groundwork.

I tried the documentation as it is and found different result as shown below when seeing the Verbose Query.
As I'm very much new to catic, aprreciate your feedback.

Thanks

data query : XML Path => <path_cacti>/resource/script_queries/xxx_reader.xml

+ Running data query [11].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/groundwork/cacti/htdocs/resource/script_queries/xxx_reader.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'perl /usr/local/groundwork/cacti/htdocs/scripts/abc_reader.pl index'
+ Executing script query 'perl /usr/local/groundwork/cacti/htdocs/scripts/abc_reader.pl query index'
//////i dont see any data from my perl script here ///////////////
+ Executing script query 'perl /usr/local/groundwork/cacti/htdocs/scripts/abc_reader.pl query desc'
+ Found data query XML file at '/usr/local/groundwork/cacti/htdocs/resource/script_queries/xxx_reader.xml'
+ Found data query XML file at '/usr/local/groundwork/cacti/htdocs/resource/script_queries/xxx_reader.xml'
+ Found data query XML file at '/usr/local/groundwork/cacti/htdocs/resource/script_queries/xxx_reader.xml'


when I run my perl script it gives following output............

prompt>/usr/local/groundwork/cacti/htdocs/scripts$ perl abc_reader.pl testHost query stat
0:11111
1:22222


In Poller Type , I tried cmd.php and spine(which was the preset value) both didnt work. But i didnt run any php scripts(command line) to clear poller cache as i not having php installed in the host.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: cant get data query up when running cacti wth groundwork

Post by noname »

Please make sure whether if it works properly (or not) when executed your script as poller (e.g. cactiuser).

For debugging, in crontab, add a task at the next line of poller.php like as follows:
*/5 * * * * cactiuser php /usr/local/groundwork/cacti/htdocs/poller.php > /dev/null 2>&1
*/5 * * * * cactiuser perl /usr/local/groundwork/cacti/htdocs/scripts/abc_reader.pl testHost query stat >> /tmp/query.log 2>&1
After this, what do you see in '/tmp/query.log' ?


See also:
halpita9
Posts: 8
Joined: Tue May 24, 2011 1:14 am

Re: cant get data query up when running cacti wth groundwork

Post by halpita9 »

yes, i got it working.
i had coded the script with first arguemnt for hostname. that was the reason for it not responding for "index"
so i removed it.

thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest