Copy Doc ID
af1daa65-c273-11ec-9fd1-fa163e15d75b:950513
Download PDF
Install the FortiMonitor Agent on a Docker host
Docker containers can be monitored similar to any existing physical server or VM. By installing the FortiMonitor Agent on your Docker host, each container can be monitored and represented in FortiMonitor individually. Applications within containers can also be monitored with a single host agent, assuming they expose their metrics in an accessible way. You may also run the FortiMonitor Agent in containers to obtain metrics not exposed outside of the container.
Installation
To install the FortiMonitor Agent on your Docker host, see Install the FortiMonitor Agent. Once the Agent is installed, run the following command to add the user the agent runs as to the Docker user group. This enables the FortiMonitor Agent to connect to the Docker socket and obtain Docker metrics and metadata.
sudo usermod -a -G docker fm-agent
If you run the Agent as a different user, add that user to the docker group.
The FortiMonitor Agent will begin discovering containers on the Docker host and adding them to FortiMonitor.
Application Monitoring
Currently, the following set of applications running in Docker containers are supported:
Nginx
Mongodb
Apache
MySQL
Redis
RabbitMQ
To monitor these applications, add a mapping block to your config file that lets FortiMonitor know which application is using which image. This allows you to specify if an application is using a custom image you have built.
Here’s an example with each of the above mentioned applications. The left side is the FortiMonitor name for the application; the right side is the name of your container image.
[agent]
customer_key = abcde-1232-ploc03-xcxvp
enable_docker = true
[docker_image_mapping]
mongo = mongo
rabbitmq = rabbitmq
mysql = mysql
redis = redis
nginx = nginx
apache = httpd
You will still need to perform the required configuration for each application (if needed). See Application plugins for more information.
Control Panel
Instance Tree
If you open the instance tree on the left side of the control panel, you will see that your containers are nested under each Docker host. Clicking any of the containers will take you to its details page.
Infrastructure Map and Dashboards
Containers will appear in the Infrastructure Maps and Dashboards similar to any other monitored instance.
Docker containers can be monitored similar to any existing physical server or VM. By installing the FortiMonitor Agent on your Docker host, each container can be monitored and represented in FortiMonitor individually. Applications within containers can also be monitored with a single host agent, assuming they expose their metrics in an accessible way. You may also run the FortiMonitor Agent in containers to obtain metrics not exposed outside of the container.
Installation
To install the FortiMonitor Agent on your Docker host, see Install the FortiMonitor Agent. Once the Agent is installed, run the following command to add the user the agent runs as to the Docker user group. This enables the FortiMonitor Agent to connect to the Docker socket and obtain Docker metrics and metadata.
sudo usermod -a -G docker fm-agent
If you run the Agent as a different user, add that user to the docker group.
The FortiMonitor Agent will begin discovering containers on the Docker host and adding them to FortiMonitor.
Application Monitoring
Currently, the following set of applications running in Docker containers are supported:
Nginx
Mongodb
Apache
MySQL
Redis
RabbitMQ
To monitor these applications, add a mapping block to your config file that lets FortiMonitor know which application is using which image. This allows you to specify if an application is using a custom image you have built.
Here’s an example with each of the above mentioned applications. The left side is the FortiMonitor name for the application; the right side is the name of your container image.
[agent]
customer_key = abcde-1232-ploc03-xcxvp
enable_docker = true
[docker_image_mapping]
mongo = mongo
rabbitmq = rabbitmq
mysql = mysql
redis = redis
nginx = nginx
apache = httpd
You will still need to perform the required configuration for each application (if needed). See Application plugins for more information.
Control Panel
Instance Tree
If you open the instance tree on the left side of the control panel, you will see that your containers are nested under each Docker host. Clicking any of the containers will take you to its details page.
Infrastructure Map and Dashboards
Containers will appear in the Infrastructure Maps and Dashboards similar to any other monitored instance.