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
How to monitor JBOSS server user information and tomcat user
-
- 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
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
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
Re: How to monitor JBOSS server user information and tomcat
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.
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.
-
- 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
Yes you can modify the pluginsbcitsnm 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
I cannot help you modify the plugins.bcitsnm wrote:Kindly request you to let me know if you could help me do that.