ISSUE TYPE Feature Idea COMPONENT NAME API UI SUMMARY Add Prometheus as a monitoring tool in awx for monitoring application internals. Prometheus is also set as monitoring within Openshift. It can be used to gain insights about: any run.
Contents. Introduction.A Prometheus & Grafana docker-compose stackHere's a quick start using Play-With-Docker (PWD) to start-up a stack containing Prometheus, Grafana and Node scraper to monitor your Docker infrastructure. The Try in PWD below allows you to quickly deploy the entire Prometheus stack with a click of the button.
This will allow you to quickly test the stack to see if it meets your needs.Pre-requisitesBefore we get started installing the Prometheus stack. Ensure you install the latest version of docker and on your Docker host machine. Docker Swarm is installed automatically when using Docker for Mac or Docker for Windows. Installation & ConfigurationClone the project locally to your Docker host.If you would like to change which targets should be monitored or make configuration changes edit the file.
The targets section is where you define what should be monitored by Prometheus. The names defined in this file are actually sourced from the service name in the docker-compose file.
If you wish to change names of the services you can add the 'containername' parameter in the docker-compose.yml file.Once configurations are done let's start it up. From the /prometheus project directory run the following command: $ HOSTNAME=$(hostname) docker stack deploy -c docker-stack.yml promThat's it the `docker stack deploy' command deploys the entire Grafana and Prometheus stack automagically to the Docker Swarm. By default cAdvisor and node-exporter are set to Global deployment which means they will propogate to every docker host attached to the Swarm.The Grafana Dashboard is now accessible via: for example username - adminpassword - foobar (Password is stored in the `/grafana/config.monitoring` env file)In order to check the status of the newly created stack: $ docker stack ps promView running services: $ docker service lsView logs for a specific service $ docker service logs promAdd Datasources and DashboardsGrafana version 5.0.0 has introduced the concept of provisioning. This allows us to automate the process of adding Datasources & Dashboards. The /grafana/provisioning/ directory contains the datasources and dashboards directories. These directories contain YAML files which allow us to specify which datasource or dashboards should be installed.If you would like to automate the installation of additional dashboards just copy the Dashboard JSON file to /grafana/provisioning/dashboards and it will be provisioned next time you stop and start Grafana. Install Dashboards the old wayI created a Dashboard template which is available on.
Simply select Import from the Grafana menu - Dashboards - Import and provide the Dashboard IDThis dashboard is intended to help you get started with monitoring. If you have any changes you would like to see in the Dashboard let me know so I can update Grafana site as well.Here's the Dashboard TemplateGrafana Dashboard - dashboards/GranaDashboad.jsonAlerting Dashboard AlertingAlerting has been added to the stack with Slack integration.