[HOWTO] Fetching WMI data from Linux

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

felimwhiteley
Posts: 26
Joined: Mon Dec 10, 2007 10:14 am

Post by felimwhiteley »

In case it's of use, here's a small python wrapper script to get a Dictionary of data back. Might make it easy for someone to write more plugins/queries based on it.

http://felimwhiteley.wordpress.com/2008 ... sing-wmic/
felimwhiteley
Posts: 26
Joined: Mon Dec 10, 2007 10:14 am

Post by felimwhiteley »

anx wrote:I've posted a template using wmic here:

http://forums.cacti.net/viewtopic.php?p=143047
Good stuff anx, must say I'm not a fan of Perl though :-) It's all gibberish to me ! Nice plugin though
User avatar
anx
Posts: 21
Joined: Sat Apr 28, 2007 1:47 am
Location: Melbourne, Australia
Contact:

Post by anx »

I have a few more that I need to post as well, these are again Perl based as they are based on some templates James Dastrup did for Zenoss.

I've added some pictures of the cpu and memory graphs. I still have some Disk IO and other bits to finalize then I'll post the templates and the script.

I favor Python myself and after the templates I am working on now are done, I'll be using your wrapper for future WMI templates, nice work.
Attachments
cpu.png
cpu.png (31.49 KiB) Viewed 22138 times
mem.png
mem.png (37.17 KiB) Viewed 22138 times
felimwhiteley
Posts: 26
Joined: Mon Dec 10, 2007 10:14 am

Post by felimwhiteley »

anx wrote:I have a few more that I need to post as well, these are again Perl based as they are based on some templates James Dastrup did for Zenoss.
Have you had any time to write them up at all ? I've been busy on some other stuff, looking to get back into my Windows plugins again. If I've anything useful for you I'll post it in next couple of days.
User avatar
anx
Posts: 21
Joined: Sat Apr 28, 2007 1:47 am
Location: Melbourne, Australia
Contact:

Post by anx »

Good question, actually yes they are finished apart from terminal server sessions. Now is a good a time as any to do that graph, I'll upload the lot in about an hour.
felimwhiteley
Posts: 26
Joined: Mon Dec 10, 2007 10:14 am

Post by felimwhiteley »

Fantastic, cheers anx :-)
User avatar
anx
Posts: 21
Joined: Sat Apr 28, 2007 1:47 am
Location: Melbourne, Australia
Contact:

Post by anx »

inglpa
Posts: 3
Joined: Fri Jul 31, 2009 3:08 pm

Problems with users in a Domain

Post by inglpa »

Hi guy's, first of all, thanks i found this forum very useful for my work.

Now the problem: I have some servers in windows server 2003 and 2008, and i'm trying to get information for management purpose through Pegasus WMI Mapper from a linux machine with Wbemcli, but that servers are in a domain, the administrator only give me an user without any permissions so when i try to get information I get this:

wbemcli -nl ei 'http://domain/user:pass@ip:5988/root/ci ... tingSystem'
*
* wbemcli: Cim: (2) CIM_ERR_ACCESS_DENIED: LogonUser()
*
when I change the user to administrator's group it function perfectly, but the administrator of the servers can't give that permissions.

I try to put the user in to local user but the server i'm trying to manage is a domain controller so that options are disable.

Thanks and wait for some ideas. :evil:
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests