Linux to Windows WMI Plugin - Beta

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

benton2006
Cacti User
Posts: 50
Joined: Sun Apr 01, 2007 12:47 am

Post by benton2006 »

Thank Cigamit for giving us such amazing plugins. I wrote a script to capture cpu threads of two java.exe.When I use Verbose Query, I can get two java.exe process. But in creating graph, it only shows one java.exe. How can I improve my script?
Attachments
cputhread.xml
my script
(906 Bytes) Downloaded 463 times
aa.txt
This is debug information
(3.21 KiB) Downloaded 483 times
[quote][b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.1
[b]Poller Type[/b] - Cactid v
[b]Server Info[/b] - Linux 2.6.9-55.ELsmp
[b]Web Server[/b] - Apache/2.2.6 (Unix) PHP/5.2.5RC1
[b]PHP[/b] - 5.2.5RC1
[b]PHP Extensions[/b] - xmlwriter, libxml, dom, xmlreader, xml, tokenizer, session, pcre, SimpleXML, SPL, PDO, sockets, snmp, SQLite, standard, Reflection, posix, pdo_sqlite, mysql, ldap, json, iconv, hash, filter, date, ctype, openssl, apache2handler
[b]MySQL[/b] - 5.0.41
[b]RRDTool[/b] - 1.0.50
[b]SNMP[/b] - 5.3.1
[b]Plugins[/b][list]PHP Network Managing (PHP Network Managing - v0.6)
Host Info (hostinfo - v0.2)
Network Tools (tools - v0.2)
Thresholds (thold - v0.3.9)
Device Monitoring (monitor - v0.8.2)
RRD File Cleaner (RRD Cleaner - v0.35)
Create Aggregate Graphs (aggregate - v0.65)
Global Plugin Settings (settings - v0.5)
uptime
WMI Query (wmi - v0.1)[/list][/quote]
russell.seymour
Posts: 7
Joined: Mon Apr 21, 2008 8:22 am

Post by russell.seymour »

cigamit,

I have been looking to run WMI queries from a Linux host for a while now, and then I came across this and I think it is going to fit the bill :-).

I would like to help debug and get this out in the wild with scripts and ideas etc if that is helpful.

However at the moment i have an issue. I have installed everything and updated my database, but i am not able to run a 'Verbose Query' from the Device page. I get the following error:

Code: Select all


Notice: Undefined index: arg_index in /turtle/www/htdocs/cacti/lib/data_query.php on line 96

Notice: Undefined index: script_path in /turtle/www/htdocs/cacti/lib/data_query.php on line 96

Warning: Variable passed to each() is not an array or object in /turtle/www/htdocs/cacti/lib/data_query.php on line 105

Warning: Variable passed to each() is not an array or object in /turtle/www/htdocs/cacti/lib/data_query.php on line 539

Warning: Cannot modify header information - headers already sent by (output started at /turtle/www/htdocs/cacti/lib/data_query.php:96) in /turtle/www/htdocs/cacti/host.php on line 79
I appreciate that this could be my installation, but i am not sure where to look to get it fixed.

Thanks very much, Russell
spols
Posts: 6
Joined: Wed Jan 14, 2009 8:45 pm
Location: Melbourne, Australia

'Error: Save Failed' on add/edit device with WMI plugin

Post by spols »

A little bit stuck here...

I installed the plugin, and pushed the wmi.sql in successfully. (mysql cacti < wmi.sql)
I can see the WMI Settings in Cacti and add/edit WMI accounts within there.

As soon as I create or add a device and attempt to save, I get a red 'Error: Save Failed' from Cacti, whether I choose a WMI account from the dropdown or leave it as 'None'.
This happens regardless of which host template I pick.

Disabling the plugin allows me to add/edit devices again, but none of that good stuff with your WMI plugin :cry:

-Ubuntu 7.10 (Gutsy) Server
-Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6
-Cacti 0.8.7b
-PIA v2.1


Any help would be greatly appreciated.

P.S. This plugin looks like it has awesome potential (once I get it working for me), but has a typo in the spelling of 'Authentication' - incorrectly spelled as 'Authenication' :wink:

Cheers and all the best,

Scott
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Ya, the one posted is an old version, there is a simple fix for the issue you are having. I'll see if I can find time to post the new version.
spols
Posts: 6
Joined: Wed Jan 14, 2009 8:45 pm
Location: Melbourne, Australia

Post by spols »

cigamit wrote:Ya, the one posted is an old version, there is a simple fix for the issue you are having. I'll see if I can find time to post the new version.
cigamit, you are a CHAMP!

I rarely post anything, as I try to research first and avoid wasting ppls' time. Maybe I'll feel a little more inclined to ask next time.

You have just made me one happy camper.

Thanks again,

Scott
spols
Posts: 6
Joined: Wed Jan 14, 2009 8:45 pm
Location: Melbourne, Australia

Post by spols »

<bump!>
really looking forward to the updated version that addresses my "Save failed" problem with the WMI plugin.

Thanks in advance...
Scott
:)
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

whoiswes wrote: 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.
Would you mind posting the exchange_smtp_queues.xml file you have, as I'd like to try this !

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

mcutting wrote:
whoiswes wrote: 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.
Would you mind posting the exchange_smtp_queues.xml file you have, as I'd like to try this !

Thanks
Hmm - found this http://cactiusers.org/bugs/view.php?id=124&nbn=2 along with the file. Seems there is a known bug here.

Jimmy - could you post your "working" XML file ?

Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Well, I've managed to get this working, but without an easy way to write the xml files for my users, (DBAs all) I'm not sure it going to be as much use as the old nc_net/netsaint queries against performance objects....

Anybody got any other working templates for this plugin?
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

I'm working on the backend it to have it auto create the necessary templates for each WMI query, but its slow going and will be awhile before it is done.

I will see about releasing a few more templates for it. I need to create a way to import WMI templates also.
_Dmitry_
Posts: 36
Joined: Tue Sep 18, 2007 4:58 am
Location: DE

Post by _Dmitry_ »

argon0 wrote:Well, I've managed to get this working, but without an easy way to write the xml files for my users, (DBAs all) I'm not sure it going to be as much use as the old nc_net/netsaint queries against performance objects....

Anybody got any other working templates for this plugin?
I have finished 6 Graph based on following WMI Object: Win32_PerfRawData_PerfDisk_LogicalDisk

I'll post XML later

cigamit Thank you for this great plugin !
jerrison
Cacti User
Posts: 57
Joined: Fri Dec 29, 2006 4:02 am

Post by jerrison »

hi there,

just to let you know, what i needed to do to get this great addition to cacti working (might help someone):

-renamed wmic32 to wmic (plugin folder)
-changed "echo" to "return" in wmi-script.php ("get" output)
-changed

Code: Select all

"|host_description| - |query_QueueName|"
to

Code: Select all

"|host_description| - |query_StoreName|" 
(in data query)
-modified the provided Message-Templates (data+graph) to show in and outgoing messages

If someone doesn´t want to go through the WMI-hazzle: an alternate solution might be using an SNMP-Extension that let´s you monitor all WMI-Values: http://erwan.l.free.fr/snmptools/

just my 2c :).

cheers,
andré
caoboth
Posts: 8
Joined: Fri Sep 09, 2005 2:59 am

Post by caoboth »

Excellent plugin i look forward to seeing future development :)

If anyone has some good templates etc could they post them please.

As soon as i get some up and running i'll stick them on here too.

Andy

P.s if anyone needs a binary of wmic for sles 64 or 86 just ask and i can stick them up somewhere.
farole
Posts: 1
Joined: Fri Mar 20, 2009 9:52 pm

wmic error

Post by farole »

hi, i'm having some troubles to execute wmic.. when i try execute the command a message with this error open? wmic: error while loading shared libraries: libgnutls.so.11.

im using opensuse 11 and alredy instaled gnutls

tks for the help
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Did you compile the wmic binary from source? The included binaries were compiled on CentOS 4, and most likely will not work on any other distribution. The source I used is available for download, or you can grab the newest version directly from their SVN.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests