Skip to content

Latest commit

 

History

231 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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
  • Fluent-bit

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
---
fluentbit_user fluentbit User for fluentbit installation
fluentbit_loki_server 127.0.0.1 Loki server to ship to
fluentbit_scrape_configs [] Files to scrape for logging
fluentbit_config_service [] Config for fluentbit service
fluentbit_config_input [] Config for fluentbit input
fluentbit_config_output [] Config for fluentbit output

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 & fluent-bit).

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages