Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Not sure if you are still trying to get this to work, but I had the same problem as you. I wanted to post my solution in case anyone in the future runs across this...
My problem was that SELinux was enabled and preventing apache from executing the python script. I had the same debug messages claiming that it was executing the query, but no results and nothing in the logs. I disabled SELinux and it started to work.
JakeB wrote:First off...thanks for your help Lalbee99 and others!!!
Yeah, I can run it from the CLI as the Apache user and my Cacti user (data returned is EVA01):
[root@itsys ~]# su cactiuser
[cactiuser@itsys root]$ python /var/www/html/cacti/scripts/query_wmi.py --host cv01.sample.domain.com --authentication-file /etc/cacti/cv01.sample.domain.com.pw --class Win32_PerfRawData_EVAPMEXT_HPEVAStorageArray index
EVA01
[cactiuser@itsys root]$ exit
exit
[root@itsys ~]# su apache
bash-4.1$ python /var/www/html/cacti/scripts/query_wmi.py --host cv01.sample.domain.com --authentication-file /etc/cacti/cv01.sample.domain.pw --class Win32_PerfRawData_EVAPMEXT_HPEVAStorageArray index
EVA01
bash-4.1$ exit
Still nothing in the Poller Cache and the Device Associated Data Query still lists: Success [0 Items, 0 Rows]
Here is the output from a Verbose Data Query:
+ Running data query [16].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/eva_virtualdisks.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'python /var/www/html/cacti/scripts/query_wmi.py --host cv01.mythos.suresource.com --authentication-file /etc/cacti/cv01.sample.domain.com.pw --class Win32_PerfRawData_EVAPMEXT_HPEVAVirtualDisk index'
+ Executing script query 'python /var/www/html/cacti/scripts/query_wmi.py --host cv01.sample.domain.com --authentication-file /etc/cacti/cv01.mythos.suresource.com.pw --class Win32_PerfRawData_EVAPMEXT_HPEVAVirtualDisk query friendlyname'
+ Executing script query 'python /var/www/html/cacti/scripts/query_wmi.py --host cv01.sample.domain.com --authentication-file /etc/cacti/cv01.mythos.suresource.com.pw --class Win32_PerfRawData_EVAPMEXT_HPEVAVirtualDisk query Name'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/eva_virtualdisks.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/eva_virtualdisks.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/eva_virtualdisks.xml'
I am having trouble installing the templates on Cacti 0.8.8. Templates from earlier package 2010-03-10 works but cacti-evaperf-2010-03-15.tar.gz does not install. I get a white page in browser and in /var/log/httpd/error_log i get:
[Mon Oct 15 09:30:42 2012] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Only variable references should be returned by reference in /var/www/cacti/lib/import.php on line 689, referer: http://xxx.xxx.com:8080/cacti/templates_import.php
[Mon Oct 15 09:30:42 2012] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Unsupported operand types in /var/www/cacti/lib/import.php on line 86, referer: http://xxx.xxx.com:8080/cacti/templates_import.php
i have the same trouble than "ltfrebac" with an cacti 0.8.8.a-2 on a CentOS 6.4 and cacti-evaperf-2010-03-15.tar.gz
Import template dosn't work ...
Sometime white page on Firefox when i Import the xml file and sometime just this :
Notice: Only variable references should be returned by reference in /usr/share/cacti/lib/import.php on line 689 Fatal error: Unsupported operand types in /usr/share/cacti/lib/import.php on line 86
and in /var/log/httpd/error_log
[Fri Aug 09 15:56:16 2013] [error] [client 1.1.1.1] PHP Notice: Only variable references should be returned by reference in /usr/share/cacti/lib/import.php on line 689, referer: http://xxxxx/cacti/templates_import.php
[Fri Aug 09 15:56:16 2013] [error] [client 1.1.1.1] PHP Fatal error: Unsupported operand types in /usr/share/cacti/lib/import.php on line 86, referer: http://xxxx/cacti/templates_import.php
php.ini :
..
file_uploads = On
..
memory_limit = 768M
An idea ... or where can i download the package 2010-03-10 who should work fine ... hummm
wmic --namespace='root\CIMV2' --authentication-file /etc/cacti/servername.pw //servername "select Name from Win32_ComputerSystem"
CLASS: Win32_ComputerSystem
Name
SERVERNAME
There is also error in RRDTool (See image)
On one compueet there is onlt QueueDepth source available, and on other none.
If you change this type to anything else it will import that template with no errors. However i don't have any clue what will happen if i change this type value to 5 or 4.