cloudalchemy / ansible-grafana

Platform for analytics and monitoring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues provisioning datasources on Grafana in private subnet

thejchap opened this issue · comments

All API calls use grafana_url as the base, however if Grafana is being provisioned on a server in a private subnet the public grafana_url may not always line up with the Grafana server DNS in the private subnet.

Example set up:

  • web-server Nginx on server in public subnet, reverse proxying https://monitoring.app.com/grafana to http://monitoring.production.app.com:3000
  • public monitoring.app.com is accessed from browser, resolved via public hosted zone
  • private monitoring.production.app.com is accessed by servers in the VPC, resolved via private hosted zone
  • grafana-server Grafana running on monitoring.production.app.com in the same VPC in a private subnet, exposing port 3000.

When running ansible-playbook, API calls get made to monitoring.app.com/grafana (configured via grafana_url) which is not correct. API calls should be made to monitoring.production.app.com

Open to solutions and also happy to open a PR after deciding how to handle this, maybe another variable grafana_api_url that can override grafana_url and is used for the API calls?

Adding grafana_api_url with default value of {{ grafana_url }} is a way to go. I don't see any other option which could work in this setup.

Could you create PR?

commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.