Skip to content

Latest commit

 

History

History
 
 

prometheus-mongodb-exporter-v2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Prometheus MongoDB Exporter

A Prometheus exporter for MongoDB metrics.

Installs the MongoDB Exporter for Prometheus. The MongoDB Exporter collects and exports oplog, replica set, server status, sharding and storage engine metrics.

Get Repository Info

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update

See helm repo for command documentation.

Install Chart

helm install [RELEASE_NAME] prometheus-community/prometheus-mongodb-exporter

See configuration below.

See helm install for command documentation.

Uninstall Chart

helm uninstall [RELEASE_NAME]

This removes all the Kubernetes components associated with the chart and deletes the release.

See helm uninstall for command documentation.

Upgrading Chart

helm upgrade [RELEASE_NAME] [CHART] --install

See helm upgrade for command documentation.

Upgrading an existing Release to a new major version

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

From 2.x to 3.x

This version uses the original percona/mongodb_exporter docker image again, as described in the readme and Chart.yaml. It's maintained and it uses frequent docker builds, so this is preferable for security reasons.

The commnad arguments of the exporter have changed. If you have custom extraArgs settings you have to adjust them. Because of the newer version of the exporter image metrics may varry though, so you might need to adjust your dashboard querries or try out the "--compatible-mode" parameter in extraArgs.

The mongodb.uri variable got "mongodb://monogdb:27017" as default parameter.

Chart API was raisded to v2, so Helm 2 is not supported anymore.

The servicemonitor has been disabled by default as prometheus operator might not be installed in cluster.

Configuration

See Customizing the Chart Before Installing. To see all configurable options with detailed comments, visit the chart's values.yaml, or run these configuration commands:

helm show values prometheus-community/prometheus-mongodb-exporter

MongoDB Server Connection

To use the chart, ensure the mongodb.uri is populated with a valid MongoDB URI or an existing secret (in the releases namespace) containing the key defined on existingSecret.key, with the URI is referred via existingSecret.name. If no secret key is defined, the default value is mongodb-uri.

If the MongoDB server requires authentication, credentials should be populated in the connection string as well. The MongoDB Exporter supports connecting to either a MongoDB replica set member, shard, or standalone instance.

Service Monitor

The chart comes with a ServiceMonitor for use with the Prometheus Operator. By default, the ServiceMonitor is disabled. You can enable the ServiceMonitor by setting serviceMonitor.enabled to true. For the ServiceMonitor to be detected by the Prometheus Operator, you must add the selector label to serviceMonitor.additionalLabels. You can find this label under spec.serviceMonitorSelector of the Prometheus CRD.

If you're not using the Prometheus Operator, you can instead populate the podAnnotations as below:

podAnnotations:
  prometheus.io/scrape: "true"
  prometheus.io/port: "metrics"