Professional Documents
Culture Documents
First to all we need to get the latest version of WMI script in order to compile and install it, to achieve this issue the following command from the terminal:
WMI INSTALLATION ######################################### ########################################### ## Download WMI Plugin from Cacti.net yum install subversion cd /tmp/ svn export http://dev.zenoss.org/svn/tags/wmi-1.3.14/ cd /tmp/wmi-1.3.14/Samba/source ./autogen.sh ./configure make all make install ## Check the version of WMI cd bin ls -l wmic ./wmic --version
## copy wmic to the appropriate location cp wmic /usr/local/bin ### You may see an error like this, which you can safely ignore.: #### make: *** No rule to make target `wmi/wmiq.o', needed by `bin/wmiq'. Stop.
### You will now have the wmic binary in /tmp/wmi-1.3.14/Samba/source/bin The ### wmic binary is the only file needed. You can safely delete the wmi directory ### after you stored the wmic binary to a safe place. #### Get wmi.php script from: http://svn.parkingdenied.com/CactiWMI/trunk/ http://svn.parkingdenied.com/CactiWMI/trunk/wmi.php cp wmi.php /var/www/web1/public_html/cacti/scripts ## You must copy this file to cactis scripts folder in order to work WMI from cacti. ####### Modify utility.php ################################# #################################### ### Because a bug # vi /var/www/web1/public_html/cacti/lib/utility.php ### The "addslashes($script_path)" should be "$script_path" only in the lines 129 and 279
-p /etc/cacti -p /var/log/cacti/wmi admin:admin /etc/cacti -R admin:admin /var/log/cacti/wmi -R 700 /etc/cacti -R 700 /var/log/cacti/wmi -R
vi /etc/cacti/cactiwmi.pw username=wmiuser password=Jh0n123456 domain=WORKGROUP #### Import data template and create a new graph http://svn.parkingdenied.com/CactiWMI/trunk/templates/
Enjoy!!!
### NOTE ### ############ In windows server 2008/7 the user used to perform WMI queries must be part of the groups Performance Log Users and Performance Monitor Users