Skip to content

Releases: opencensus-integrations/mongostatusd

PoC Version Uno(Everywhere)

07 Aug 00:09
858e33b
Compare
Choose a tag to compare

This features the first release of mongostatusd, a daemon that if given a yaml configuration consisting of the MongoDB URI and MongoDB DBName along with OpenCensus metrics exporters, watches the database's serverStatus output and reports metrics to the various backends. It uses OpenCensus to collect once and export everywhere

Sample run

Given config files

  • config.yaml
metrics_report_period: 5s

stackdriver:
    project_id: census-demos
    metric_prefix: mongostatusd

mongodb_uri: mongodb://localhost:27017
mongodb_name: heroku_7wttfsz2

prometheus:
    port: 8787

running GOOGLE_APPLICATION_CREDENTIALS=./creds.json mongostatusd

and then a Prometheus configuration file prom.yaml

global:
    scrape_interval: 10s

    external_labels:
        monitor: 'mongostatusd'

scrape_configs:
    - job_name: 'mongostatusd'

      scrape_interval: 10s

      static_configs:
          - targets: ['localhost:8787']

then running Prometheus with prometheus --config.file=prom.yaml

Visual results

Stackdriver Metrics

sd-stats-p1

sd-stats-p2

sd-network

sd-server_requests

Seen on Prometheus

prometheus-stats

prometheus-network

prometheus-serverop_counters

prometheus-server_wiredtiger_cachecount

Binaries

$ shasum -a 256 bin/*
953f6d66353e2cbfcde99e39bf902a02d688c81bb61d1f20785646592bf84b0b  bin/mongostatusd_darwin
5bd7c74a3ad33bc6279a42242eff7a022bbe7c9438a5759b4aa19de90b482f6d  bin/mongostatusd_linux
6423aea5e6ae390b2ba9eeb5ed9b8f71b788e75f5777896bf87ab0c077426133  bin/mongostatusd_windows