prometheus mongodb exporter

Description

Allows prometheus to scrape MongoDB metrics


This charm has been created to make metrics from Juju controller databases
available for collection by prometheus. It should work for any MongoDB
database, but it has no mongodb relation.

It is using the prometheus-mongodb-exporter snap.

Metrics will be available at http://<unit_ip>:19091/metrics once exposed.

You can add a user dedicated to monitoring to MongoDB by running the following
in a MongoDB shell :

db.createUser( { user: "prometheus-exporter",                                      
                 pwd: "my-awesome-password",                           
                 roles: [ { role: "clusterMonitor", db: "admin" },                 
                          { role: "read", db: "local" }, ] }                       
               )                         

Configuration

mongodb_tls_ca
(string) base64 encoded CA that is trusted for MongoDB server connections. You can set this value to "juju" if you want to connect to a Juju controller MongoDB - the charm will automatically use the CA used by Juju.
snap_proxy
(string) HTTP/HTTPS web proxy for Snappy to use when accessing the snap store.
mongodb_tls_cert
(string) base64 encoded client certificate and key used to connect to MongoDB. You can set this value to "juju" if you want to connect to a Juju controller MongoDB - the charm will automatically use the certificate used by Juju.
mongodb_uri
(string) MongoDB server URI. For example : mongodb://user:pass@ip:port/
port
(int) Port to listen for connections on
19091