Set up monitoring and logging for your Linux server
Last updated on
Set up monitoring
Section titled “Set up monitoring”Configure your server to send metrics to STACKIT Observability and use Grafana to visualize them.
-
Install a monitoring agent on the server, for example Telegraf, and configure it to push the metrics to the instance. This is a basic Telegraf configuration in
/etc/telegraf/telegraf.d/:[[outputs.http]]## URL is the address to send metrics tourl = "[Observability Instance Receive URL]"username = "[Observability Instance Username]"password = "[Observability Instance Password]"## Data format to output.data_format = "prometheusremotewrite"[outputs.http.headers]Content-Type = "application/x-protobuf"Content-Encoding = "snappy"X-Prometheus-Remote-Write-Version = "0.1.0" -
Open the Grafana instance of your Observability instance and set up your dashboards.
-
Optional: Create alerts in your Observability instance.
Set up logging
Section titled “Set up logging”Configure your server to send logs to STACKIT Logs, a central log store.
-
Install a log collector on the server, for example Grafana Alloy.
-
Configure the collector to send the logs to the instance. For a basic configuration, see Grafana Alloy: Write log data to Logs instance.