Report this

What is the reason for this report?

How do I configure prometheus to monitor a tomcat instance on a remote server?

Posted on May 22, 2017

I have my prometheus monitoring itself like the tutorial which is cute but not very useful.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@andrewgroenewold

This is the first time I’ve actually tested Prometheus on my end, though from doing a few quick tests on 4x Droplets, each Droplet you wish to monitor will need node_exporter for the basics.

There are other options (i.e. exporters) here:

https://prometheus.io/download/

…though none of them specifically target Tomcat. I did, however, find this:

https://github.com/prometheus/jmx_exporter

…which you may want to check out.

Shameless plug: tomcat_exporter

It is an exporter specifically for Tomcat related metrics and an alternative for the jmx_exporter. The node_exporter is more for linux host related metrics.

thanks for the reply, I have been taking a look at node_exporter but it doesn’t seem to run…

prometheus seems to come with its own local node_exporter which seems to record and display stats from my local prometheus server only (localhost:9090)

if I understand this, it looks like the exporter needs to be running on the remote hosts and then prometheus can tap into this after configuring the node in the .yml file.

after installing the exporter, and assuming no errors one should have localhost:9100/metrics

has anyone had any success getting the /metrics to run for remote hosts?

thank you,

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.