How to monitor JBOSS server user information and tomcat user

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
bcitsnm
Posts: 2
Joined: Tue Jun 26, 2018 1:39 am

How to monitor JBOSS server user information and tomcat user

Post by bcitsnm »

I have read this document on "How to monitor JBOSS Server user and thread https://support.nagios.com/forum/viewto ... =6&t=34169". I want to know if there is a browser plugin or any other way where we can monitor the number of users using JBOSS and apache tomcat on a CentOS server. I have a script which does something like this. Please let me know if there is a plugin or script which can be used which can extract the details and send an email.

#!/bin/bash
COUNT=0
COUNT1=0
COUNT2=0
COUNT3=0

IFS=$'\n'

#LIST=`pgrep httpd`
#LIST1=`pgrep java`
#LIST=`ps -aef | grep httpd | grep -v grep`
#LIST1=`ps -aef | grep java | grep -v grep`

USERNAME=`cat /etc/passwd|cut -d':' -f1` # show all users


LIST=`pgrep -u root httpd`
LIST1=`pgrep -u root java`
LIST2=`pgrep -u seenu httpd`
LIST3=`pgrep -u seenu java`

for LINE in $LIST

do
COUNT=$((COUNT+1))
done
echo $COUNT

IFS=$'\n'

for LINE in $LIST1

do
COUNT1=$((COUNT1+1))
done
echo $COUNT1

IFS=$'\n'

for LINE in $LIST2

do
COUNT2=$((COUNT2+1))

done
echo $COUNT2

IFS=$'\n'

for LINE in $LIST3

do
COUNT3=$((COUNT3+1))
done
echo $COUNT3
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to monitor JBOSS server user information and tomcat

Post by scottwilkerson »

Do you have Nagios Installed?

You could modify the script to be a proper plugin and Nagios can send the email when it is in a non-OK state

Here are the Nagios Plugin Development Guidelines
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
bcitsnm
Posts: 2
Joined: Tue Jun 26, 2018 1:39 am

Re: How to monitor JBOSS server user information and tomcat

Post by bcitsnm »

Dear Mr. Scott Wilkerson,
Thank you for the information, but I would like to know if we can tweak the existing JBOSS Monitoring With Nagios plugin which is here https://exchange.nagios.org/directory/P ... 1530599211
to give the details of what I require.

The same change could also be applied to these which will be helpful for everyone. Instead of me writing a new plugin altogether again.

check_apachestatus: https://exchange.nagios.org/directory/P ... us/details
check_apache_status: https://exchange.nagios.org/directory/P ... us/details

Kindly request you to let me know if you could help me do that.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to monitor JBOSS server user information and tomcat

Post by scottwilkerson »

bcitsnm wrote:Dear Mr. Scott Wilkerson,
Thank you for the information, but I would like to know if we can tweak the existing JBOSS Monitoring With Nagios plugin which is here https://exchange.nagios.org/directory/P ... 1530599211
to give the details of what I require.

The same change could also be applied to these which will be helpful for everyone. Instead of me writing a new plugin altogether again.

check_apachestatus: https://exchange.nagios.org/directory/P ... us/details
check_apache_status: https://exchange.nagios.org/directory/P ... us/details
Yes you can modify the plugins
bcitsnm wrote:Kindly request you to let me know if you could help me do that.
I cannot help you modify the plugins.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked