Monitor Windows via WMI from Cacti on Linux

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

Moderators: Developers, Moderators

Post Reply
gatorfreak
Posts: 16
Joined: Fri Mar 27, 2009 11:09 am

Post by gatorfreak »

streaker69 wrote:Can't you install it from source? Someone posted a link to the source package two posts up.
(Linux n00b) If I learn how to install from source, then I will try it.
I found this deb package: https://launchpad.net/ubuntu/jaunty/i38 ... 1:0.1.12-1
Hoping that will work.
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: (Linux n00b) If I learn how to install from source, then I will try it.
I found this deb package: https://launchpad.net/ubuntu/jaunty/i38 ... 1:0.1.12-1
Hoping that will work.
You're never going to learn as long as you're depending upon packages that others have built. Ya gotta start somewhere.
[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
gatorfreak
Posts: 16
Joined: Fri Mar 27, 2009 11:09 am

Post by gatorfreak »

I'm having the exact same problem as spdrmonkey (quoted below). That link is no longer available but version 1.3.0 is at: http://dev.zenoss.org/svn/trunk/inst/externallibs/
spdrmonkey wrote:
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.
cypherx
Posts: 4
Joined: Fri Jul 31, 2009 3:28 pm

Post by cypherx »

I'm having an issue running wmic. I'm using Ubuntu Server 9.1.
Linux version 2.6.28-13-server (buildd@vernadsky) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #45-Ubuntu SMP Tue Jun 30 20:51:10 UTC 2009

Here's the output I get when trying to execute it:

Code: Select all

FROM Win32_ComputerSystem"
Exec Status: 134

INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)0:Please_read_the_file_BUGS.txt_in_the_distribution
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)1:=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)2:PANIC_internal_error
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)3:BACKTRACE_27_stack_frames
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)4:_#0_/usr/bin/wmic(call_backtrace+0x2b)_[0x850fd27]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)5:_#1_/usr/bin/wmic(smb_panic+0x244)_[0x851001b]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)6:_#2_/usr/bin/wmic_[0x851016e]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)7:_#3_/usr/bin/wmic_[0x85101a3]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)8:_#4_[0xb7fbd400]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)9:_#5_/usr/bin/wmic_[0x844eb09]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)10:_#6_/usr/bin/wmic_[0x844eb6e]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)11:_#7_/usr/bin/wmic_[0x849b6e4]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)12:_#8_/usr/bin/wmic_[0x849c218]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)13:_#9_/usr/bin/wmic(event_loop_once+0x16)_[0x849af74]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)14:_#10_/usr/bin/wmic(composite_wait+0x40)_[0x849a962]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)15:_#11_/usr/bin/wmic(dcerpc_pipe_connect_b_recv+0x24)_[0x82cbbaf]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)16:_#12_/usr/bin/wmic(dcerpc_pipe_connect_b+0x5d)_[0x82cbc6f]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)17:_#13_/usr/bin/wmic(dcom_get_pipe+0x483)_[0x80af2a6]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)18:_#14_/usr/bin/wmic(dcom_get_pipe_recv+0x34)_[0x80af7fb]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)19:_#15_/usr/bin/wmic(dcom_proxy_async_call_recv_pipe_send_rpc+0x51)_[0x80afa8a]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)20:_#16_/usr/bin/wmic_[0x849aa1f]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)21:_#17_/usr/bin/wmic_[0x849be57]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)22:_#18_/usr/bin/wmic_[0x849c1d3]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)23:_#19_/usr/bin/wmic(event_loop_once+0x16)_[0x849af74]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)24:_#20_/usr/bin/wmic(composite_wait+0x40)_[0x849a962]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)25:_#21_/usr/bin/wmic_[0x80ab8e2]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)26:_#22_/usr/bin/wmic_[0x80ab9c1]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)27:_#23_/usr/bin/wmic_[0x809a315]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)28:_#24_/usr/bin/wmic_[0x8099a39]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)29:_#25_/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)_[0xb7e1c775]
INTERNAL ERROR: Signal 11 in pid 18040 (4.0.0tp4-SVN-build-UNKNOWN)30:_#26_/usr/bin/wmic_[0x80992c1]

Any idea's?
ekke85
Posts: 2
Joined: Fri Jan 09, 2009 8:40 pm

Nothing but the disk checks works

Post by ekke85 »

Hi

Hope you guys can help me, I have installed everything, but the only thing give me anything back is the disk space graph. Does anyone know why this would be? None of the other graphs has anything in them. It also works from the command line.

