How to enable Apache Tomcat monitoring in Datadog Agent?

Apache Tomcat Integratoion with Datadog collects Following Tomcat metrics

  • Overall activity metrics: error count, request count, processing times, etc.
  • Thread pool metrics: thread count, number of threads busy, etc.
  • Servlet processing times

Step 1 – How to Install Open JDK 8 in Centos?

$ sudo yum install java-1.8.0-openjdk -y

Reference

  • https://openjdk.java.net/install/

How to Download Apache Tomcat 8?

$ sudo yum install wget unzip -y
$ sudo -s
$ cd /opt/
$ wget https://mirrors.estointernet.in/apache/tomcat/tomcat-8/v8.5.61/bin/apache-tomcat-8.5.61.zip
$ unzip apache-tomcat-8.5.61.zip
$ cd apache-tomcat-8.5.61/bin
$ chmod -R 755 .
$ ./shutdown.sh
$ ./startup.sh

Reference

  • https://tomcat.apache.org/download-80.cgi

How to install datadog agent in centos 7?

How to enable JMX Remote in Tomcat 8 to Monitor & Administer?

$ vi /opt/apache-tomcat-8.5.61/bin/catalina.sh

CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9012 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

$ ./shutdown.sh
$ ./startup.sh

Reference

  • https://tomcat.apache.org/tomcat-8.0-doc/monitoring.html#Enabling_JMX_Remote

How to configure and enable Tomcat intergration in Datadog agent?

$ cd /etc/datadog-agent/conf.d/tomcat.d/
$ cp conf.yaml.example conf.yaml
$ datadog-agent configcheck
$ systemctl restart datadog-agent
$ systemctl status datadog-agent
$ datadog-agent config
Rajesh Kumar