Linux to Windows WMI Plugin - Beta
Moderators: Developers, Moderators
I had actually written this several months ago, just haven't had the time to clean it up enough to release it. That and I wanted to finish several other options (auto building of XML files, Data Queries, Data Templates) but instead went ahead and put it out their in case anyone else found it handy.
It still has a long way to go, but it works fairly well in my setup.
It still has a long way to go, but it works fairly well in my setup.
Sorry dude, read your post wrong, apologies.
It's an excellent bit of work, if I had your skill, I'd certainly help you out with the development, alas I'm just a humble network engineer.
Saying this, I will have a long hard look at it, even if I can't figure out the code, I should be able to do some nice templates.
It's an excellent bit of work, if I had your skill, I'd certainly help you out with the development, alas I'm just a humble network engineer.
Saying this, I will have a long hard look at it, even if I can't figure out the code, I should be able to do some nice templates.
If you could create some templates for it, that would be awesome. I created a few but I don't particularly monitor much through WMI just yet. Let me know if I can give you any pointers on how to go about it. Most of it fairly easy to accomplish as is, just a quick change in the XML and Data Queries I already have.
I'm throwing this into beta for our users next week, so I should have some templates to flip back in a couple of weeks.
But since it is Windows, the users ask for some pretty retarded stuff, so they may not be all that useful
But since it is Windows, the users ask for some pretty retarded stuff, so they may not be all that useful
--
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Eruh, did you say reeetaaarrrrdddded?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
That's how a lot of SNMP queries like interface traffic already work. The device actually records bytes-transferred-ever and Cacti figures out the rate from that.claymen wrote:I'm wondering how this plugin handles WMI data which has to be cooked and also recorded over time. E.g. disk I/O which requires two queries an interval apart to work out reads/writes per interval.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Well I configured it all up today and ran into a few problems.
a) passwords are not being escaped or encapsulated when passed to the command line. this means for companies like us where we have a mandatory complex password with random ascii char's that the script will fail.
b) fixing that issue noted above breaks the database query as adjusting the actual path it executes to encapsulate the password and username in ' means it un encapsulates part of a SQL query.
I'll have a look tomorrow and see whether I can work around this. Otherwise it seems to be quite a nice solution although I have not tested how well it'll handle the cooking as it wasnt a straight forward over time calc it uses a frequency as well.
Check out some here
http://search.cpan.org/src/JDB/Win32-Pe ... /calc.html
a) passwords are not being escaped or encapsulated when passed to the command line. this means for companies like us where we have a mandatory complex password with random ascii char's that the script will fail.
b) fixing that issue noted above breaks the database query as adjusting the actual path it executes to encapsulate the password and username in ' means it un encapsulates part of a SQL query.
I'll have a look tomorrow and see whether I can work around this. Otherwise it seems to be quite a nice solution although I have not tested how well it'll handle the cooking as it wasnt a straight forward over time calc it uses a frequency as well.
Check out some here
http://search.cpan.org/src/JDB/Win32-Pe ... /calc.html
Either that, or the script is in DOS format with ^M's at the end of each line. Try running it through dos2unix...cigamit wrote:It means it needs the SH shell
#!/bin/sh
Honestly, if you are having trouble at this point, the dependencies are going to be a nightmare for you to fix. What OS are you running on?
Sean
When I was testing, I could not get the binaries to work at all (wmic) if you have a ' or " in the password, so I didn't bother implementing that into the plugin. I work for a company that mandates random 14 character password with multiple symbols, but they don't mandate that there has to be a \ " ' in it, so we just don't use those symbols by general rule of thumb.
The issue isnt having ' or \ in a password its that when passing characters like @ or # etc through to the script it is causing bash to freak out.
With that said this is more a failing with cacti as I would have hoped that when passing data to the command line that it would escape any nasty characters out.
Additionally what we were doing was encapsulating the password with single quotes which worked for our existing scripts but doesnt work for the plugin. Additionally on some versions of cacti it would throw some nasty SQL errors which again concerns me that these arent being escaped before being put into a SQL query.
With that said this is more a failing with cacti as I would have hoped that when passing data to the command line that it would escape any nasty characters out.
Additionally what we were doing was encapsulating the password with single quotes which worked for our existing scripts but doesnt work for the plugin. Additionally on some versions of cacti it would throw some nasty SQL errors which again concerns me that these arent being escaped before being put into a SQL query.
cigamit-
First, thanks for working on this plugin, we just started testing/working with cacti a few weeks ago and your plugin will be a HUGE help in us finally getting performance metrics on all of our servers.
That said, I have a few questions/observations:
1. in the zip file in the original post, I think you have the SMTP Queues template but the Exchange messages resource XML. No biggie as I was able to use both to create my own but it took me a while to sort that out. I might also be completely off base here so my apologies if I am.
2. For anyone authenticating off A/D, I could not get 2003-style usernames working (user@domain) and had to use the older DOMAIN\user format (this is probably due to our domain being misconfigured versus the script). HOWEVER, you have to use a double-backslash in the username (ie, domain\\username) in the account setup otherwise the query fails. This has taken me 4 days to figure out.
That's all for now, I literally just got the query working 5 minutes ago so if/when I have more information or some samples to post (not that they'd be worth much but I'll do what I can to help!) I will.
Thanks again to you all!
First, thanks for working on this plugin, we just started testing/working with cacti a few weeks ago and your plugin will be a HUGE help in us finally getting performance metrics on all of our servers.
That said, I have a few questions/observations:
1. in the zip file in the original post, I think you have the SMTP Queues template but the Exchange messages resource XML. No biggie as I was able to use both to create my own but it took me a while to sort that out. I might also be completely off base here so my apologies if I am.
2. For anyone authenticating off A/D, I could not get 2003-style usernames working (user@domain) and had to use the older DOMAIN\user format (this is probably due to our domain being misconfigured versus the script). HOWEVER, you have to use a double-backslash in the username (ie, domain\\username) in the account setup otherwise the query fails. This has taken me 4 days to figure out.
That's all for now, I literally just got the query working 5 minutes ago so if/when I have more information or some samples to post (not that they'd be worth much but I'll do what I can to help!) I will.
Thanks again to you all!
Who is online
Users browsing this forum: No registered users and 0 guests