# Logstash input to monitor java processess

**URL:** <https://discuss.elastic.co/t/logstash-input-to-monitor-java-processess/191080>\
**Category:** Logstash\
**Created:** [July 17, 2019, 7:56pm UTC](https://discuss.elastic.co/t/logstash-input-to-monitor-java-processess/191080 "2019-07-17T19:56:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdul\_Qaadir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdul_qaadir/32/50404_2.png) [@Abdul\_Qaadir](https://discuss.elastic.co/u/Abdul_Qaadir)\
**Post date:** [July 17, 2019, 7:56pm UTC](https://discuss.elastic.co/t/logstash-input-to-monitor-java-processess/191080/1 "2019-07-17T19:56:54Z")

</div>

Hi Elastic Team,

I have set of java applications running on my unix server.

I want to monitor the heath , state (live, or dead) , memory consumption, cpu on a dashboard. How to pass the java processing running on my unix server to logstash config input ?

Can you please help with sample.

I have only tried :  
input {  
file {  
path =\> "path to .log"  
}  
}

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 18, 2019, 4:26am UTC](https://discuss.elastic.co/t/logstash-input-to-monitor-java-processess/191080/2 "2019-07-18T04:26:38Z")

</div>

Hi Have you perhaps considered looking at the [Elastic APM Capabilities](https://www.elastic.co/guide/en/apm/get-started/current/overview.html) Especially with the [Java Agent](https://www.elastic.co/guide/en/apm/agent/java/current/index.html) Metrics can be reported via the Java Agent AND you would also be able to observe performance of your Java Application As Well.

And / Or if you really want to focus on Host Metrics and observe Metrics for Certain Process running on that host you could use [Metricbeat](https://www.elastic.co/guide/en/beats/metricbeat/current/index.html) and filter on java processes (or more)

Finally if you are not interested in any of that you could look at the logstash [JMX](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jmx.html) plugin, however I think the 2 solutions above maybe easier / more complete.

---

<div class="post-metadata">

**Author:** ![Abdul\_Qaadir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdul_qaadir/32/50404_2.png) [@Abdul\_Qaadir](https://discuss.elastic.co/u/Abdul_Qaadir)\
**Post date:** [July 18, 2019, 1:52pm UTC](https://discuss.elastic.co/t/logstash-input-to-monitor-java-processess/191080/3 "2019-07-18T13:52:49Z")

</div>

Thanks Stephenb.

Do you have any sample config of how the the solution 1 and 2 could be achieved?

I'm sorry still noob in ELK.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [July 18, 2019, 2:08pm UTC](https://discuss.elastic.co/t/logstash-input-to-monitor-java-processess/191080/4 "2019-07-18T14:08:48Z")

</div>

As a new adopter, I suggest reading the documentation that I linked in the previous post.

APM does not use logstash it has its own APM server.

Metricbeat is pretty simple to get up and running either directly to Elasticsearch or through logstash, I linked the documentation there as well.

The super quick instructions for running Metricbeat can be found in Kibana

[http://localhost:5601/app/kibana#/home/tutorial/systemMetrics?\_g=()](http://localhost:5601/app/kibana#/home/tutorial/systemMetrics?_g=())

To run through logstash shows a logstash conf for beats.

[https://www.elastic.co/guide/en/logstash/current/plugins-inputs-beats.html#\_description\_2](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-beats.html#_description_2)

Good Luck on the Learning!

---

<div class="post-metadata">

**Author:** ![Abdul\_Qaadir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdul_qaadir/32/50404_2.png) [@Abdul\_Qaadir](https://discuss.elastic.co/u/Abdul_Qaadir)\
**Post date:** [July 18, 2019, 2:21pm UTC](https://discuss.elastic.co/t/logstash-input-to-monitor-java-processess/191080/5 "2019-07-18T14:21:22Z")

</div>

Thanks mate. This should do.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 15, 2019, 2:21pm UTC](https://discuss.elastic.co/t/logstash-input-to-monitor-java-processess/191080/6 "2019-08-15T14:21:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
