How to add custom template in nagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

How to add custom template in nagiosXI

Post by John12 »

Hi,
My specs: NagiosXI vmware ver3.3
host: linux centos 5.7

I am in need to monitor individual process CPU and Mem in my linux box.
For that i thought to use the 3rd party plugin here

http://exchange.nagios.org/directory/Pl ... sh/details

I configured the command for this plugin but need to know how i add the custom template supplied with this plugin in nagiosXI. i.e check_ps.php (PNP template)

awaiting response... :roll:

Thanks,
John.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: How to add custom template in nagiosXI

Post by scottwilkerson »

Upload it at Admin -> graph Templates
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

Re: How to add custom template in nagiosXI

Post by John12 »

Thanks for the reply.

I updated nagiosxi VM to 2012 r1.2

I added the plugin via admin -> mange plugin
check_ps.sh 48 48 rwxr-xr-x

I added the graph template. it shows 48:48 at user:group with 664 permission.

i created new command for check_ps.sh as below:

$USER1$/check_ps -H $HOSTADDRESS$ -p $ARG1$ -w $ARG2$ -c $ARG3$ -t $ARG4$

on the core config manager -> services -> add new -> manage template .. here i am not finding the template uploaded.. whats when wrong.

Am i following right step in installed a plugin with graph template to make it use.
or is there any other way to get the "sum of all oracle user CPU% and MEM%" every 10 min in nagiosxi.. .. I am trying here to monitor individual user to find how much cpu and memory it occupies with time to time..

Kindly shed some light on.. as i m new in configuring nagiosxi.

thanks,
John.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: How to add custom template in nagiosXI

Post by scottwilkerson »

The graph template is just used to format the output of the performance graph, and it will do it automatically if you named the command that you created check_ps

This is not a service template, that is something different...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to add custom template in nagiosXI

Post by lmiltchev »

Just to add... Your command definition is wrong. This puglin has to be run locally. There is no "-H" flag. Please, see the usage below:

Code: Select all

./check_ps.sh -h
Version 1.0, 2009, Mike Adolphs (http://www.matejunkie.com/)

check_ps.sh is a Nagios plugin to check a specific process via ps.
You may provide any string as an argument to match a specific
process. Please note that the output could be distorted if the
argument matches various processes, so please make sure to use
unique strings to match a process.

check_ps.sh -p firefox [-w 10] [-c 20] [-t cpu]

Options:
  -p/--process)
     You need to provide a string for which the ps output is then
     then "greped".
  -w/--warning)
     Defines a warning level for a target which is explained
     below. Default is: off
  -c/--critical)
     Defines a critical level for a target which is explained
     below. Default is: off
  -t/--target)
     A target can be defined via -t. Choose between cpu and mem.
     Default is: mem
Be sure to check out our Knowledgebase for helpful articles and solutions!
John12
Posts: 48
Joined: Fri Nov 11, 2011 6:16 am

How to monitor per User CPU% and MEM% in NAGIOSXI

Post by John12 »

thanks for reply.. i remove the -H flag. it shows what it suppose to do. but limit to unique process. where there are more than one process run under a user.

I am in search of a plugin which shows the Per User CPU and MEM. and graph it.

Say i installed oracle with oracle user.. then i use the oracle user to get the CPU% and MEM% of sum of all oracle process run by oracle user .

Currently i am using top command in bash.

Is this can be achieved by nagiosXI..? per user CPU and MEM detail.?

thanks,
John.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to add custom template in nagiosXI

Post by lmiltchev »

I don't believe that such plugin is currently available (at least I didn't find anything like it on the Nagios Exchange).
This is a very good idea, though and I can see how this could be useful. We can develop a custom plugin for you with this functionality.
If you are interested, please, contact our sales department at sales@nagios.com, and ask for a quote on a custom development. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!