Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Metrics

Endpoints

Get All Available Metrics

Get a list of all available metrics for the host. Each entity in the list will be a partial metric entity. No data is returned, but each entity contains a self link which you may follow to retrieve the full metric entity.

GET /api/public/v1.0/groups/GROUP-ID/hosts/HOST-ID/metrics

Get a Host Metric

Get the data points for the specified host and metric. If no additional query parameters are given, then the minute-level data for the past hour is returned.

GET /api/public/v1.0/groups/GROUP-ID/hosts/HOST-ID/metrics/METRIC-NAME

The METRIC-NAME may be any of the supported values listed for the metricName field, above. Note that if the provided metric is a database-level metric (ie, DB_LOCK_PERCENTAGE) or a hardware metric for a specific device (ie, its name begins with MUNIN_IOSTAT), then the response entity will contain a list of links to all available database (or hardware device) metrics. You may also provide additional query parameters:

  • granularity: The size of the epoch. Acceptable values are: MINUTE, HOUR, and DAY. The default is MINUTE.
  • period - The ISO-8601 formatted time period that specifies how far back in the past to query. For example, to request the last 36 hours of hour-level data, you must specify: granularity=HOUR&period=P1DT12H.

Get a Database Metric

Get the data points for the specified host, database metric, and database name. The only available database-level metric is DB_LOCK_PERCENTAGE.

GET /api/public/v1.0/groups/GROUP-ID/hosts/HOST-ID/metrics/DB-METRIC-NAME/DB-NAME

You may also provide additional query parameters:

  • granularity - The size of the epoch. Acceptable values are: MINUTE, HOUR, and DAY. The default is MINUTE.
  • period - The ISO-8601 formatted time period that specifies how far back in the past to query. For example, to request the last 36 hours of hour-level data, you must specify: granularity=HOUR&period=P1DT12H.

Get a Hardware Metric

Get the data points for the specified host, hardware metric, and device name. The device-specific hardware metrics include the supported values for the metricName field that begin with MUNIN_IOSTAT_.

GET /api/public/v1.0/groups/GROUP-ID/hosts/HOST-ID/metrics/HW-METRIC-NAME/DEVICE-NAME

You may also provide additional query parameters:

  • granularity - The size of the epoch. Acceptable values are: MINUTE, HOUR, and DAY. The default is MINUTE.
  • period - The ISO-8601 formatted time period that specifies how far back in the past to query. For example, to request the last 36 hours of hour-level data, you must specify: granularity=HOUR&period=P1DT12H.

Sample Entity

{
  "hostId": "680ab316473d6b28f966364b947134fc",
  "groupId": "2847387cd717dabc348a",
  "metricName" : "OPCOUNTERS_UPDATE",
  "units" : "RAW",
  "granularity" : "MINUTE",
  "dataPoints" : [ {
    "timestamp" : "2014-08-26T16:42:00Z",
    "value" : 10.3911
  }, {
    "timestamp" : "2014-08-26T16:43:00Z",
    "value" : 14.938
  }, {
    "timestamp" : "2014-08-26T16:44:00Z",
    "value" : 12.8882
  },
  ],
  "links" : [ ... ]
}

Entity Fields

Name Type Description
hostId string ID of the host to which this metric pertains.
groupId string ID of the group that owns this host.
metricName string

The name of the metric. Possible values are:

  • ASSERT_MSG
  • ASSERT_REGULAR
  • ASSERT_USER
  • ASSERT_WARNING
  • BACKGROUND_FLUSH_AVG
  • CACHE_ACTIVITY
  • CACHE_USAGE
  • COMPUTED_MEMORY
  • CONNECTIONS
  • CURSORS_TOTAL_CLIENT_CURSORS_SIZE
  • CURSORS_TOTAL_OPEN
  • CURSORS_TOTAL_TIMED_OUT
  • DB_DATA_SIZE_TOTAL
  • DB_LOCK_PERCENTAGE
  • DB_STORAGE_TOTAL
  • EFFECTIVE_LOCK_PERCENTAGE
  • EXTRA_INFO_PAGE_FAULTS
  • GLOBAL_ACCESSES_NOT_IN_MEMORY
  • GLOBAL_LOCK_CURRENT_QUEUE_READERS
  • GLOBAL_LOCK_CURRENT_QUEUE_TOTAL
  • GLOBAL_LOCK_CURRENT_QUEUE_WRITERS
  • GLOBAL_PAGE_FAULT_EXCEPTIONS_THROWN
  • INDEX_COUNTERS_BTREE_ACCESSES
  • INDEX_COUNTERS_BTREE_HITS
  • INDEX_COUNTERS_BTREE_MISSES
  • INDEX_COUNTERS_BTREE_MISS_RATIO
  • JOURNALING_COMMITS_IN_WRITE_LOCK
  • JOURNALING_MB
  • MEMORY_MAPPED
  • MEMORY_RESIDENT
  • MEMORY_VIRTUAL
  • MUNIN_CPU_IOWAIT
  • MUNIN_CPU_IRQ
  • MUNIN_CPU_NICE
  • MUNIN_CPU_SOFTIRQ
  • MUNIN_CPU_STEAL
  • MUNIN_CPU_SYSTEM
  • MUNIN_CPU_USER
  • MUNIN_IOSTAT_OP_READ
  • MUNIN_IOSTAT_OP_WRITE
  • MUNIN_IOSTAT_TIME_READ
  • MUNIN_IOSTAT_TIME_WRITE
  • NETWORK_BYTES_IN
  • NETWORK_BYTES_OUT
  • NETWORK_NUM_REQUESTS
  • OPCOUNTERS_CMD
  • OPCOUNTERS_DELETE
  • OPCOUNTERS_GETMORE
  • OPCOUNTERS_INSERT
  • OPCOUNTERS_QUERY
  • OPCOUNTERS_REPL_CMD
  • OPCOUNTERS_REPL_INSERT
  • OPCOUNTERS_REPL_UPDATE
  • OPCOUNTERS_REPL_DELETE
  • OPCOUNTERS_UPDATE
  • TICKETS_AVAILABLE
units string

The units in which the metric values are expressed. Possible values are:

  • RAW
  • BITS
  • BYTES
  • KILOBITS
  • KILOBYTES
  • MEGABITS
  • MEGABYTES
  • GIGABITS
  • GIGABYTES
  • TERABYTES
  • PETABYTES
  • MILLISECONDS
  • SECONDS
  • MINUTES
  • HOURS
  • DAYS
granularity string

The size of the epoch covered by each data point. Possible values are:

  • MINUTE
  • HOUR
  • DAY

MINUTE is the default.

deviceName string The name of the device. Only present for hardware (ie, Munin) metrics.
databaseName string The name of the database. Only present for database-level metrics.
dataPoints object array An array of objects, where each object represents a single metric data point. When there is no data point available for a particular epoch, then it will simply be missing from the array. For example, if you request minute-level data points for 1:30PM through 2:00PM, but Ops Manager does not have a 1:31PM sample, then: dataPoints[0].timestamp = ‘…T13:30:00Z’; dataPoints[1].timestamp = ‘…T13:32:00Z’; dataPoints[2].timestamp = ‘…T13:33:00Z’; etc.
dataPoints.$.timestamp date The timestamp of the beginning of the epoch represented by this data point.
dataPoints.$.value number The value of the data point.

Examples

Get All Available Metrics

curl -u "username:apiKey" --digest -i "https://cloud.mongodb.com/api/public/v1.0/groups/51b9361d5ae9048f0aab01f4/hosts/04cf770dc43c9ff21747ecf71ff9ee78/metrics"

HTTP/1.1 200 OK

{
  "totalCount" : 53,
  "results" : [ {
    "hostId" : "04cf770dc43c9ff21747ecf71ff9ee78",
    "groupId" : "51b9361d5ae9048f0aab01f4",
    "metricName" : "ASSERT_REGULAR",
    "units" : "RAW",
    "links" : [ {
      "rel" : "self",
      "href" : "https://cloud.mongodb.com/api/public/v1.0/groups/51b9361d5ae9048f0aab01f4/hosts/04cf770dc43c9ff21747ecf71ff9ee78/metrics/ASSERT_REGULAR"
    } ]
  }, {
    "hostId" : "04cf770dc43c9ff21747ecf71ff9ee78",
    "groupId" : "51b9361d5ae9048f0aab01f4",
    "metricName" : "ASSERT_WARNING",
    "units" : "RAW"
    "links" : [ {
      "rel" : "self",
      "href" : "https://cloud.mongodb.com/api/public/v1.0/groups/51b9361d5ae9048f0aab01f4/hosts/04cf770dc43c9ff21747ecf71ff9ee78/metrics/ASSERT_WARNING"
    } ]
  }, ...  ],
  "links" : [ ... ]
}

Get a Single Metric

The following example gets hour-level data for the past 12 hours.

curl -u "username:apiKey" --digest -i "https://cloud.mongodb.com/api/public/v1.0/groups/51b9361d5ae9048f0aab01f4/hosts/04cf770dc43c9ff21747ecf71ff9ee78/metrics/OPCOUNTERS_QUERY?granularity=HOUR&period=PT12H"

HTTP/1.1 200 OK

{
  "groupId" : "51b9361d5ae9048f0aab01f4",
  "hostId" : "04cf770dc43c9ff21747ecf71ff9ee78",
  "metricName" : "OPCOUNTERS_QUERY",
  "units" : "RAW",
  "granularity" : "MINUTE",
  "dataPoints" : [ {
    "timestamp" : "2014-08-29T14:00:00Z",
    "value" : 381.2
  }, {
    "timestamp" : "2014-08-29T15:00:00Z",
    "value" : 407.23
  }, {
    "timestamp" : "2014-08-29T16:00:00Z",
    "value" : 365.3124
  }, ... ],
  "links" : [ ... ]
}
←   Agents Clusters  →