mongo-dashboard1.png mongo-dashboard2.png mongo-dasboard3.png
See collector config for how to map the mongo replica set member states used in single stat panel.
https://docs.mongodb.com/manual/reference/replica-states/
Collector Configuration Details
(note, there is an official Grafana Labs MongoDB plugin listed here: https://grafana.com/grafana/plugins/grafana-mongodb-datasource)
Used some processor plugins to convert "state (string)" input from the mongodb plugin to int values as string not supported by our whisper DB, this was needed to show the single stat panel replica state.
Regex plugin map string value to int: https://github.com/influxdata/telegraf/tree/master/plugins/processors/regex
Then converter to change data type: https://github.com/influxdata/telegraf/tree/master/plugins/processors/converter
Mongodb plugin: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mongodb
System plugin: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/system
DiskIO plugin: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/diskio
Mem plugin: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/mem