RRDs for Windows servers are not updating

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

Moderators: Developers, Moderators

Post Reply
st3rling1
Posts: 1
Joined: Wed Sep 25, 2013 3:41 pm

RRDs for Windows servers are not updating

Post by st3rling1 »

Hello,
For some reason reason running wmi.php doesn't update rrd files. All I get in cacti log is:
SCRIPT: /usr/bin/php -q /var/www/html/cacti/scripts/wmi.php -h \'10.32.0.215\' -u \'/etc/cacti/cactiwmi.pw\' -w \'Win32_ComputerSystem\' -n \'\' -k \'\' -v \'\' -c \'TotalPhysicalMemory\', output: U
CACTI2RRD: /usr/bin/rrdtool update /var/www/html/cacti/rra/maextsv08_totalphysicalmemory_23.rrd --template TotalPhysicalMemory 1380142501:U
My environment is:
Centos 6.4
Cacti 0.8.8b (freshly installed)
wmi.php v. 0.6
wmic - compiled from http://dev.zenoss.org/svn/tags/wmi-1.3.9/

If I run as root:

Code: Select all

/usr/bin/php -q /var/www/html/cacti/scripts/wmi.php -h '10.32.0.215' -u '/etc/cacti/cactiwmi.pw' -w 'Win32_ComputerSystem' -n '' -k '' -v '' -c 'TotalPhysicalMemory'
it works.

However, if I run as apache:

Code: Select all

su -s /bin/sh apache -c "/usr/bin/php -q /var/www/html/cacti/scripts/wmi.php -h '10.32.0.215' -u '/etc/cacti/cactiwmi.pw' -w 'Win32_ComputerSystem' -n '' -k '' -v '' -c 'TotalPhysicalMemory'"
I get this prompt:
Password for [WORKGROUP\apache]:
It also works if I run as cacti:

Code: Select all

[root@ndextsv04 ~]# su - cacti
[cacti@ndextsv04 ~]$ /usr/bin/php -q /var/www/html/cacti/scripts/wmi.php -h '10.32.0.215' -u '/etc/cacti/cactiwmi.pw' -w 'Win32_ComputerSystem' -n '' -k '' -v '' -c 'TotalPhysicalMemory'
Name:MAEXTSV08 TotalPhysicalMemory:17169604608
Permissions:
-rwxrwxrwx 1 cacti apache 51 Sep 25 15:15 cactiwmi.pw
-rwxr-xr-x 1 apache cacti 7172177 Sep 25 13:58 wmic
-rw-r--r-- 1 cacti cacti 47992 Sep 25 16:55 maextsv08_totalphysicalmemory_23.rrd
Any suggestions what to try next?

Thank you!
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests