Monitor Windows via WMI from Cacti on Linux

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

Moderators: Developers, Moderators

Post Reply
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

See how it automatically defines a heap more data sources for AVERAGE,MIN,MAX,LAST rather than just AVERAGE on yours. Thats what the problem is. To fix it on yours you need to adjust the CDEF to suit only have 3 data sources instead of the 12.

So instead of the CDEF being a,e,+ you will probably want a,b,+

Does that make sense?
So does this mean .8.7.d treats the datasources differently? <groan>...

I have the same 3 datasoureces, instead of the 12 you posted...
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 »

Same problem with Memory Usage graph.. This time with e and i.

Does this mean we need to check all our cdefs? To make sure they don't point to wrong data points?

Claymen If you post up the debug from the WMI graphs that use the Cdefs you defined I'll compare them to my install..

BTW are you using .8.7d or .8.7b?

Argon0
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 »

For memory edit the Cdef WMI Memory, replace the e with b, the i with c
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
outspoken
Posts: 17
Joined: Thu Nov 20, 2008 4:51 pm

Post by outspoken »

argon0 wrote:For memory edit the Cdef WMI Memory, replace the e with b, the i with c
this is exactly what i just did on the previous page after Claymen mentioned to do so. ;)

i think we are both int he same boat using 0.8.7d, it really has broken all of the CDEFs and the data sources are very different I think.
vpl
Posts: 15
Joined: Thu Nov 01, 2007 11:09 pm

Post by vpl »

So I figured out half my problem. I was trying this out on a PPC build (on a mac mini) and, for some reason, the wmi-client doesn't work. I installed wmi-client on a x86 system and am able to run successful queries... on Windows 2003/XP systems. Still no dice with Windows 2008.

The query I run is :

Code: Select all

wmic -U 'COMPUTER/localadminaccount%password' //COMPUTERNAME "Select * from Win32_PerfRawData_PerfOS_Processor where Name='_Total'"
On XP/2003 systems returns data. On a 2008 system I get:

ERROR: WMI query execute.
NTSTATUS: NT code 0xc002001b - NT code 0xc002001b
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

I'm using 0.8.7b but we had the same problem going from 0.8.7 -> 0.8.7b where it changed from just using AVERAGE to using the 4 inputs per data source. In face it broke a huge number of graphs for us when we upgraded. If its changed again in 0.8.7d it's going to be a right pain to upgrade again :(
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

argon0 wrote:Same problem with Memory Usage graph.. This time with e and i.

Does this mean we need to check all our cdefs? To make sure they don't point to wrong data points?

Claymen If you post up the debug from the WMI graphs that use the Cdefs you defined I'll compare them to my install..

BTW are you using .8.7d or .8.7b?

Argon0
Basically any CDEF I have made will be broken because of this. I'm not running 0.8.7d so I can't see exactly what is happening. From my understanding the reason they added the extra inputs in on the graph was to improve the accuracy but as you can see at the expense of breaking CDEF's. I'll see if there is a way to work around it but I somewhat doubt it, I couldn't find anywhere in cacti to even configure this :(
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

<groan> seems changing versions always breaks something...

Mind you keeps life interesting...
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

I got bored over the weekend (whilst recovering from a concert) and setup MantisBT to track bugs. If you could submit bugs to that so I can track them better that'd be awesome.

http://mantis.parkingdenied.com

Anyone should be able to register and report issues. This way I can track them better and make sure things are followed up on.

I also intend to use it for other projects of mine to help me track things :) And it can integrate with SVN!
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

I shall surely do so if I come across other bugs, but it seems pretty good apart from that...

Would be good to automate the data discovery (e.g. Storage Groups, etc...) on the Exchange Server, but I can live without it. I shall also (be trying to) write a graph template to graph all SGs on one graph for my site.

BTW do you know if there is a _Total namespace for each Storage Group, rather than for all DBs, and each individual DB?

As an aside, I noticed that my graphs kept breaking, and the wmi query wouldn't work remotely (error : NTSTATUS: NT code 0xc0041010 - NT code 0xc0041010), but it did locally (thanks to Ben Coleman's WMI Query tool), so I ran the wmiadap /f again, and it started working again... <huh>
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
claymen
Cacti User
Posts: 259
Joined: Mon Aug 18, 2008 4:30 am
Location: Australia
Contact:

Post by claymen »

No worries :)

To do data discovery it needs to be a data query and for that it may be better long term to look at the plugin arch. But at the same time it requires the plugin arch which is a pain to maintain.

I will look at writing a data query for things like disks and storage groups etc, things where it makes sense. It is something I have wanted to do but just needed something in place first.

Not sure about a _Total for each storage group, only for the databases themselves. If you come across one let us know as it'd probably useful for others :)

That's a little odd about wmiadap /f fixing the remote query when it worked locally... But then again it does refresh all the counters. The biggest problem we have is the firewall blocking RPC traffic. We do allow it but we set the dynamic RPC ports to a specific range and only allow that range.
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Right, I've done what I needed to, so far, get really messy graphs, but at least I've proven the aggregate plugin is working with thold .4.1!!!

Time to clear them up a bit...
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 »

And here is a variant of the Database Performance Graph Template - widened it to 750 pixels, and changed Gprint type for legends from Exact Numbers to Normal..

Prior to this I was getting 0 for all entries, now I get a an entry (OK each one is x milli, but still an entry, which makes more sense imho :) )


Attachments
cacti_graph_template_exchange_-_database_performance_wmi_AO.xml
Graph Template, just import as a template... It will replace the existing one...
(26.09 KiB) Downloaded 172 times
Image of graph
Image of graph
Exchange Database Peformance.png (29.93 KiB) Viewed 3950 times
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

Graph Templates

Post by argon0 »

Don't know if I'm just missing this or whether you just CANNOT do this, except via Graph Templates...

Would like to be able to change the Exchange Active Connections graph to name the databases, instead of having it just say Database1, Database2.... on the graph....
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

Graph Templates

Post by argon0 »

Don't know if I'm just missing this or whether you just CANNOT do this, except via Graph Templates...

Would like to be able to change the Exchange Active Connections graph to name the databases, instead of having it just say Database1, Database2.... on the graph....

And is there an easy way to copy several lines of a graph then edit them, rather then adding each line one at a time (I remember something - a bit of a hack I did - from ages ago where you could add 3 or 4 lines at once...)
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests