Skip to main content

Monitoring Role

This Ansible role can be used to install grafana agent.


Variables

VariablesTypeOptionsDefaults
monitoring_agent_package_state:stringpresent, absent, latestpresent
monitoring_agent_package:string---https://github.com/grafana/alloy/releases/download/v{{ monitoring_agent_tag }}/alloy-{{ monitoring_agent_tag }}-1.{{ monitoring_agent_arch }}.rpm
monitoring_agent_arch:string---amd64
monitoring_agent_tag:string---1.3.1
monitoring_agent_config_remoteserver_prometheus:string---http://127.0.0.1:3100/loki/api/v1/push
monitoring_agent_config_remoteserver_loki:string---http://127.0.0.1:9100/api/v1/push
monitoring_agent_config_path:string---/etc/alloy/config.alloy
monitoring_agent_service_name:string---alloy.service
monitoring_agent_service_state:stringreloaded, restarted, started, stoppedstarted
monitoring_agent_service_enabled:boolfalse, truetrue

Example Playbook

- name: Import monitoring Role
hosts: all
roles:
- role: giftpilz0.general.monitoring