Concept of DataDog Integration
Step - 1: First know the Tools
Step - 2: Validate if tool is exposing metrics or not. If not then enabled it.
Step - 3: Enable Integration at Datadog(Onetime) : From datadog UI -> goto integration -> search apache,mysql,tomcat,etc -> install integration
Step - 4: Enable datadog agent to collect Metrics from Integration
Step - 5: Restart agent
Step - 6: validate Metrics at Datadog UI
Docker Integration:
step-1 - Install Docker : we followed below steps
https://www.devopsschool.com/blog/how-to-install-docker-in-linux/
Step-2 - Install agent - From Datadog UI - Integration - agent - choose Ubuntu
Step 3 - Enable DataDogAgent to collect the Metrices from Integration :
cd /etc/datadog-agent/conf.d/docker.d/
$ cp conf.yaml.default conf.yaml
$ vi conf.yaml
$ systemctl restart datadog-agent
$ systemctl status datadog-agent
https://www.devopsschool.com/blog/how-to-enable-docker-container-monitoring-in-datadog-agent/
Step 4 - Create few containers
$ docker run -itd ubuntu
$ docker run -itd ubuntu
$ docker run -itd ubuntu
Step 5 - Restart a Datadog agent
systemctl restart datadog-agent
datadog-agent configcheck
datadog-agent check docker
datadog-agent status
Step 6 - Validate a Metrices at Mertrices expl - From datadog UI - Metrices - exporer - containers. metrices
Apache Configuration:
Step -1: Install apache : followed below steps from URL below
https://www.devopsschool.com/blog/how-to-install-configure-apache-httpd-server-in-linux/
Step -2: install agent - From Datadog UI - Integration - agent - choose Ubuntu
Step -3: Enable Apache with Mod status
Step -4: Make config changes
$ cd /etc/datadog-agent/conf.d/apache.d/
$ cp conf.yaml.default conf.yaml
$ vi conf.yaml
$ systemctl restart datadog-agent
$ systemctl status datadog-agent
Step -5: Restart agent
systemctl restart datadog-agent
datadog-agent configcheck
datadog-agent check apache
datadog-agent status
Step -6: Validate a Metrices at Mertrices expl - From datadog UI - Metrices - exporer - apache. metrices
MySql Configuration:
Step -1: Install MySQL serevr
https://www.devopsschool.com/blog/how-to-install-mysql-server-and-client-on-ubuntu/
Step -2: Install Agent - - From Datadog UI - Integration - agent - choose Ubuntu
Step -3: Create Username and Password for MySQL:
For mySQL 8.0+ create the datadog user with the native password hashing method:
mysql> CREATE USER 'datadog'@'localhost' IDENTIFIED WITH mysql_native_password by '';
Query OK, 0 rows affected (0.00 sec)
Note: @'localhost' is only for local connections - use the hostname/IP of your Agent for remote connections. For more information, see the MySQL documentation.
Verify the user was created successfully using the following commands - replace with the password you created above:
mysql -u datadog --password= -e "show status" | \
grep Uptime && echo -e "3[0;32mMySQL user - OK3[0m" || \
echo -e "3[0;31mCannot connect to MySQL3[0m"
mysql -u datadog --password= -e "show slave status" && \
echo -e "3[0;32mMySQL grant - OK3[0m" || \
echo -e "3[0;31mMissing REPLICATION CLIENT grant3[0m"
step -4: Assign User to Fetch Metrices MYSQL DB
For MySQL 8.0+ set max_user_connections with:
mysql> ALTER USER 'datadog'@'localhost' WITH MAX_USER_CONNECTIONS 5;
Query OK, 0 rows affected (0.00 sec)
If enabled, metrics can be collected from the performance_schema database by granting an additional privilege:
mysql> show databases like 'performance_schema';
+-------------------------------+
| Database (performance_schema) |
+-------------------------------+
| performance_schema |
+-------------------------------+
1 row in set (0.00 sec)
mysql> GRANT SELECT ON performance_schema.* TO 'datadog'@'localhost';
Query OK, 0 rows affected (0.00 sec)
Step -5: Config Integration
$ cd /etc/datadog-agent/conf.d/mysql.d/
$ sudo cp conf.yaml.example conf.yaml
$ sudo vi conf.yaml (CHECK IMAGE BELOW)
$ sudo service datadog-agent restart [UBUNTU]
$ sudo systemctl restart datadog-agent [Centos]
Step -6: Restart agent
systemctl restart datadog-agent
datadog-agent configcheck
datadog-agent check
datadog-agent status
Step -7: Validate a Metrices at Mertrices expl - From datadog UI - Metrices - exporer - mySQL. metrices
Tomacat Integration:
Step 1 – How to Install Open JDK 11 for Ubuntu
$ sudo apt-get update
$ sudo apt-get install openjdk-11-jdk -y
$ apt install openjdk-11-jdk-headless -y
Download Apache Tomcat 9 for Ubuntu
sudo apt-get install wget unzip -y
sudo su -
cd /opt/
wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.73/bin/apache-tomcat-9.0.73.zip
unzip apache-tomcat-9.0.73.zip
cd apache-tomcat-9.0.73/bin
chmod -R 755 .
ls -ltr
./shutdown.sh
./startup.sh
- Install the datadog agent in Ubuntu.Follow the below link. https://www.devopsschool.com/blog/how-to-install-datadog-agent-in-ubuntu/
- How to enable JMX Remote in Tomcat 8 to Monitor & Administer? vi /opt/apache-tomcat-9.0.73/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 Check with the process is running or not for JMX Ps- eaf | grep jmx
- 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 check the tomcat config datadog-agent configcheck | grep tomcat -A 1 -B 1
Top comments (0)