![]() ![]() Grafana can be configured through json files. Now let's import the dashboards into Grafana. Grafana configuration to import the dashboards Ensure that, all endpoints are in UP status as shown below: Now, access the url to validate that the data are scraped properly. Restart Prometheus to apply the changes: $ systemctl restart prometheus But each operating system on each server is independent and thus has independent OS metrics. Note that the metrics for Ansible Tower are only collected once, while the operating system metrics are collected for each server: Ansible Tower helps ensure that all internal metrics are already collected and shared among all installed servers of the cluster. Below is an example: # Scrape Config - Towerīearer_token: xxxxxxxxxxxxxxxx (your bearer token) Next, add the configuration for Ansible Tower and the operating system. Open the configuration of your Prometheus installation with an editor of your choice: $ vim /etc/prometheus/prometheus.yml With the token in our hands, we can now configure Prometheus, adding the node_exporters scrape config and the scrape for Ansible Tower's metrics. Choose the scope “read” and click the green “SAVE” button. A new window pops up where you can define the specifics of the token and finally create it, see the image below. From there, click on “ Tokens” and then on the + sign. To generate the token, access the Ansible Tower console and click on your username that appears at the top of the page. First we need to generate an authentication token on Ansible Tower: the token will grant access to Ansible Tower without the need to enter username and passwords each time it is accessed. Let’s set up Prometheus to gather these data. Validate that the Ansible Tower metrics are being displayed correctly by accessing the url below: Īccessing the url we should see a listing of all available Ansible Tower metrics, as shown below: Next let’s shift our focus towards Ansible Tower. Repeat these steps on the other Ansible Tower servers as well as on the external database. The output of the playbook is shown below:Īfter the installation, verify if node_exporter is indeed running and listens on port 9100. $ ansible-playbook install_node_exporter.yaml Run the install_node_exporter.yaml playbook to perform the installation of node_exporter. #GRAFANA NODE EXPORTER INSTALL#Luckily, a playbook to install it is included. Next, we have to perform the actual installation of node_exporter. See the listing shown below for reference: $ git clone To do that we login to our Ansible Tower server, clone the corresponding git repository and change into the repository directory. Since node_exporter is not available in Red Hat Enterprise Linux 8 by default we first have to install it. Also please note that this blog post assumes an already installed instance of Prometheus and Grafana.Īs a first step we will set up node_exporter on the Ansible Tower servers and the external database. In this blog post we assume a cluster of three Ansible Tower instances and an external database. Prometheus itself collects the data in its database by importing them from node_exporters and from the Ansible Tower APIs. The data flow is outlined below:Īs you see, Grafana looks for data in Prometheus. ![]() Note that we use Red Hat Enterprise Linux 8 as the OS running Ansible Tower here. To reach that goal we configure Ansible Tower metrics for Prometheus to be viewed via Grafana and we will use node_exporter to export the operating system metrics to an operating system (OS) dashboard in Grafana. #GRAFANA NODE EXPORTER HOW TO#This blog post will outline how to monitor Ansible Tower environments by feeding Ansible Tower and operating system metrics into Grafana by using node_exporter & Prometheus. Luckily, Ansible Tower does provide metrics via the API, and they can easily be fed into Grafana. However, there is often the need to monitor the current state of Ansible Tower. Automation Analytics can help by providing insight into health state and organizational statistics. A crucial piece of automation is ensuring that it runs flawlessly. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |