Skip to content

Run PMM with external grafana #3829

Open
@wsilva

Description

@wsilva

Description

We already have Grafana running in Kubernetes cluster with horizontal auto scale feature enabled so Grafana pods can increase or decrease the amount of replicas based on usage. These Grafana pods are pointing to external postgres database running as a service in AWS RDS.

Is there a way to run PMM separated from Grafana?

Suggested solution

I was thinking in a feature flag based on environments variables like describe in HA document:

Ex.:

  • For external postgres: PG_EXTERNAL_DB = true | false, PG_HOST = external.postgres.local, PG_USER = pg-username, PG_PASSWORD = some-random-p4ssw0rd
  • For external grafana: GF_EXTERNAL = true | false
  • For external victoria metrics: VM_EXTERNAL = true | false, VM_HOST = external.victoria-metrics.local
  • And so on ...

In the running Grafana we can install or copy plugins and import PMM dashboards before running the PMM pod for the first time.

In the PMM pod we can set autostart = false inside the *.ini (/etc/supervisord.d/grafana.ini, /etc/supervisord.d/pmm.ini, ...) supervisord files according to the service we are running separatedly (postgres, clickhouse, victoria metrics, ...).

We can also set any config file based on the same environment variables to point to external services.

Any suggestion are welcome.

Additional context

I was taking a look at the HA doc and I recommend to change the usage of ip addresses to FQDN from each external service to avoid the necessity of fetch new ip addresses, change config files and restart PMM in each change. This way we can run it inside a kubernetes cluster.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

featureFeature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions