-
Notifications
You must be signed in to change notification settings - Fork 64
MongoDB FTDC and Grafana Integration
Ken Chen edited this page Nov 6, 2020
·
11 revisions
Keyhole can feed time series data into Grafana as a Simple JSON Datasource.
- Install Grafana
- Install SimpleJSON plugin
- Configure Simple JSON data store. Use http://<hostname>:5408/grafana as the HTTP URL.
- Import Keyhole Analytic Dashboard template.
- Use keyhole to read from
diagnostic.data
, for example
keyhole --web --diag /data/db/diagnostic.data
- Modify from and to date/time in Grafana
curl -XPOST http://localhost:5408/grafana/dir -d '{"dir": "/new/diagnostic.data"}'
Keyhole Docker container is also available from Docker Hub. This greatly reduce the need to configure Grafana. See mongo-ftdc for details. The Dockerfile follows the instructions above to configure Granfana and to build a Docker container image.
By default, Granfana uses port 3000, http://localhost:3000. After entering correct date/time range, you can see results similar to below. Note that if you use the docker-compose template, port 3030 is used.
Available time series data points are
- mem_resident - resident memory used
- mem_virtual - virtual memory used
- mem_page_faults - page faults
- conns_available - Connections available
- conns_current - current connections opened
- conns_created_per_minute - connections created per minute
- ops_query - number of queries
- ops_insert - number of insertions
- ops_update - number of updates
- ops_delete - number of deletions
- ops_getmore - number of getmore command
- ops_command - number of commands
- q_active_read - number of active reads
- q_active_write - number of active writes
- q_queued_read - number of reads queued
- q_queued_write - number of writes queued
- latency_read - average read latency in milliseconds
- latency_write - average write latency in milliseconds
- latency_command - average command latency in milliseconds
- scan_keys - number of index keys scanned
- scan_objects - number of documents scanned
- scan_sort - number of documents loaded into memory to sort
- wt_cache_max - wiredTiger max cache bytes configured in GB
- wt_cache_used - wiredTiger cache used in GB
- wt_cache_dirty - wiredTiger cache modified in GB
- wt_modified_evicted - modified pages evicted from wiredTiger cache
- wt_unmodified_evicted - unmodified pages evicted from wiredTiger cache
- wt_read_in_cache - pages read into wiredTiger cache
- wt_written_from_cache - pages written written from wiredTiger cache
- ticket_avail_read - available wiredTiger read tickets
- ticket_avail_write - available wiredTiger write tickets
- replication_lags - replication lags in seconds
- cpu_idle - CPU idle %
- cpu_iowait - CPU I/O wait %
- cpu_nice - CPU nice process %
- cpu_softirq - CPU soft interrupt %
- cpu_steal - CPU steal %
- cpu_system - CPU system %
- cpu_user - CPU user %
- disks_iops - disks IOPS
- disks_utils - disks utilizations (%)