3.1. alloy

This role installs Grafana Alloy as monitoring agent and counter part to the plg role.

Here it is used for two purposes:

  • Providing a port for Prometheus to pull metrics (former node exporter was integrated in Alloy)

  • Pushing logs to Loki (former promtail was integrated in Alloy)

There are more functionalities inside Alloy not used for this project.

The role comes with the following configuration options:

  • Parameters:

    • alloy_loki_target: URL of the Loki server for pushing logs

    • alloy_log_paths: Paths of logfiles (usually with wildcards) to be shipped. By default /opt/gnuhealth/**/**/*.log is added because some services in this project have such custom paths.

  • Variables:

    • alloy_apt: Dictionary for APT installation containing key_url for downloading a GPG key to key_dest and repo as APT repository sources entry.

    • alloy_config_path: Path for the main config file.

    • alloy_default_path: Path of an environment file for the service (for run time options).

    • alloy_file_mode: Default file mode.

    • alloy_dir_mode: Default directory mode.