Windows WMI with Cacti on Linux server
Moderators: Developers, Moderators
-
- Posts: 26
- Joined: Mon Dec 10, 2007 10:14 am
If you have Debian/Ubuntu (Sid and Hardy respectivly) do this
sudo aptitude install wmi-client
I'm still working on the details of the language to query with but for instance
wmic -U DOMAIN/administrator%adminpassword //10.99.22.99 "Select * from Win32_Service"
Lists all services and their details.
Hope this helps someone
sudo aptitude install wmi-client
I'm still working on the details of the language to query with but for instance
wmic -U DOMAIN/administrator%adminpassword //10.99.22.99 "Select * from Win32_Service"
Lists all services and their details.
Hope this helps someone
-
- Posts: 29
- Joined: Wed Oct 08, 2008 11:51 am
felimwhiteley,
I tried to find the wmi-client source whitout success. This package is only for Debian/Ubuntu distribution? I'm using Suse Linux 10.1 and my knowledegs about Unix system is very poor! But I'm trying to learn more about.
Do you have a link to the source of wmi-client?
I think that is the best way to monitoring Windows architeture by WMI using Unix servers.
Thanks!
I tried to find the wmi-client source whitout success. This package is only for Debian/Ubuntu distribution? I'm using Suse Linux 10.1 and my knowledegs about Unix system is very poor! But I'm trying to learn more about.
Do you have a link to the source of wmi-client?
I think that is the best way to monitoring Windows architeture by WMI using Unix servers.
Thanks!
-
- Posts: 26
- Joined: Mon Dec 10, 2007 10:14 am
Hiya,
You could grab the tarball on the left of:
http://packages.ubuntu.com/hardy/wmi-client
OR You could go straight to Zennos' SVN Server At:
http://dev.zenoss.com/trac/log/trunk/wmi/
Your milage may vary as it has a lot of other stuff in there too.
You could grab the tarball on the left of:
http://packages.ubuntu.com/hardy/wmi-client
OR You could go straight to Zennos' SVN Server At:
http://dev.zenoss.com/trac/log/trunk/wmi/
Your milage may vary as it has a lot of other stuff in there too.
-
- Posts: 29
- Joined: Wed Oct 08, 2008 11:51 am
-
- Posts: 26
- Joined: Mon Dec 10, 2007 10:14 am
-
- Posts: 29
- Joined: Wed Oct 08, 2008 11:51 am
-
- Posts: 26
- Joined: Mon Dec 10, 2007 10:14 am
I'm afraid not but I did compile some of the code to get winexe running. If you scroll down this page to the compilation instructions (I downloaded a SVN snapshot rather than the static tarball)
http://eol.ovh.org/winexe/
Maybe that'll help you out. What kind of error(s) did you have anyway ?
http://eol.ovh.org/winexe/
Maybe that'll help you out. What kind of error(s) did you have anyway ?
-
- Posts: 29
- Joined: Wed Oct 08, 2008 11:51 am
Looking at the README file we have:
Thus i run the "CPPFLAGS="-I/usr/include/python2.6" ./configure" but i don't know why the configure files trying to find the files (*.mk and libs) at the "/" even I pass the --srcdir parameter... So, i copied all the files that ./configure tried to use to "/" (don't worry about this ) and run ./configure again. Apparently worked ...
Looking in the folders, i saw that files "proto bin/wmic bin/wmis wmi/_pywmi.so bin/winexe" aren't present and i cannot use the command make.
So, i think that is all...! Now i'll look the url that u send and try again!
Thanks and sorry about primate english...! I'm from Brazil and don't study english at my childhood! But on my next vacation I'm going to the U.S. to study English!
First i had errors executing the ./autogen.h (about GNU M4 i think) then i commented the lines in the autogen.sh and run again, its worked.Simple steps(change python path if necessary):
$ cd Samba/source
$ ./autogen.sh
$ CPPFLAGS="-I/usr/include/python2.4" ./configure
$ make proto bin/wmic bin/wmis wmi/_pywmi.so bin/winexe
Thus i run the "CPPFLAGS="-I/usr/include/python2.6" ./configure" but i don't know why the configure files trying to find the files (*.mk and libs) at the "/" even I pass the --srcdir parameter... So, i copied all the files that ./configure tried to use to "/" (don't worry about this ) and run ./configure again. Apparently worked ...
Looking in the folders, i saw that files "proto bin/wmic bin/wmis wmi/_pywmi.so bin/winexe" aren't present and i cannot use the command make.
So, i think that is all...! Now i'll look the url that u send and try again!
Thanks and sorry about primate english...! I'm from Brazil and don't study english at my childhood! But on my next vacation I'm going to the U.S. to study English!
-
- Posts: 29
- Joined: Wed Oct 08, 2008 11:51 am
Felimwhiteley, have good news!!
I tried to install autoconf package with the source files before.
Now I deleted my VM and back their backup to try the installation of the wmi-client again... So I install autoconf package with YAST2 (yast2 -i autoconf) and try to run the ./autogen.sh. I'm expecting the same errors at the last times but for my surprise, the autogen.sh was executed without errors!!!
Thus I run "make proto bin/wmic bin/winexe" with some WARNINGs but the make running like a charm. After running make, i run install -s bin/wmic /usr/local/bin/wmic and install -s bin/winexe /usr/local/bin/winexe.
Now I have:
Thanks!!!
I tried to install autoconf package with the source files before.
Now I deleted my VM and back their backup to try the installation of the wmi-client again... So I install autoconf package with YAST2 (yast2 -i autoconf) and try to run the ./autogen.sh. I'm expecting the same errors at the last times but for my surprise, the autogen.sh was executed without errors!!!
Thus I run "make proto bin/wmic bin/winexe" with some WARNINGs but the make running like a charm. After running make, i run install -s bin/wmic /usr/local/bin/wmic and install -s bin/winexe /usr/local/bin/winexe.
Now I have:
hohoho! Very thanks!!! I tested the query in a host and works perfectly!!!# wmic
Usage: [-?|--help] [--usage] [-d|--debuglevel DEBUGLEVEL] [--debug-stderr]
[-s|--configfile CONFIGFILE] [--option=name=value]
[-l|--log-basename LOGFILEBASE] [--leak-report] [--leak-report-full]
[-R|--name-resolve NAME-RESOLVE-ORDER]
[-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME]
[-W|--workgroup WORKGROUP] [--realm=REALM] [-i|--scope SCOPE]
[-m|--maxprotocol MAXPROTOCOL] [-U|--user [DOMAIN\]USERNAME[%PASSWORD]]
[-N|--no-pass] [--password=STRING] [-A|--authentication-file FILE]
[-S|--signing on|off|required] [-P|--machine-pass]
[--simple-bind-dn=STRING] [-k|--kerberos STRING]
[--use-security-mechanisms=STRING] [-V|--version] [--namespace=STRING]
//host query
Thanks!!!
-
- Posts: 29
- Joined: Wed Oct 08, 2008 11:51 am
Hello, i have one question about wmic...
Every time that I execute a wmic query, for example:
Thanks
Every time that I execute a wmic query, for example:
The query return is:wmic -U domain/user%password //server "select AllocatedBaseSize from Win32_PageFileUsage"
Why the name's object is displayed? I want only the AllocatedBaseSize object...CLASS: Win32_PageFileUsage
AllocatedBaseSize|Name
50|C:\pagefile.sys
6144|E:\pagefile.sys
Thanks
-
- Posts: 26
- Joined: Mon Dec 10, 2007 10:14 am
Hi gasperazzo
First off sorry but I never got an email from the forum saying you replied so I never realised you had an issues.
I've got a wrapper application (although it's a bit round-the-houses as there's better ways I realise now) but if you have any Python you could try it
http://felimwhiteley.wordpress.com/2008 ... sing-wmic/
Currently it doesn't do much bar print it out, but if you tweak the code it'd be very easy for instance to take a variable at runtime and it would output whatever it is for you. If you have trouble I could do it pretty fast for you. Let me know. Hopefully the damn forum sends me a mail this time if you reply !
First off sorry but I never got an email from the forum saying you replied so I never realised you had an issues.
I've got a wrapper application (although it's a bit round-the-houses as there's better ways I realise now) but if you have any Python you could try it
http://felimwhiteley.wordpress.com/2008 ... sing-wmic/
Currently it doesn't do much bar print it out, but if you tweak the code it'd be very easy for instance to take a variable at runtime and it would output whatever it is for you. If you have trouble I could do it pretty fast for you. Let me know. Hopefully the damn forum sends me a mail this time if you reply !
There is currently a plugin that integrates into Cacti that is basically just a wrapper around this binary.
http://forums.cacti.net/viewtopic.php?t=29392
http://forums.cacti.net/viewtopic.php?t=29392
-
- Posts: 29
- Joined: Wed Oct 08, 2008 11:51 am
No problem felimwhiteley,
I wrote perl scripts to query wmi issues using WMIC that works like a charm. Then i wrote some of data queries on Cacti to use these scripts.
So... I'll read your post but now I'm going on vacation for 2 weeks
If the question about the ouput of WMIC is true (always return the Name attribute of an instance). I'll post my dataqueries and my scripts.
Thanks man! I appreciate your help!
Cigamit,
Thanks man but this plugin won't help-me!
I wrote perl scripts to query wmi issues using WMIC that works like a charm. Then i wrote some of data queries on Cacti to use these scripts.
So... I'll read your post but now I'm going on vacation for 2 weeks
If the question about the ouput of WMIC is true (always return the Name attribute of an instance). I'll post my dataqueries and my scripts.
Thanks man! I appreciate your help!
Cigamit,
Thanks man but this plugin won't help-me!
-
- Posts: 26
- Joined: Mon Dec 10, 2007 10:14 am
Yes it is True it does indeed (well in everything I've seen, which is a fair bit) return it each time. Glad to help, enjoy your Holidays !
Same for me Cigamit, I know the Plugin Architecture is really great and it makes more sense, but until the PA is inside normal Cacti I can't keep patching the number of Cacti boxes I have then re-patching on every distro patch and upgrade.
Same for me Cigamit, I know the Plugin Architecture is really great and it makes more sense, but until the PA is inside normal Cacti I can't keep patching the number of Cacti boxes I have then re-patching on every distro patch and upgrade.
Who is online
Users browsing this forum: No registered users and 1 guest