Bobby
Bobby

Reputation: 6940

Should Prometheus exporters be run as sidecar containers or in separate deployments?

For the general case, I'm wondering if there's a good reason - one way or the other - for running Prometheus exporters as their own Deployments vs. running as a sidecar container in the Pod.

As a concrete example, say I want to monitor an nginx application and plan to use the nginx Prometheus exporter. Should I:

A: Set up a new deployment with a single container running the nginx exporter, then provide ingress with a service.

B: Add an additional container to the nginx application Pod running the Prometheus exporter.

Upvotes: 3

Views: 3650

Answers (1)

P Ekambaram
P Ekambaram

Reputation: 17689

Use exporter as a sidecar container in the main pod. We follow this approach to scrape metrics from web based Java applications

Upvotes: 5

Related Questions