Use fallback Prometheus port in SLES 16 - #134
Conversation
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
| trento_prometheus_host_group: "" | ||
| trento_prometheus_host: localhost | ||
| trento_prometheus_port: "{{ prometheus_port | default(9090) }}" # `prometheus_port` for backwards-compatibility | ||
| trento_prometheus_port: "{{ prometheus_port | default((ansible_distribution_major_version == '16') | ternary(9191, 9090)) }}" # `prometheus_port` for backwards-compatibility; SLES 16 defaults to 9191 since Cockpit already occupies 9090 there |
There was a problem hiding this comment.
suggestion: I would suggest adding a TRENTO_PROMETHEUS_PORT env variable, so that customers can define the best solution there.
thought: And I think more and more than because Prometheus is not supported by Trento and requires additional knowledge to deploy properly, our documentation should specify that. We could then deploy always prometheus in a non-standard port (9191) documenting that is a "test only" solution, and that the customer should deploy their own solution properly in the right port, highlighting the conflict with Cockpit and the reuse of port 9090. That would also avoid problems with customers that expect performance and scalability of the solution to be enough even if that is not part of the solution, and point to MLM as the supported SUSE solution.
Description
This pull request updates the default port configuration for Prometheus to better support SLES 16 environments, where port 9090 is already used by Cockpit. It also improves the documentation to clarify these changes and the related default values.
Prometheus port default changes:
trento_prometheus_portinroles/trento/defaults/main.ymlto use port 9191 on SLES 16, while keeping 9090 as the default elsewhere. This prevents port conflicts with Cockpit on SLES 16.README.adocto explain the new default behavior fortrento_prometheus_port, specifying that it defaults to 9191 on SLES 16 and can be overridden if needed.prometheus_portvariable documentation to reflect the new SLES 16 default (9191), improving clarity for users migrating or deploying on SLES 16.Fixes #TNRT-4636
How was this tested?
IRL
Documentation changes
Yes
Additional information
Related to #132