Skip to main content

Monitoring Role

Install and configure the Grafana Alloy monitoring agent.


Variables​

VariableTypeOptionsDefaultDescription
monitoring_agent_archstring---amd64alloy agent architecture (e.g. amd64, arm64)
monitoring_agent_tagstring---1.19.0alloy release version tag
monitoring_agent_package_statestringpresent, absent, latestpresentdesired state of the alloy package
monitoring_agent_packagelist of string---["https://github.com/grafana/alloy/releases/download/v{{ monitoring_agent_tag }}/alloy-{{ monitoring_agent_tag }}-1.{{ monitoring_agent_arch }}.rpm"]list of packages to install
monitoring_agent_config_pathstring---/etc/alloy/config.alloypath to the alloy configuration file
monitoring_agent_service_namestring---alloy.servicesystemd service unit name
monitoring_agent_service_statestringreloaded, restarted, started, stoppedstarteddesired state of the alloy service
monitoring_agent_service_enabledbooltrue, falsetruewhether the alloy service is enabled at boot
monitoring_agent_config_remoteserver_lokistring---""Loki remote write endpoint URL
monitoring_agent_config_remoteserver_prometheusstring---""Prometheus remote write endpoint URL
monitoring_alloy_loki_basic_auth_usernamestring---alloybasic auth username for Loki
monitoring_alloy_loki_basic_auth_passwordstring---""basic auth password for Loki
monitoring_alloy_mimir_basic_auth_usernamestring---alloybasic auth username for Mimir/Prometheus
monitoring_alloy_mimir_basic_auth_passwordstring---""basic auth password for Mimir/Prometheus
monitoring_agent_external_labelsdict---{"host":"{{ inventory_hostname }}"}external labels added to all metrics and logs
monitoring_alloy_permissions_setupbooltrue, falsetruewhether to add alloy user to extra groups for journal access
monitoring_alloy_extra_groupslist of string---["adm","systemd-journal"]additional system groups for the alloy user
monitoring_alloy_node_exporter_scrape_intervalstring---60sscrape interval for node exporter metrics
monitoring_alloy_loki_journal_max_agestring---24hmaximum age of journal entries sent to Loki
monitoring_alloy_traefik_scrape_enabledbooltrue, falsefalsewhether to scrape Traefik metrics
monitoring_alloy_traefik_metrics_addressstring---127.0.0.1:8082Traefik metrics endpoint address
monitoring_alloy_traefik_scrape_intervalstring---30sscrape interval for Traefik metrics
monitoring_alloy_extra_configstring---""extra Alloy configuration appended to the main config