Monitor Windows via WMI from Cacti on Linux

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

Moderators: Developers, Moderators

Post Reply
Aikidoka
Posts: 5
Joined: Mon Nov 21, 2011 9:28 am

Re: Monitor Windows via WMI from Cacti on Linux

Post by Aikidoka »

SQL and compilation/recompilation stats.
---
I've made my own template by copying the other WMI templates for SQL and changing as necessary for logging SQL compilation stats.
But when I compare the graph I get to the Graph to Perfmon they don't match - at all.

In perfmon I get about 1 or 2 blips every 20 seconds or so - very small, nothing for me to worry about.
Perfmon-SQL-compilation-stats.png
Perfmon-SQL-compilation-stats.png (19.65 KiB) Viewed 8291 times
In cacti I get figures in the 300 range.
cacti-SQL-compilation-stats.png
cacti-SQL-compilation-stats.png (24.42 KiB) Viewed 8291 times
See attached images.

Does anyone know if I've missed something or need to scale the result?
Maybe someone already has a good template they can post.

Thanks,

Aikidoka
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Monitor Windows via WMI from Cacti on Linux

Post by noname »

Aikidoka
Posts: 5
Joined: Mon Nov 21, 2011 9:28 am

Re: Monitor Windows via WMI from Cacti on Linux

Post by Aikidoka »

Excellent, thank you.

I can see from the link that I might be able to change the GPrint from normal to Exact numbers to show the Exact number.
I will give that a try as it will be much more useful when showing to TPTB so i don't ave to explain it every time.

Thanks again,

Aikidoka
artiflo
Cacti User
Posts: 76
Joined: Wed Dec 19, 2007 2:00 pm

Re: Monitor Windows via WMI from Cacti on Linux

Post by artiflo »

phalek wrote:As i was unable to find a link to a wmic binary for Centos 5.5. 32bit which is cabable of communicating with Windows 7 64bit and Windows Server 2008 R2 64 bit, i just compiled it.

You can download it here: http://www.network-outsourcing.de/uploa ... _32bit.tgz
I search to do the same thing for Centos 6.1 64bits.

How did you compile wmic for CentOS 5.5 32-bit?
angryhusband
Posts: 1
Joined: Mon Mar 05, 2012 2:05 pm

Re: Monitor Windows via WMI from Cacti on Linux

Post by angryhusband »

Guys,

I'm reading all the topics in this discussion and I'm missing a very big opportunity for cacti graphs. Correct me if I'm wrong... With a Windows host I can imagine that besides memory, cpu and disk graphs the following are the most important (if it applies):

- Exchange (seen graphs for this so perfect)
- Mssql (seen graphs for this so no complaints there)
- IIS ?? (Here is the big misser!)
Allot of other discussions are coming back to this post, and really I cannot find it... So I created them myself.

The top 2 are for linux hosts (Mod_watch) and the other 2 are through the WMI php call. (as w32 perl libraries are not for Linux, and I think Cacti should be runned with linux, no offense for the windows guys :wink: )

My Call is: "/usr/bin/php -q wmi.php -h '<host>' -u '<passwordfile>'-w Win32_PerfRawData_W3SVC_WebService -k Name -v www.dreeshosting.nl"

The only thing now is that a counter data source does not give the right output. With an Absolute I can see when there is use of the website (serving docs and getting connections). The traffic graphs are like they should be and could be used to create data usage graphs for each month.

Any suggestions for the Absolute/Counter part?
Attachments
Top 2 with mod_watch and bottom 2 with the WMI.
Top 2 with mod_watch and bottom 2 with the WMI.
cacti.jpg (230.97 KiB) Viewed 8001 times
idealshopping
Posts: 21
Joined: Mon Mar 12, 2012 10:18 am

Re: Monitor Windows via WMI from Cacti on Linux

Post by idealshopping »

Anyone got any tips for getting this to work on ubuntu 11.10?

I have cacti running ok (well getting there... Im new to cacti)

But not sure how to get the wmi client installed? Tried using the instruction from the readme file ---

BUILDING WMIC

1. Grab a copy of the latest WMI client for linux (http://dev.zenoss.org/svn/trunk/inst/externallibs)
2. Extract the files tar -jxvf wmi-x.x.x.tar.bz2
3. Change directory to wmi-x.x.x/Samba/source
4. Run ./autogen.sh
5. Now run make proto bin/wmic
6. Copy the wmic binary to /usr/local/bin/


But get error trying to run step 5. ( I also had to install autoconf and make)

make: *** No rule to make target `proto'. Stop.


obviously haven't got any further than this yet...
jay_oasis
Posts: 9
Joined: Thu Sep 30, 2010 10:51 am

Re: Monitor Windows via WMI from Cacti on Linux

Post by jay_oasis »

This thread is massive!

I am wondering if anyone has an issue with negative memory results?

Image

I have tried to search the forums but no luck
jay_oasis
Posts: 9
Joined: Thu Sep 30, 2010 10:51 am

Re: Monitor Windows via WMI from Cacti on Linux

Post by jay_oasis »

bump
maplesyrupghost
Posts: 2
Joined: Wed Jun 06, 2012 2:28 pm
Location: Canada
Contact:

Re: Monitor Windows via WMI from Cacti on Linux

Post by maplesyrupghost »

[Cacti 0.8.8a]

Hey I was wondering if someone can give me a hand. I set up Cacti, LOVING IT, and need help perfecting it. Basically the charts for linux work perfectly fine, but some of the Windows graphs arn't working. Pretty sure I'm in the right thread, I see others are frustrated as well.

There are tons of different methods, plugins, and guides in the cacti universe about getting data from Windows to Linux, but I can't seem to find a solution. The memory, disk space, CPU utilization, and network graphs seem to work pretty good, but once I add something like uptime the graphs just say 'NAN'.

Ultimately we want to be able to set up a computer at a location and monitor it remotely. It's okay if one server does the data collection for all the other Windows boxes and relays it back to us, but we can't be installing software on all the other machines. It sounds simple in one sentence but setting it up has been something of a death sentence. The hardest part is there are so many different paths to take, they all get to the same place, and all the roads are bumpy as hell.

I installed wmi-client, wbemcli, this CactiWMI-0.0.6.r101, the WMIMapper2_4_0, various templates, and someone made an excel spreadsheet showing all the ways to get data from windows to linux using Nagios & Cacti together, so I created another VM for Nagios and I have that configured and ready to go, and there is a variety of ways to use Nagios to get what I need, but the amount of documentation on the process is slim to none. Both servers are running Ubuntu 12.04 Server x64.

I'm going to keep playing with it, but just posting to let you guys know I'm struggling here waving a big S.O.S. flag!

Thanks in advance,
maplesyrupghost
Cacti 088a / Ubuntu 12.04 Server
www.bitcointrading.com
Nautics
Posts: 3
Joined: Wed Oct 03, 2012 12:20 am

Re:

Post by Nautics »

Nevermind...
limaecho
Posts: 2
Joined: Tue Dec 11, 2012 4:49 am

Re:

Post by limaecho »

Igloo wrote:Hi,

I'm trying to get the network interface graph running.

Code: Select all

/usr/bin/php -q /usr/share/cacti/site/scripts/wmi.php -h '192.168.1.241' -u '/etc/cacti/cactiwmi.pw' -w 'Win32_PerfRawData_Tcpip_NetworkInterface' -n '' -k 'Name' -v 'Intel[R] PRO_1000 XT Network Connection' -c 'BytesReceivedPersec,BytesSentPersec,BytesTotalPersec'

Is what it's putting through the script, and

Code: Select all

BytesReceivedPersec:3136588374
BytesSentPersec:364709179
BytesTotalPersec:3501297553 Name:Intel[R]_PRO_1000_XT_Network_Connection
is what is coming out of it, Now the server isn't doing any traffic at the moment and it's only on a 10/100 port, so pushing 2GB+ of data per sec seems a bit off???

Plus it's not updating the graph properly even with the dodgy data?

Image

Any help would be greatly appreciated with this :)

This is the main file server and i need to make sure it's able to cope with the new roaming profiles.
Hi Clayman and igloo

I was wondering if you guys have got a template going for this? Would appreciate it if you can upload.

Thanks
erteck
Posts: 4
Joined: Fri Jan 04, 2013 5:23 am

Re: Monitor Windows via WMI from Cacti on Linux

Post by erteck »

hi sir claymen,,

I am a new user of cacti version 0.8.8a,,this is the first time i meet this interface,,
i have a problem about the CactiWMI in my CentOS,,

sir Im begging for you to please help me for my problem,,this is the error that i get in my System Utilities-View Cacti Log File error..when Im trying to add to my WMI settings-Authentication Account
this is the error that i got...

please sir help me for my problem in cacti :cry:


01/11/2013 09:43:28 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1146', SQL:"SELECT COUNT(*) FROM plugin_wmi_accounts"
01/11/2013 09:43:28 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT * FROM plugin_wmi_accounts limit 0, 30"
01/11/2013 09:43:24 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1146', SQL:"SELECT COUNT(*) FROM plugin_wmi_accounts"
01/11/2013 09:43:24 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT * FROM plugin_wmi_accounts limit 0, 30"
01/11/2013 09:43:23 AM - CMDPHP: Poller[0] ERROR: SQL Save Command Failed for Table 'plugin_wmi_accounts'. Error was 'Table 'cacti.plugin_wmi_accounts' doesn't exist'
01/11/2013 09:42:41 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed!, Error:'1146', SQL:"SELECT COUNT(*) FROM plugin_wmi_accounts"
01/11/2013 09:42:41 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1146', SQL:"SELECT * FROM plugin_wmi_accounts limit 0, 30"

i hope you have a solution for my problem :)
ssnapp
Posts: 14
Joined: Fri Feb 15, 2013 1:37 pm

Re: Monitor Windows via WMI from Cacti on Linux

Post by ssnapp »

The memory usage graph does not work for me. I get a broken image link.

Cacti 0.8.8a
CentOS 6.3
WMI 0.0.6

All of the graphs I tried so far have worked with the exception of Disk I/O and Memory usage. I found a fix for the Disk I/O at http://www.parkingdenied.com/2009/05/21 ... -cactiwmi/
Solution: In ‘WMI – Disk I/O’ change ‘e’ to ‘b’.

Any help with getting the memory graph working would be appreciated.

Thanks
ssnapp
Posts: 14
Joined: Fri Feb 15, 2013 1:37 pm

Re: Monitor Windows via WMI from Cacti on Linux

Post by ssnapp »

So I dug into the xml file and started the old trial and error method. I changed the value in the code below to c.

Code: Select all

</hash_1400166d7c9b572827ac576e0f824f4c6c8c77>
			<hash_1400165f6b144cccf0983fda7f3fe577581d42>
				<sequence>2</sequence>
				<type>6</type>
				<value>c</value>
Since I'm posting code, here's where I changed the disk i/o xml file. The value was originally e, but I changed i to b.

Code: Select all

<hash_1400164ed4b77ef196ae89bcedf34a8e9ae71d>
				<sequence>2</sequence>
				<type>6</type>
				<value>b</value>
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Monitor Windows via WMI from Cacti on Linux

Post by phalek »

Just in case someone needs this. The wmic binary can be compiled using the process described here:

http://blog.network-outsourcing.de/cact ... on-centos/

The procedures should be the same for all *nix as long as the pre-reqs (subversion client, make, gcc ... ) are met.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests