Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web.external-url #232

Closed
sandwitch opened this issue Jul 9, 2018 · 9 comments
Closed

web.external-url #232

sandwitch opened this issue Jul 9, 2018 · 9 comments

Comments

@sandwitch
Copy link

Hi ,

Is it possible to add the following change some way as a variable?
# helper variable indicating prometheus version, so we can use on this information in the template
$prometheus_v2 = true
$daemon_flags = [
"--config.file=${prometheus::server::config_dir}/${prometheus::server::configname}",
"--storage.tsdb.path=${prometheus::server::localstorage}",
"--storage.tsdb.retention=${prometheus::server::storage_retention}",
"--web.console.templates=${prometheus::server::shared_dir}/consoles",
"--web.console.libraries=${prometheus::server::shared_dir}/console_libraries",
"--web.external-url=/prometheus",
]
}

@bastelfreak
Copy link
Member

hey @sandwitch, thanks for opening the issue. Can you provide a patch for this?

tuxmea pushed a commit to tuxmea/puppet-prometheus that referenced this issue Jul 10, 2018
- first commit, misses parameter spec testing
- maybe needed for alertmanager, too

implements voxpupuli#232
@tuxmea
Copy link
Member

tuxmea commented Jul 10, 2018

@sandwitch can ypu please check whether the following settings work:

  1. no parameter given:
    --web.external-url=''
  1. parameter given:
    --web.external-url='/prometheus'

I wonder whether the single quotes are OK.
Otherwise I must rethink the parameter evaluation within the template.

@sandwitch
Copy link
Author

sandwitch commented Jul 11, 2018

I' l try tomorrow.Thanks for the input.

@sandwitch
Copy link
Author

puppet-prometheus.patch.txt
We tried with the changes from tuxmea and it is working as expected. We can change the web.external-url from our hiera data! Looks good to is. If you need more input please let us know.
If you still need the patch is is attached.

@tuxmea
Copy link
Member

tuxmea commented Jul 12, 2018

@sandwitch does prometheus still work when you NOT provide hiera data for external web url?

@sandwitch
Copy link
Author

Do you mean an empty string or no data @ all?
It does imho:
+++ /tmp/puppet-file20180712-19601-1doxzar 2018-07-12 13:58:01.646688180 +0200
@@ -12,7 +12,7 @@
--storage.tsdb.retention=360h
--web.console.templates=/usr/local/share/prometheus/consoles
--web.console.libraries=/usr/local/share/prometheus/console_libraries \

  • --web.external-url='/prometheus' \
  • --web.external-url='' \

@tuxmea
Copy link
Member

tuxmea commented Jul 12, 2018

@sandwitch I just want to be sure that no data or empty string still produces valid config.

--web.external-url=''

If this is the case, we can merge this PR.
(valid config = properly running prometheus component)

@sandwitch
Copy link
Author

It is working. See puppet's changes above. Is retarted andere gesteld Prometheus. In case of ' ' IT was not working behind the zentral proxy obvious. Testing directly on port 9090 worked however. Would be nice of thuis could be merged. Thanks for your work!

@sandwitch
Copy link
Author

Sorry about the phone translation 😂

cegeka-jenkins pushed a commit to cegeka/puppet-prometheus that referenced this issue Aug 28, 2019
- first commit, misses parameter spec testing
- maybe needed for alertmanager, too

implements voxpupuli#232
Rovanion pushed a commit to Rovanion/puppet-prometheus that referenced this issue May 5, 2021
- first commit, misses parameter spec testing
- maybe needed for alertmanager, too

implements voxpupuli#232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants