Skip to content

Commit

Permalink
Added more links to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aherlihy committed Jan 17, 2017
1 parent 13ed42d commit 983b64d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/internal-packages/server-stats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ There `server-stats-graphs-component` contains four instances of `chart-componen
# Stores

## Charts
The `server-stats-graphs-store` listens to the `pollServerStats`, `pause`, and `restart` actions. When `pollServerStats` is triggered, about once a second, `serverStatus` is called on the DataService client. The results of the command is then passed to each of the four graph stores, which are named after the field of the result that they display. Each of the chart stores listen to the `ServerStatsStore` and the `restart` action.
The `server-stats-graphs-store` listens to the `pollServerStats`, `pause`, and `restart` actions. When `pollServerStats` is triggered, about once a second, [the serverStatus command](https://docs.mongodb.com/manual/reference/command/serverStatus/#dbcmd.serverStatus) is called on the DataService client. The results of the command is then passed to each of the four graph stores, which are named after the field of the result that they display. Each of the chart stores listen to the `ServerStatsStore` and the `restart` action.

The `restart` action clears the stored data in each of the chart stores and the `pause` action stops new data from being displayed but continues to collect data.

The charts' X axes are the time from `serverStatus.localTime` and the Y axes vary depending on the graph. Each graph store selects data to send to it's instance of `chart-component` where it is put into a d3 chart.
The charts' X axes are the time from [the "localTime" field](https://docs.mongodb.com/manual/reference/command/serverStatus/#serverstatus.localTime) and the Y axes vary depending on the graph. Each graph store selects data to send to it's instance of `chart-component` where it is put into a d3 chart.

Because the Network and Operations graphs show deltas, all graphs are shown with a 1-second delay. Chart lines will not draw if a pause of more than 1.5 seconds is detected between data points. This results in charts that may not be contiguous but will never show back-in-time behavior due to interpolation.

Expand All @@ -40,7 +40,7 @@ The `opcounters-store` gets data from [the "opcounters" field](https://docs.mong
The `globallock-store` gets data from [the "globallock" field](https://docs.mongodb.com/manual/reference/command/serverStatus/#server-status-global-lock). The Y values are the current number of operations from `serverStatus.globalLock.activeClients.readers`(active reads) `serverStatus.globalLock.activeClients.writers` (active writes), `serverStatus.globalLock.currentQueue.readers` (queued reads) and `serverStatus.globalLock.currentQueue.writers` (queued writes).

## Hot Collections
The `top-store` listens to `pollTop`, `pause`, and `restart` actions. When `pollTop` is triggered, it calls `top` on the DataService and passes the list of hottest (i.e. most used, or **greatest system load**) to the `top-component`. The order of the list is calculated to be consistent with how the Cloud team and `mongotop` rank their hot collections.
The `top-store` listens to `pollTop`, `pause`, and `restart` actions. When `pollTop` is triggered, it calls [the top command](https://docs.mongodb.com/master/reference/command/top) on the DataService and passes the list of hottest (i.e. most used, or **greatest system load**) to the `top-component`. The order of the list is calculated to be consistent with how the Cloud team and `mongotop` rank their hot collections.

The `restart` action clears the stored data in each of the chart stores and the `pause` action stops new data from being displayed but continues to collect data.

Expand Down Expand Up @@ -69,13 +69,13 @@ _SYSTEM LOAD_ = (_T<sub>delta</sub>_ * 100) / (_P_* _N_)

## Slow Operations

The `current-op-store` listens to the `pollCurrentOp`, `pause`, and `restart` actions. When `pollCurrentOp` is triggered, it calls `currentOp` on the DataService and passes the list of active slowest operations to the `current-op-component`.
The `current-op-store` listens to the `pollCurrentOp`, `pause`, and `restart` actions. When `pollCurrentOp` is triggered, it calls [the currentOp command](https://docs.mongodb.com/manual/reference/method/db.currentOp) on the DataService and passes the list of active slowest operations to the `current-op-component`.

The `restart` action clears the stored data in each of the chart stores and the `pause` action stops new data from being displayed but continues to collect data.

## DB Errors

If any of `server-stats-graphs-store`, `top-store`, or `current-op-store` receive an error from the DataService, they will trigger the `dbError` action. The `dberror-store` listens for errors and passes any new errors to the `dberror-component` which will display a red banner with an interpretation of the error received. The raw errors are transformed from MongoErrors to more human-readable and helpful error messages with `mongodb-js-errors.translate`. If an error goes away, i.e. dbError is triggered and the error is now null, then the banner will be removed. If the d3 charts receive data with a non-null error they will not draw the charts and instead display "DATA UNAVAILABLE".
If any of `server-stats-graphs-store`, `top-store`, or `current-op-store` receive an error from the DataService, they will trigger the `dbError` action. The `dberror-store` listens for errors and passes any new errors to the `dberror-component` which will display a red banner with an interpretation of the error received. The raw errors are transformed from MongoErrors to more human-readable and helpful error messages with [mongodb-js-errors.translate](https://github.com/mongodb-js/errors/blob/master/index.js). If an error goes away, i.e. dbError is triggered and the error is now null, then the banner will be removed. If the d3 charts receive data with a non-null error they will not draw the charts and instead display "DATA UNAVAILABLE".


| Key | Description |
Expand Down

0 comments on commit 983b64d

Please sign in to comment.