Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 6.22.1
- Ruby: ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-linux]
- Distribution: Ubuntu 18.04
- Module version: 11.1.0
How to reproduce (e.g Puppet code you use)
Hieradata as follows:
prometheus::manage_prometheus_server: true
prometheus::version: '2.27.1'
prometheus::external_url: "https://alertmanager.example.com"
What are you seeing
The external url gets configured for the prometheus service instead of the alertmanager service, contrary to what the docs say (https://forge.puppet.com/modules/puppet/prometheus/11.1.0/reference#external_url)
external_url
Data type: Optional[Variant[Stdlib::HTTPUrl, Stdlib::Unixpath, String[1]]]
The URL under which Alertmanager is externally reachable (for example, if Alertmanager is served via a reverse proxy). Used for generating relative and absolute links back to Alertmanager itself. If omitted, relevant URL components will be derived automatically.
I've found that it's necessary to use the alertmanager extra_options param instead to configure alertmanager's external URL:
prometheus::alertmanager::extra_options: "--web.external-url=https://alertmanager.example.com"
What behaviour did you expect instead
I think this is a documentation issue, and that the docs for the prometheus::external_url parameter should be updated to say something like "The URL under which Prometheus is externally reachable..."
It might also be good to add a prometheus::alertmanager::external_url parameter for specifying the alertmanager external URL instead of having to use the extra_options.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
Hieradata as follows:
What are you seeing
The external url gets configured for the prometheus service instead of the alertmanager service, contrary to what the docs say (https://forge.puppet.com/modules/puppet/prometheus/11.1.0/reference#external_url)
I've found that it's necessary to use the alertmanager
extra_optionsparam instead to configure alertmanager's external URL:What behaviour did you expect instead
I think this is a documentation issue, and that the docs for the prometheus::external_url parameter should be updated to say something like "The URL under which Prometheus is externally reachable..."
It might also be good to add a
prometheus::alertmanager::external_urlparameter for specifying the alertmanager external URL instead of having to use theextra_options.