RRDs for Windows servers are not updating

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

Moderators: Moderators, Developers

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

RRDs for Windows servers are not updating

#1 Post by st3rling1 » Wed Sep 25, 2013 3:59 pm

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 \'\' -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 '' -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 '' -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

[[email protected] ~]# su - cacti
[[email protected] ~]$ /usr/bin/php -q /var/www/html/cacti/scripts/wmi.php -h '' -u '/etc/cacti/cactiwmi.pw' -w 'Win32_ComputerSystem' -n '' -k '' -v '' -c 'TotalPhysicalMemory'
Name:MAEXTSV08 TotalPhysicalMemory:17169604608
-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