ekke85
ekke85
Posts: 2
Joined: Fri Jan 09, 2009 8:40 pm

Re: Nothing but the disk checks works

Post by ekke85 »

ekke85 wrote:Hi

Hope you guys can help me, I have installed everything, but the only thing give me anything back is the disk space graph. Does anyone know why this would be? None of the other graphs has anything in them. It also works from the command line.

ekke85
sorry it was wmi permissions, got it sorted

ekke85
joejoe
Posts: 5
Joined: Thu Jul 30, 2009 7:29 am

CPU Usage is always nan

Post by joejoe »

I Use this Templates,
But my CPU Usage is always nan
I try in commend mode the scripts can get the data
Why in graphs can't show ?

Code: Select all

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Saturn-Mail-5 - CPU Usage" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Percent" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/home/www/cacti/rra/saturn-mail-5_cpu1_242.rrd":CPU0:AVERAGE \
DEF:b="/home/www/cacti/rra/saturn-mail-5_cpu1_242.rrd":CPU1:AVERAGE \
DEF:c="/home/www/cacti/rra/saturn-mail-5_cpu1_242.rrd":CPU2:AVERAGE \
DEF:d="/home/www/cacti/rra/saturn-mail-5_cpu1_242.rrd":CPU3:AVERAGE \
DEF:e="/home/www/cacti/rra/saturn-mail-5_cpu1_242.rrd":Total:AVERAGE \
LINE1:a#797C6EFF:"CPU0\:"  \
GPRINT:a:LAST:" Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:b#0000FFFF:"CPU1\:"  \
GPRINT:b:LAST:" Current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:c#FFAB00FF:"CPU2\:"  \
GPRINT:c:LAST:" Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:d#000000FF:"CPU3\:"  \
GPRINT:d:LAST:" Current\:%8.2lf %s"  \
GPRINT:d:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:e#FF0000B2:"Total\:"  \
GPRINT:e:LAST:"Current\:%8.2lf %s"  \
GPRINT:e:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:e:MAX:"Maximum\:%8.2lf %s\n" 
RRDTool Says:

OK
robk0
Posts: 4
Joined: Thu Jul 20, 2006 11:07 am

problem with wmi? or with cacti? or with wmic

Post by robk0 »

Hi,
i use cacti with wmic for graphing windows machine. I have problem - graphs work only several minutes. After several minutes - sometimes 5 minutes, sometimes half an hour, sometimes an hour - graphs not work - see pictures... when i tried wmiadap.exe /f on destination system graph work, but just as I said up. any help?
Attachments
disk_i_o.png
disk_i_o.png (33 KiB) Viewed 6087 times
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Re: problem with wmi? or with cacti? or with wmic

Post by claymen »

robk0 wrote:Hi,
i use cacti with wmic for graphing windows machine. I have problem - graphs work only several minutes. After several minutes - sometimes 5 minutes, sometimes half an hour, sometimes an hour - graphs not work - see pictures... when i tried wmiadap.exe /f on destination system graph work, but just as I said up. any help?
Is the user your running the query as an admin? E.g. the service account or whatever you have setup to query the windows box? I found a similar problem when monitoring a clustered SQL server. For some reason the shared disks would stop responding after a few minutes unless run as admin. I never really figured out why as the non-admin user with appropriate permissions to query everything else worked fine for local/non shared disk.
Igloo
Posts: 22
Joined: Fri Dec 01, 2006 8:24 am

Post by Igloo »

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.
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

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?

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.
Is this a template you created? I didn't think I had one for network. Can you provide more info about the template? Is the data source set as a gauge or a counter?
chrisru
Posts: 5
Joined: Thu Jan 15, 2009 6:42 pm

Post by chrisru »

Hi Folks,

Just wondering if there is something tricky that needs to be done getting the plugin to work with 0.8.7e on CentOS 5.3. I have everything installed, I can query servers using wmic from the command line. I have enabled the plugin by editing the plugins.php. But when I try to edit or add a device I'm getting the 'Error: Save Failed' message, I can't seem to find any reason why its happening.

Chris
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

Ahh, I think you are confusing the plugin with this script. Two entirely separate projects but both rely on the linux wmi client.
chrisru
Posts: 5
Joined: Thu Jan 15, 2009 6:42 pm

Post by chrisru »

Now I'm totally lost.. I was attempting to get CactiWMI-0.0.6.r101 working which I got from page 1 on this thread. Is there another script?
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

Well that one you just posted is the script I wrote. But you were talking about a plugin and editing the plugins php file which is not my script. That and your having the exact error you get when using the existing plugin without the extra fixes applied to it.
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests