forked from prometheus-net/docker_exporter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerTrackerMetrics.cs
31 lines (26 loc) · 1.4 KB
/
DockerTrackerMetrics.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Prometheus;
namespace DockerExporter
{
sealed class DockerTrackerMetrics
{
public static readonly Gauge ContainerCount = Metrics
.CreateGauge("docker_containers", "Number of containers that exist.");
public static readonly Counter ListContainersErrorCount = Metrics
.CreateCounter("docker_probe_list_containers_failed_total", "How many times the attempt to list all containers has failed.");
public static readonly Histogram ProbeDuration = Metrics
.CreateHistogram("docker_probe_duration_seconds", "How long it takes to query Docker for the complete data set. Includes failed requests.", new HistogramConfiguration
{
Buckets = Constants.DurationBuckets
});
public static readonly Histogram ListContainersDuration = Metrics
.CreateHistogram("docker_probe_list_containers_duration_seconds", "How long it takes to query Docker for the list of containers. Includes failed requests.", new HistogramConfiguration
{
Buckets = Constants.DurationBuckets
});
public static readonly Gauge SuccessfulProbeTime = Metrics
.CreateGauge("docker_probe_successfully_completed_time", "When the last Docker probe was successfully completed.", new GaugeConfiguration
{
SuppressInitialValue = true
});
}
}