How does the docker monitor probe gather metrics?
search cancel

How does the docker monitor probe gather metrics?

book

Article ID: 16835

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

How does the docker_monitor probe obtain and calculate metric data?

Environment

Release: UIM 8.x

Resolution

The docker probe uses an API call to gather system statistics, as follows:

http://((HOST):port/v1.21/containers/(container-id)/stats 

This returns a large number of statistics for the containers in question in the form of a JSON response which is parsed by the probe to gather the metrics.

Some metrics are derived, for example, there is no metric in the JSON response for "memory usage in percent", so we calculate it with a formula:

memUsagePercent = (memUsage / memLimit) * 100