Skip to content

Conversation

@balanza
Copy link
Member

@balanza balanza commented Dec 22, 2025

This RFC should serve as a blueprint for integrating system metrics with Prometheus on Grafana Alloy-based system.

The integration is needed because SLES >= 16 does not ship node_expoter anymore; instead, the default collector tool is Grafana Alloy.

The main goal of the RFC is to reach feature parity with the current solution both in terms of collected metrics and user experience.

@balanza balanza force-pushed the rfc-alloy-integration branch from ac01daf to 6302009 Compare December 22, 2025 16:16
@balanza balanza force-pushed the rfc-alloy-integration branch from 6302009 to 5f4224e Compare December 29, 2025 15:26
Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@balanza thanks a lot for this! Great job!

I left some comments, the most concerning one is about reachability and authentication of the prometheus write url

%endif
----

NOTE: The `sle_version` macro is provided by OBS and contains the SLES version as an integer (e.g., `150000` for SLES 15, `160000` for SLES 16). The `configure-alloy.sh` script is only installed on SLES 16 and later.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: great finding! Would you mind sharing the reference to where this is documented please?

Comment on lines +397 to +398
Wants=alloy.service
After=alloy.service
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought:

currently agent spec defines

Recommends:     golang-github-prometheus-node_exporter

https://github.com/trento-project/agent/blob/main/packaging/suse/trento-agent.spec#L33

Would it make sense to have a conditional reccomendation based on SLES version?

if sles < 16
  recommends exporter
else if sles >= 16
  recommends alloy

chmod 640 "${ALLOY_CONFIG_FILE}"

# Reload Alloy to pick up the new configuration
systemctl reload alloy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: if the configure-alloy.sh script is going to be executed in ExecStartPre we need to be mindful about the fact that alloy service might not be available and systemctl reload alloy would fail, right?

facts-service-url: amqp://guest:guest@localhost:5672

# Alloy configuration options
prometheus-url: https://trento.example.com/api/v1/write
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question:

If I get it right /api/v1/write is what a <prometheus-instance> exposes.

How should the prometheus write api be reachable by alloy?

  • directly via the <prometheus-instance> address?
  • via trento proxy (nginx/ingress)

Asking because it might have implications for the authentication and I am wondering to what extent trento should be responsible for that authentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants