diff --git a/stable/mongodb-replicaset/Chart.yaml b/stable/mongodb-replicaset/Chart.yaml index 2009f67e1e62..815e790d11e2 100644 --- a/stable/mongodb-replicaset/Chart.yaml +++ b/stable/mongodb-replicaset/Chart.yaml @@ -1,12 +1,13 @@ name: mongodb-replicaset home: https://github.com/mongodb/mongo -version: 3.4.1 +version: 3.5.0 appVersion: 3.6 description: NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. icon: https://webassets.mongodb.com/_com_assets/cms/mongodb-logo-rgb-j6w271g1xn.jpg sources: - https://github.com/mongodb/mongo + - https://github.com/percona/mongodb_exporter maintainers: - name: foxish email: ramanathana@google.com diff --git a/stable/mongodb-replicaset/README.md b/stable/mongodb-replicaset/README.md index cc09e44f7626..158594747161 100644 --- a/stable/mongodb-replicaset/README.md +++ b/stable/mongodb-replicaset/README.md @@ -51,6 +51,7 @@ The following table lists the configurable parameters of the mongodb chart and t | `tls.enabled` | Enable MongoDB TLS support including authentication | `false` | | `tls.cacert` | The CA certificate used for the members | Our self signed CA certificate | | `tls.cakey` | The CA key used for the members | Our key for the self signed CA certificate | +| `metrics.enabled` | Enable Prometheus compatible metrics for pods and replicasets | `false` | | `auth.enabled` | If `true`, keyfile access control is enabled | `false` | | `auth.key` | Key for internal authentication | `` | | `auth.existingKeySecret` | If set, an existing secret with this name for the key is used | `` | @@ -160,6 +161,26 @@ mongodb with your `mongo.pem` certificate: ```console $ mongo --ssl --sslCAFile=ca.crt --sslPEMKeyFile=mongo.pem --eval "db.adminCommand('ping')" ``` + +## Promethus metrics +Enabling the metrics as follows will allow for each replicaset pod to export Prometheus compatible metrics +on server status, individual replicaset information, replication oplogs, and storage engine. + +```yaml +metrics: + enabled: true + image: ssalaues/mongodb-exporter + imageTag: 0.5 + imagePullPolicy: IfNotPresent + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9216" + prometheus.io/path: "/metrics" +``` + +More information on [MongoDB Exporter](https://github.com/percona/mongodb_exporter) metrics available. + ## Readiness probe The default values for the readiness probe are: diff --git a/stable/mongodb-replicaset/init/on-start.sh b/stable/mongodb-replicaset/init/on-start.sh index fa23d6f285d9..811dca5a9c93 100644 --- a/stable/mongodb-replicaset/init/on-start.sh +++ b/stable/mongodb-replicaset/init/on-start.sh @@ -61,6 +61,9 @@ if [ -f "$ca_crt" ]; then pem=/work-dir/mongo.pem ssl_args=(--ssl --sslCAFile "$ca_crt" --sslPEMKeyFile "$pem") +# Move into /work-dir +pushd /work-dir + cat >openssl.cnf <