How to configure Tomcat Exporter to scrape metrics from Prometheus?
To setup exporter, follow the steps given below:
-
Install a standalone Tomcat-sever or as a container as kubernetes cluster.
-
Download the Tomcat exporter servlet file in .war format from here.
-
Rename the file as metrics.war and deploy it in the
webapps directory inside the tomcat installation directory.
If Tomcat-server is deployed as a container, use the 'docker cp' commands to copy files as shown below,
docker cp metrics.war <TOMCAT_CONTAINER_ID>:/usr/local/tomcat/webapps/metrics.war
-
Download the following jars:
-
-
-
-
-
-
Copy all jars to $CATALINA_BASE/lib directory.
-
To configure, follow the steps given below:
-
Open prometheus configuration file under prometheus deployed directory. (Default config file is prometheus.yml)
-
Under the scrape configs, add the job and exporter as shown below: (To know more about scrape configuration, click here.)

-
Now restart Prometheus server.
-
Query some tomcat metrics to verify if Prometheus can scrape metrics through the exporter.
New to ADSelfService Plus?
Related Articles
JDBC data not populated for tomcat added by Prometheus
To configure JDBC metrics in tomcat exporter 1) Open the below file from tomcat installation directory. $CATALINA_BASE/conf/server.xml 2) Add the following configuration under <GlobalNamingResources> tag in the server.xml file. <Resource ...
How to configure Prometheus inside Openshift to scrape necessary metrics for Applications Manager?
To setup Prometheus inside a Openshift Cluster and scrape metrics for monitoring the same in Applications Manager, kindly follow the steps given below: Create a new Project "monitor" inside the Desired Cluster to be monitored using the below command. ...
How to configure Tomcat Monitor for JBoss 3.2.5?
Steps to configure Tomcat Monitor for JBoss 3.2.5 : 1. Append the following script in the 'web.xml' file, present under 'JBoss_Home\server\deploy\jbossweb-tomcat50.sar\ROOT.war\WEB-INF' folder : <servlet-mapping> <servlet-name>Status ...
Prerequisites for monitoring apache server metrics
The Apache mod_status module enables users to view detailed performance metrics of the Apache web server. You must enable and configure the mod_status correctly in the Apache configuration file to get performance metrics from Apache and view the data ...
Applications Manager is not collecting data from Tomcat Server.
If the proxy settings are configured wrong, then Tomcat Data collection will not happen correctly as Applications Manager uses HTTP requests for data collection from Tomcat Server. Check if you are able to access the Tomcat Server from browser in ...