cacti centos wmi monitoring windows systems
TRANSCRIPT
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
1/9
Monitoring Windows Systems with the help of WMI
service within Cacti
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
./configuremake allmake 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.
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
2/9
### You will now have the wmic binary in /tmp/wmi-1.3.14/Samba/source/binThe ### wmic binary is the only file needed. You can safely delete the wmidirectory ### 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 WMIfrom 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 thelines 129 and 279
mkdir -p /etc/cactimkdir -p /var/log/cacti/wmichown admin:admin /etc/cacti -Rchown admin:admin /var/log/cacti/wmi -Rchmod 700 /etc/cacti -Rchmod 700 /var/log/cacti/wmi -R
vi /etc/cacti/cactiwmi.pw
username=wmiuser
password=Jh0n123456domain=WORKGROUP
#### Import data template and create a new graph
http://svn.parkingdenied.com/CactiWMI/trunk/templates/
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
3/9
Enjoy!!!
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
4/9
######################################## configure windows system to reply WMI request########################################
### create a user specify in the /etc/cacti/cactiwmi.pw
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
5/9
### NOTE ###############
In windows server 2008/7 the user used to perform WMI queries must be partof the groups Performance Log Users and Performance Monitor Users
### Now we need to permit this user to use WMI service
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
6/9
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
7/9
#### Finally restart the service in order to load the changes
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
8/9
-
7/22/2019 Cacti Centos WMI Monitoring windows systems
9/9
/usr/bin/php -q /var/www/html/cacti/scripts/wmi.php -h 192.168.3.5 -u/etc/cacti/cactiwmi.pw -wWin32_PerfRawData_PerfDisk_LogicalDisk,DiskWriteBytesPersec,DiskReadsPersec,DiskReadBytesPersec,CurrentDiskQueueLength Name C\: