# How to monitor the process java tomcat8

**URL:** <https://discourse.sensu.io/t/how-to-monitor-the-process-java-tomcat8/690>\
**Category:** Sensu Classic (EOL)\
**Created:** [October 7, 2016, 8:24am UTC](https://discourse.sensu.io/t/how-to-monitor-the-process-java-tomcat8/690 "2016-10-07T08:24:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siddharth\_Jagtiani](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Siddharth\_Jagtiani](https://discourse.sensu.io/u/Siddharth_Jagtiani)\
**Post date:** [October 7, 2016, 8:24am UTC](https://discourse.sensu.io/t/how-to-monitor-the-process-java-tomcat8/690/1 "2016-10-07T08:24:08Z")

</div>

I currently have java tomcat8 running on a custom folder /opt. How do I configure check-process to monitor and check if tomcat8 is loaded ?

---

<div class="post-metadata">

**Author:** ![Siddharth\_Jagtiani](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Siddharth\_Jagtiani](https://discourse.sensu.io/u/Siddharth_Jagtiani)\
**Post date:** [October 7, 2016, 8:25am UTC](https://discourse.sensu.io/t/how-to-monitor-the-process-java-tomcat8/690/2 "2016-10-07T08:25:27Z")

</div>

ps -ef reports  
usr/bin/java -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -classpath /opt/tomcat8/bin/bootstrap.jar:/opt/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat8 -Dcatalina.home=/opt/tomcat8 -Djava.io.tmpdir=/opt/tomcat8/temp org.apache.catalina.startup.Bootstrap start

> **···**
>
> On Friday, October 7, 2016 at 1:54:09 PM UTC+5:30, Siddharth Jagtiani wrote:
> 
> > I currently have java tomcat8 running on a custom folder /opt. How do I configure check-process to monitor and check if tomcat8 is loaded ?
> 
> >

---

<div class="post-metadata">

**Author:** ![Alexander\_Skiba](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/alexander_skiba/32/408_2.png) [@Alexander\_Skiba](https://discourse.sensu.io/u/Alexander_Skiba)\
**Post date:** [October 7, 2016, 11:46am UTC](https://discourse.sensu.io/t/how-to-monitor-the-process-java-tomcat8/690/3 "2016-10-07T11:46:35Z")

</div>

For java processes I found configuring process checks a bit trickier than usual. For example I use the following to check for a running Elasticsearch instance.

'check-process.rb --pattern “/usr/lib/jvm/java-7-openjdk-amd64//bin/java .\* -cp :/usr/share/elasticsearch/lib/elasticsearch-1.4.5.jar”

``

You could try the following. I admit this is not very precise, but from a cursory look these seem to be the attributes most closely related to Tomcat itself in your PS output.

‘check-process.rb --pattern “/usr/bin/java \* -Dcatalina.base=/opt/tomcat8 \*”’

``

> **···**
>
> On Friday, October 7, 2016 at 10:25:27 AM UTC+2, Siddharth Jagtiani wrote:
> 
> > usr/bin/java -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -classpath /opt/tomcat8/bin/bootstrap.jar:/opt/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat8 -Dcatalina.home=/opt/tomcat8 -Djava.io.tmpdir=/opt/tomcat8/temp org.apache.catalina.startup.Bootstrap start
> 
> > 
> 
> > > I currently have java tomcat8 running on a custom folder /opt. How do I configure check-process to monitor and check if tomcat8 is loaded ?

---

<div class="post-metadata">

**Author:** ![Siddharth\_Jagtiani](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Siddharth\_Jagtiani](https://discourse.sensu.io/u/Siddharth_Jagtiani)\
**Post date:** [October 8, 2016, 11:22am UTC](https://discourse.sensu.io/t/how-to-monitor-the-process-java-tomcat8/690/4 "2016-10-08T11:22:15Z")

</div>

I am getting the following error

CheckProcess CRITICAL: Found 0 matching processes; cmd //usr/bin/java \* -Dcatalina.base=/opt/tomcat8 \*/

My config.json has the following check

“command”: “check-process.rb --pattern "/usr/bin/java \* -Dcatalina.base=/opt/tomcat8 \*" -W 1”,

My ps -ef | grep tomcat gives the following

ubuntu 23100 1 0 Oct07 ? 00:01:32 /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -classpath /opt/tomcat8/bin/bootstrap.jar:/opt/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat8 -Dcatalina.home=/opt/tomcat8 -Djava.io.tmpdir=/opt/tomcat8/temp org.apache.catalina.startup.Bootstrap start

> **···**
>
> On Friday, October 7, 2016 at 5:16:35 PM UTC+5:30, Alexander Skiba wrote:
> 
> > For java processes I found configuring process checks a bit trickier than usual. For example I use the following to check for a running Elasticsearch instance.
> 
> > 'check-process.rb --pattern “/usr/lib/jvm/java-7-openjdk-amd64//bin/java .\* -cp :/usr/share/elasticsearch/lib/elasticsearch-1.4.5.jar”
> 
> > ``
> 
> > 
> 
> > You could try the following. I admit this is not very precise, but from a cursory look these seem to be the attributes most closely related to Tomcat itself in your PS output.
> 
> > 
> 
> > ‘check-process.rb --pattern “/usr/bin/java \* -Dcatalina.base=/opt/tomcat8 \*”’
> 
> > ``
> 
> > 
> 
> > On Friday, October 7, 2016 at 10:25:27 AM UTC+2, Siddharth Jagtiani wrote:
> > 
> > > usr/bin/java -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -classpath /opt/tomcat8/bin/bootstrap.jar:/opt/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat8 -Dcatalina.home=/opt/tomcat8 -Djava.io.tmpdir=/opt/tomcat8/temp org.apache.catalina.startup.Bootstrap start
> 
> > >
> 
> > > > I currently have java tomcat8 running on a custom folder /opt. How do I configure check-process to monitor and check if tomcat8 is loaded ?

---

<div class="post-metadata">

**Author:** ![Siddharth\_Jagtiani](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Siddharth\_Jagtiani](https://discourse.sensu.io/u/Siddharth_Jagtiani)\
**Post date:** [October 10, 2016, 5:44pm UTC](https://discourse.sensu.io/t/how-to-monitor-the-process-java-tomcat8/690/5 "2016-10-10T17:44:31Z")

</div>

Fixed it on stackoverflow

> <https://stackoverflow.com/questions/39955716/sensu-reports-found-0-matching-processes-for-tomcat8/39962119#39962119>

> **···**
>
> On Saturday, October 8, 2016 at 4:52:16 PM UTC+5:30, Siddharth Jagtiani wrote:
> 
> > I am getting the following error
> > 
> > CheckProcess CRITICAL: Found 0 matching processes; cmd //usr/bin/java \* -Dcatalina.base=/opt/tomcat8 \*/
> 
> > 
> 
> > My config.json has the following check
> 
> > 
> 
> > “command”: “check-process.rb --pattern "/usr/bin/java \* -Dcatalina.base=/opt/tomcat8 \*" -W 1”,
> 
> > 
> 
> > My ps -ef | grep tomcat gives the following
> 
> > 
> 
> > ubuntu 23100 1 0 Oct07 ? 00:01:32 /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -classpath /opt/tomcat8/bin/bootstrap.jar:/opt/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat8 -Dcatalina.home=/opt/tomcat8 -Djava.io.tmpdir=/opt/tomcat8/temp org.apache.catalina.startup.Bootstrap start
> 
> > 
> 
> > On Friday, October 7, 2016 at 5:16:35 PM UTC+5:30, Alexander Skiba wrote:
> > 
> > > For java processes I found configuring process checks a bit trickier than usual. For example I use the following to check for a running Elasticsearch instance.
> 
> > > 'check-process.rb --pattern “/usr/lib/jvm/java-7-openjdk-amd64//bin/java .\* -cp :/usr/share/elasticsearch/lib/elasticsearch-1.4.5.jar”
> 
> > > ``
> 
> > >
> 
> > > You could try the following. I admit this is not very precise, but from a cursory look these seem to be the attributes most closely related to Tomcat itself in your PS output.
> 
> > >
> 
> > > ‘check-process.rb --pattern “/usr/bin/java \* -Dcatalina.base=/opt/tomcat8 \*”’
> 
> > > ``
> 
> > >
> 
> > > On Friday, October 7, 2016 at 10:25:27 AM UTC+2, Siddharth Jagtiani wrote:
> > > 
> > > > usr/bin/java -Djava.util.logging.config.file=/opt/tomcat8/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -classpath /opt/tomcat8/bin/bootstrap.jar:/opt/tomcat8/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat8 -Dcatalina.home=/opt/tomcat8 -Djava.io.tmpdir=/opt/tomcat8/temp org.apache.catalina.startup.Bootstrap start
> 
> > > >
> 
> > > > > I currently have java tomcat8 running on a custom folder /opt. How do I configure check-process to monitor and check if tomcat8 is loaded ?

---

<div class="post-metadata">

**Author:** ![harryred1234](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@harryred1234](https://discourse.sensu.io/u/harryred1234)\
**Post date:** [August 19, 2019, 5:45am UTC](https://discourse.sensu.io/t/how-to-monitor-the-process-java-tomcat8/690/6 "2019-08-19T05:45:39Z")

</div>

In this given post, it is clarifying an actual process so that they can easily monitor any errors if generate in their platforms. For recovering these errors they must need an actual solution provided by [Dart vs Javascript](https://jdocs.com/dart-vs-javascript/) that would be significant for them.
