VMware Cloud Community
deeboh
Enthusiast
Enthusiast

Applying a process plugin to a particular Platform

Hey guys, I've had a devil of a time finding out how to apply the process plugin example to a particular platform.

say I have platfrom solaris 1,2,3 and 4. I want to monitor http processes on each of these servers and the forked processes or threads apache generates.

i've setup http process via the HQ UI to monitor the root httpd process (Pne=http or $1..). So I thought i'd be cute and add a bunch of these statements in a process plugin based on the example given in the HQ3.0 documentation...

So below is my attempt to monitor at least 5 httpd process by using the $1,$2, etc...

I tried to string this block of code together in a single file five times (changing the regex return value for each block).

My question is how to I get this data to a viewable state in HQ-Server?

thanks again,

Deeboh

<!DOCTYPE plugin [
<!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml">
]>

<plugin>
<server name="Apache httpd">
<service name ="HTTP"/>
<platform name ="solaris 1"/>
<config>
<option name="process.query"
description="Process Query"
default="State.Name.eq=$1"/>
</config>
&process-metrics;
</server>
</plugin>

Message was edited by: deeboh
Reply
0 Kudos
7 Replies
sjmh
Enthusiast
Enthusiast

Why not do this as a multiple process service? Are you trying to get something out of the process monitor other than what the process service gives you? One question I forgot to ask the Hyperic engineers during a conference call and perhaps one of them could answer here..

What are the advantages/disadvantages of creating your own process plugin versus just using the builtin service type to do so?
Reply
0 Kudos
deeboh
Enthusiast
Enthusiast

I'm trying to solve for the case where my particular applicaiton (which behaves like apache) spawns off processes as connections are made. So I can use the built in process service from HQ-Server, but then I have to create one for every spawned process. Then I have to problem of differentiating based on name (ie, State.Name=httpd,Pne=httpd) this doesn't work when you have multiple services with the same name so I could then use the perl like $1,$2 descriptors. This is a good start, but I have potentially hundreds of these apache like preocesses spawned at any given time. On top of that I want to monitore dozens of servers.

so I figured if I preset a number of these values in a a plugin then I could drop the setup in any agent plugin directory for auto deployment. I don't know how to dynamically setup a plugin to capture these processess (yet), but my first step is to try an monitor as many as I can within this framework.

next I plan on adding these spawned httpd process services to the auto-discovered Apache http Server so that I can put together a better picture of how my application is behaving.

good question and thanks for the sugestion.

Best,

Deeboh
Reply
0 Kudos
sjmh
Enthusiast
Enthusiast

Well, you can setup a process monitor to catch multiple processes of the same name, unless for some reason you are trying to monitor the parent process differently than you monitor the child spawned processes.

For instance, to get all the processes with the name httpd, you simply do:
State.Name=httpd

For all child processes, not including the parent process:
State.Name=httpd,Peq=httpd

For just the parent process and no child processes:
State.Name=httpd,Pne=httpd

Instead of selecting 'Process' for the Platform Service type, select 'Multiprocess', which allows you to monitor all processes that match your PTQL query.

Sorry if I'm misunderstanding what you are trying to do, but if you are just trying to monitor all httpd processes on a machine, then I'd just use 'Multiprocess' and 'State.Name=httpd'.

Hope this helps!

sh
deeboh
Enthusiast
Enthusiast

Well I totally missed the multiprocess attribute in service add feature. so thanks for the assist there sir. however the multiprocess feature doesn't appear to be granular enough. it may monitor all the running processes which match the State.Name criteria, but does it show and track metrics and log entries for each process individually?

that's what i'm truly hoping to accomplish with the plugin. Also I have dozens of servers which i'd much rather have deployed or created in HQ-server auto-magically by copying an xml file to a directory, versus having to manually add those processes for each server.

call me lazy, but I am:).

Thanks,

Deeboh
Reply
0 Kudos
sjmh
Enthusiast
Enthusiast

Makes sense that you would rather have them auto-discovered than having to add it. I'm not really good with creating my own plugins yet, so I haven't gotten to that point.

the Multiprocess does get stuff like cpu time and memory, but if you're looking for more stats I don't think it'd be what you'd want. Glad I at least pointed that out to you. 🙂

Good luck with the plugin and let me know if you get it working, would like to see how you did it.
Reply
0 Kudos
deeboh
Enthusiast
Enthusiast

Right on dude. thanks for the suggestions. If I find out anything of interest i'll post it...

l8s,

Deeboh

Message was edited by: deeboh
Reply
0 Kudos
BC_hyperic
Enthusiast
Enthusiast

Hi Deeboh,

I know your message has been dead for months, but it’s not dead to me. We have a similar situation, we have about 6 servers, the number may vary during the day. I would like to auto-discover the servers. Were you able to auto-discover any of your servers? Do you have to setup the first server through the UI?

Thanks
Bob
Reply
0 Kudos