Skip to content

imrein/ansible-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monitoring ansible setup

   

Overview

CI

Role to setup a new monitoring server. This stack is modular and comes with:

  • Grafana
  • Prometheus
  • Loki
  • Node_exporter
  • Promtail

This has been tested on:

  • RHEL based distros
  • Debian
  • Ubuntu

Tip

The testing will be done using molecule and is automated using github-actions.

Requirements

A machine with an SSH connection.

Role Variables

The variables are defined in defaults/main.yml. These should be configured as needed:

Variable Default Info
download_location /tmp Download location
packages [] General packages that should be installed
---
grafana_version x.x.x Package version to be installed
grafana_datasources [] Datasources that should be added
---
prometheus_user prometheus User for prometheus installation
prometheus_version x.x.x Package version to be installed
prometheus_scrape_config_jobs [] Define scrap jobs
---
node_exporter_user node_exporter User for node_exporter installation
node_exporter_version x.x.x Package version to be installed
node_exporter_architecture amd64 Package architecture
---
loki_user loki User for loki installation
loki_version x.x.x Package version to be installed
---
promtail_user promtail User for promtail installation
promtail_version x.x.x Package version to be installed
promtail_architecture amd64 Package architecture
promtail_loki_server 127.0.0.1 Loki server to ship to
promtail_scrape_configs [] Files to scrape for logging

Example playbook

Note

Use ansible tags to select which components to setup. Multiple ones can be selected at once.

---
- name: test playbook
  hosts: general

  roles:
  - role: ansible-monitoring -b --tags 'prometheus'

About

Role to setup monitoring tools (grafana, prometheus, node_exporter, loki & promtail).

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages