Win32 - Monitor running processes

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

Re: Win32 - Monitor running processes

Post by argon0 »

Phalek, you got the right thing.

If you manually choose Index Type hrSWRunName, and specify the Index Value with a running process name (e.g. sqlservr.exe) the query (and thus the graphs) work... So this MUST be a valid way to do this... but HOW do you get the data template to use this/these values?

I'm going to do some experimentation with the data template - I have an idea...
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

Re: Win32 - Monitor running processes

Post by argon0 »

Well.... that seems to have worked... Instead of going by the manual, which says not to touch these three fields if you change the fields to look like below... it works (or looks like it does - I haven't restarted the proc yet, so can't comment on if it works after a restart).
View of Data Procs Template as changed by me...
View of Data Procs Template as changed by me...
Proc_Data_Template_pic.PNG (13.67 KiB) Viewed 4968 times
You get Data Sources which look like this:
Data Source seems to be missing the index type and index value fields - but these are specified in the template...
Data Source seems to be missing the index type and index value fields - but these are specified in the template...
Data_Source_Example_Process.PNG (24.29 KiB) Viewed 4950 times
And creates a graph like this (zoomed in a bit as its only been running a few minutes):
Graph created after I've changed the data Template
Graph created after I've changed the data Template
Graph_Created_with_new_Data_Template.PNG (23.13 KiB) Viewed 4968 times
Finally a copy of my data template ...

{editted thanks to Phalek pointing out server names!}
Attachments
cacti_data_template_snmp_-_running_process_info_editted_by_Argon0.xml
Data Template as editted by me....
(9.23 KiB) Downloaded 339 times
Last edited by argon0 on Mon Mar 04, 2013 7:25 am, edited 2 times in total.
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

Re: Win32 - Monitor running processes

Post by argon0 »

Interestingly this seems to have kick started my other non-working graphs as well! (Though I suspect coincidence, as I did run queries a few minutes before changing the template)... Those that rely on PID are still not working.
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Win32 - Monitor running processes

Post by BSOD2600 »

argon0 wrote:Well.... that seems to have worked... Instead of going by the manual, which says not to touch these three fields if you change the fields to look like below... it works (or looks like it does - I haven't restarted the proc yet, so can't comment on if it works after a restart).
Do NOT do this. You're only asking for problems.

For all Data Query templates (which includes [SNMP - Running Processes]), the correct way to create graphs is:
Devices -> select a device -> click on [Create Graphs for this Host] -> select the item(s) from each Data Query -> click Create at the bottom of the page.
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Re: Win32 - Monitor running processes

Post by argon0 »

BSOD2600 wrote:
argon0 wrote:Well.... that seems to have worked... Instead of going by the manual, which says not to touch these three fields if you change the fields to look like below... it works (or looks like it does - I haven't restarted the proc yet, so can't comment on if it works after a restart).
Do NOT do this. You're only asking for problems.

For all Data Query templates (which includes [SNMP - Running Processes]), the correct way to create graphs is:
Devices -> select a device -> click on [Create Graphs for this Host] -> select the item(s) from each Data Query -> click Create at the bottom of the page.
Yes, done as in that is exactly the way I create these graphs - what I do above doesn't change that. I am using variables i.e. |query_hrSWRunName| for the index value, the index type needs to be hard coded, or it will default to the first in the list (i.e hrSWRunIndex - it seems to be alphabetical). I'm just changing stuff back at the data template - not changing the process of creating graphs - well I am - but making it so you don't have to go back and edit them after creation to get the data source working properly. Now, whether I have stored up problems for myself later on or not is another question, but I don't see how...

If those fields aren't designed to be used, why are they there?
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Win32 - Monitor running processes

Post by BSOD2600 »

argon0 wrote:I am using variables i.e. |query_hrSWRunName| for the index value, the index type needs to be hard coded, or it will default to the first in the list (i.e hrSWRunIndex - it seems to be alphabetical).
Something's not working properly then as

Code: Select all

   <index_order>hrSWRunName:hrSWRunIndex</index_order>
in win32_procs.xml should've made hrSWRunName the default. Just tested some new items on my installation and also ran into the same problem. I'll file a bug. It should have the process name it it:
cacti - its-sp-rx1 - procexp64.png
cacti - its-sp-rx1 - procexp64.png (22.36 KiB) Viewed 4939 times
argon0 wrote:If those fields aren't designed to be used, why are they there?
They're suppose to be used for data source and graph titles.
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Re: Win32 - Monitor running processes

Post by argon0 »

Really?

OK.

Is this due to 0.8.8a Then?
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Win32 - Monitor running processes

Post by BSOD2600 »

argon0 wrote:Is this due to 0.8.8a Then?
I haven't created new graphs with this template for quite a while so it very well could be.
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Re: Win32 - Monitor running processes

Post by argon0 »

The behaviour you describe above is what I expected to happen, so was surprised when graphs broke post a service restart.... Thus the digging.
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

Re: Win32 - Monitor running processes

Post by argon0 »

As it currently stands I can't use these graphs.

Essentially they are fine when I set them up - either with the original template, or with my edit of it, which "hardcodes" |query_hrSWRunName| into the graph. On a restart of a service everything goes screwy though.

With my edit I end up with a load of (broken) graphs with the name HOSTNAME - Process - |query_hrSWRunName|, and (because I used Autom8 to create graphs) a loat of new HOSTNAME - Process - PROCESSNAME graphs - which work until the next restart, with the original I ended up with a load of broken HOSTNAME - Process - .... graphs.

So.... Any idea of a fix to the "bug"? So I can go back to the original graphs?
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Win32 - Monitor running processes

Post by phalek »

Maybe something like this template would be sufficient for you ( to get availability ) in the first place ?

I'm using it for the service availability calculations in my reporting plugin.

http://forums.cacti.net/viewtopic.php?f ... &start=135
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Re: Win32 - Monitor running processes

Post by argon0 »

I'm monitoring Services fine, its when I try to do Processes that the problem happens...
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Win32 - Monitor running processes

Post by BSOD2600 »

argon0 wrote:As it currently stands I can't use these graphs.
1) dont use automate for this template, as it doesnt work properly.
2) the reindex method should be index count changed for this data query.
3) the data template for each device's instance needs manual updating until the bug gets fixed. Index Value should be the process executable (i.e. spoolsv.exe) and Index Type should be hrSWRunName.
argon0 wrote:So.... Any idea of a fix to the "bug"? So I can go back to the original graphs?
bug the developers to look into http://bugs.cacti.net/view.php?id=2350 I suppose.
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Re: Win32 - Monitor running processes

Post by JJX »

I have two processes with the same name.
I match the first process with the name; the 2nd one with the PID.

This is the graph of the 2nd process, matched with the PID:
A.png
A.png (69.18 KiB) Viewed 3197 times
The top graph is the one appearing to the Graph tree; it doesn't depict the memory.
However, the realtime graphs shows the memory.

Any idea why this happens?
cacti rulez!
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Re: Win32 - Monitor running processes

Post by JJX »

After deleting the rrd file and running again the poller the problem was resolved
cacti rulez!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests