Monitor Windows via WMI from Cacti on Linux

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

Moderators: Developers, Moderators

Post Reply
abdullahteke
Posts: 12
Joined: Thu Mar 05, 2009 7:55 am

Post by abdullahteke »

Could you send me your wmic package to abdullahteke@gmail.com
abdullahteke wrote:#wmic -V
Version 4.0.0tp4-SVN-build-UNKNOWN
claymen wrote:What version of the wmi-client are you using?
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

Yer those version numbers are useless? the real version should be on the tar file you built it from, or are you using a binary?
abdullahteke
Posts: 12
Joined: Thu Mar 05, 2009 7:55 am

Post by abdullahteke »

Thanks for everybody for your helps. Problem was solved. Actualy problem is the version of wmi-client on linux. It works with win2003 server but not 2008 server. I found new wmic from zenoss and replaced with old wmic and everything is ok. Thanks again.
claymen wrote:Yer those version numbers are useless? the real version should be on the tar file you built it from, or are you using a binary?
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Claymen, in answer to a question about monitoring processes where there is more than one process with the same name you said:
Posted: Thu May 07, 2009 9:10 am Post subject:
Yer its ideally for only unique proceses. It's easy enough to alter to look for PID but that would change each time the process is created

The only alternative is to do a data query but even then you'd have the same issue that when the app closes and relaunches it'd get a new PID.
Worked out the PID way - but that's no good, you are right, as every time it starts it get a new PID.

I'm trying to do this for SQLSERVR process, which my main SQL server is running two instances of (2k5 and 2k) is it possible to use the path that the process launched from in any way?

Worked out a way (I think) to do both processes (add fields to data source ending 0, 1, etc.. then do some cdef math to add them up, or simply graph both, but totalling may be better...?). But this could be different for each server. And if a new instance of sqlservr launches this will break the graph/datasource...)

Cheers...
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

OK CIM_Process has the executable path, and ThreadCount and Handle Count, but none of the other counters...
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Post by stormonts »

I just upgraded to Cacti 0.8.7e and I'm getting "ERROR: invalid rpn expression in: a,e,+" on the "Disk I/O" graph and "ERROR: invalid rpn expression in: e,i,-" with the "Memory usage" graph.

Looked at the CDEFs and they are "cdef=a,e,+" for the "Disk I/O" and "cdef=e,i,-" for the "Memory" What do I have to change, as they were working fine in 0.8.7b?

Thanks.
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

This has been discussed several times already, see above.

Basically there was a change in the way that cdef's worked, or the way that data points were reported to cdefs from .8.7a to .8.7b which was when the templates were written..

The next version reverted the behaviour..... Which breaks the cdefs.

You will have to manually edit the cdef's, as previously mentioned in this thread.

Argon0
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Post by stormonts »

Must have gotten bleary eyed looking through all the pages. Thanks!
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

It does get a bit daunting - I was trying to find something about processes I knew was in here earlier, would be good if you could just search a thread...
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
gasperazzo
Posts: 29
Joined: Wed Oct 08, 2008 11:51 am

Post by gasperazzo »

abdullahteke,

Can u tell what version and paste a link to get the source files? I think that i'm having the same problem.
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

This is the lastest source package for WMI
http://dev.zenoss.org/svn/trunk/inst/ex ... .9.tar.bz2
spdrmonkey
Posts: 9
Joined: Tue Aug 30, 2005 9:44 am

Post by spdrmonkey »

claymen wrote:This is the lastest source package for WMI
http://dev.zenoss.org/svn/trunk/inst/ex ... .9.tar.bz2
Has anyone had any luck with getting the above to compile? I have found multiple posts to deal with the first error of

./autogen.sh: running script/mkversion.sh
./script/mkversion.sh: 'version.h' created for Samba("4.0.0tp4-SVN-build-UNKNOWN")
./autogen.sh: running autoheader -I. -Ilib/replace
build/m4/check_cc.m4:8: error: AC_REQUIRE: circular dependency of AC_GNU_SOURCE
lib/replace/autoconf-2.60.m4:169: AC_USE_SYSTEM_EXTENSIONS is expanded from...
../../lib/autoconf/specific.m4:332: AC_GNU_SOURCE is expanded from...
lib/replace/autoconf-2.60.m4:169: AC_USE_SYSTEM_EXTENSIONS is expanded from...
build/m4/check_cc.m4:8: the top level
autom4te-2.63: /usr/bin/m4 failed with exit status: 1
autoheader-2.63: '/usr/bin/autom4te-2.63' failed with exit status: 1

