Categorygithub.com/simagix/mongo-ftdc
modulepackage
1.1.0
Repository: https://github.com/simagix/mongo-ftdc.git
Documentation: pkg.go.dev

# README

MongoDB FTDC Metrics and Charts

A dockerized tool to view MongoDB FTDC metrics.

Build

Use build.sh to build simagix/ftdc and simagix/grafana-ftdc Docker images.

./build.sh docker

Startup

Create a diagnostic.data directory if it doesn't exist yet:

mkdir -p ./diagnostic.data/

Copy FTDC files to under directory diagnostic.data:

cp $SOMEWHERE/metrics.* ./diagnostic.data/

Bring up FTDC viewer:

docker-compose up -d

View FTDC Metrics

  • View results URL http://localhost:3030/ using a browser.
  • Choose MongoDB FTDC Analytics from dashboard.
  • Change correct From and To date/time in the Custom Range panel.

Read Other FTDC Data

To read different FTDC files without restarting all Docker containers, remove all files from directory diagnostic.data and copy FTDC files to under the same directory. Execute the command below to force FTDC data reload:

curl -XPOST http://localhost:5408/grafana/dir -d '{"dir": "/diagnostic.data"}'

A JSON document is returned with information of the new endpoint, begin and end timestamps:

{"endpoint":"/d/simagix-grafana/mongodb-mongo-ftdc?orgId=1\u0026from=1550767345000\u0026to=1550804249000","ok":1}

Alternatively, you can simply run the command docker-compose down to bring down the entire cluster, edit the docker-compose.yaml file to point the diagnostic.data directory to a new location, and run docker-compose up to bring up the cluster again.

Shutdown

docker-compose down

Disclaimer

This software is not supported by MongoDB, Inc. under any of their commercial support subscriptions or otherwise. Any usage is at your own risk. Bug reports, feature requests and questions can be posted in the Issues section on GitHub.

# Packages

No description provided by the author
No description provided by the author

# Functions

FilterTimeSeriesData returns partial data points if there are too many.
GetFormulaHTML returns scoring formula.
GetMetricsFilenames gets metrics or keyhole_stats filesnames.
GetOptime -.
GetScoreByRange gets score.
GetShortLabel gets shorten label.
NewAssessment returns assessment object.
NewAttribs returns Attribs structure.
NewDiagnosticData -.
NewMetrics returns &Metrics.
PrintAllStats print all stats.

# Constants

PRIMARY - primary node.
SECONDARY - secondary node.

# Variables

FormulaMap holds low and high watermarks.

# Structs

Assessment stores timeserie data.
Attribs stores attribs map.
BuildInfo -.
ConcurrentTransactionsCountDoc contains db.serverStatus().wiredTiger.concurrentTransactions.[read|write].
ConcurrentTransactionsDoc contains db.serverStatus().wiredTiger.concurrentTransactions.
ConnectionsDoc contains db.serverStatus().connections.
CPUMetrics -.
DiagnosticData -.
DiagnosticDoc -.
DiskMetrics -.
DiskStats -.
DocumentDoc contains db.serverStatus().document.
ExtraInfoDoc contains db.serverStatus().extra_info.
FTDCStats FTDC stats.
GlobalLockDoc contains db.serverStatus().globalLockDoc.
GlobalLockSubDoc contains db.serverStatus().globalLockDoc.[activeClients|currentQueue].
HostInfo -.
MemberDoc stores replset status.
MemDoc containers db.serverStatus().mem.
Metrics stores metrics from FTDC data.
MetricsDoc contains db.serverStatus().metrics.
NetworkDoc contains db.serverStatus().network.
OpCountersDoc contains db.serverStatus().OpCounters.
OperationDoc contains db.serverStatus().operation.
OpLatenciesDoc contains db.serverStatus().opLatencies.
OpLatenciesOpDoc contains doc of db.serverStatus().opLatencies.
OptimeDoc -.
OSDoc -.
QueryExecutorDoc contains db.serverStatus().queryExecutor.
QueryRequest -.
RangeDoc -.
ReplSetStatusDoc stores replset status.
ScoreFormula holds metric info.
ServerInfoDoc -.
ServerStatusDoc contains docs from db.serverStatus().
SystemDoc -.
SystemMetricsDoc -.
TargetDoc -.
TimeSeriesDoc -.
WiredTigerBlockManagerDoc contains db.serverStatus().wiredTiger.cache.
WiredTigerCacheDoc contains db.serverStatus().wiredTiger.cache.
WiredTigerDataHandleDoc contains db.serverStatus().wiredTiger.data-handle.
WiredTigerDoc contains db.serverStatus().wiredTiger.