by commenting out :
AC_REQUIRE([AC_GNU_SOURCE])
AC_REQUIRE([AC_AIX])
AC_REQUIRE([AC_MINIX])

starting at line 174 of Samba/source/lib/replace/autoconf-2.60.m4

but now I have :
./autogen.sh: running script/mkversion.sh
./script/mkversion.sh: 'version.h' created for Samba("4.0.0tp4-SVN-build-UNKNOWN")
./autogen.sh: running autoheader -I. -Ilib/replace
configure.ac:96: error: m4_defn: undefined macro: _AC_SUBST_VARS
configure.ac:96: the top level
autom4te-2.63: /usr/bin/m4 failed with exit status: 1
autoheader-2.63: '/usr/bin/autom4te-2.63' failed with exit status: 1

It seems from my searching that it has to do with the version of autoconf and m4. Would someone that got this to compile please post their versions of those packages? Thanks.
Thomas.Pacce
Posts: 23
Joined: Wed Apr 15, 2009 5:19 am
Location: Amsterdam

Post by Thomas.Pacce »

Hi all,

I am trying to move my cacti install (0.8.7b) running on Ubuntu server 9.01.
The destination server is ubuntu 9.04 running cacti 0.8.7b too but with a 64 bits OS.
I have made a mysql dump of the old cacti database and reimported in my new server, copied my scripts and i have used "rrdtool dump" to convert my rrd files to a portable XML format, then "rrdtool
restore" to restore them to a binary format appropriate for the 64 bits system.
Everything seems to work fine, all the snmp graphs are working OK but i use a lot of WMI scripts that are not being updated, i can run all my scripts and get the correct values, i can see the graphs with the old data, but the rrd files are no more updated, they keep frozen on the last value they get from the 32 bits host and thats it (not even a "nan"), i thought this could be a file permission issue so i did a "chown -R www-data:www-data /rra" but nope...
I have turned on debug mode but i can't see anything wrong so far, a little help would be much appreciated.

Thank you.
gatorfreak
Posts: 16
Joined: Fri Mar 27, 2009 11:09 am

Post by gatorfreak »

Cacti 0.8.7b on Ubuntu 9.04. Trying to use CactiWMI 0.0.6.

wmi.php is trying to run "/usr/local/bin/wmic" which does not exist. When I run "php -q cmd.php 13 13" it gives an error that "/usr/local/bin/wmic: not found". It seems there is no wmi-client package for Ubuntu 9.04. How do I install something that CactiWMI can use?
User avatar
streaker69
Cacti Pro User
Posts: 712
Joined: Mon Mar 27, 2006 10:35 am
Location: Psychic Amish Network Administrator

Post by streaker69 »

gatorfreak wrote:Cacti 0.8.7b on Ubuntu 9.04. Trying to use CactiWMI 0.0.6.

wmi.php is trying to run "/usr/local/bin/wmic" which does not exist. When I run "php -q cmd.php 13 13" it gives an error that "/usr/local/bin/wmic: not found". It seems there is no wmi-client package for Ubuntu 9.04. How do I install something that CactiWMI can use?
Can't you install it from source? Someone posted a link to the source package two posts up.
[b]Cacti Version[/b] - 0.8.7d
[b]Plugin Architecture[/b] - 2.4
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.18-128.1.6.el5
[b]Web Server[/b] - Apache/2.2.3 (CentOS)
[b]PHP[/b] - 5.2.9
[b]MySQL[/b] - 5.0.45-log
[b]RRDTool[/b] - 1.3.0
[b]SNMP[/b] - 5.3.2.2
[b]Plugins[/b]PHP Network Managing v0.6.1, Global Plugin Settings v0.6,thold v0.4.1,XMLPort v0.3.5,CactiCam v0.1.5,NetTools v0.1.5,pollperf v0.32,RRD Cleaner v1.1,sqlqueries v0.2,superlinks v0.8,syslog v0.5.2,update v0.4,discovery v0.9,zond v0.34a,hostinfo v0.2,Bloom v0.6.5,mactrack v1.1,weathermap v0.96a,mobile v0.1
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest