blob: 4b905f35eabcc13bd4fbe087c221895e14fb21ca (
plain) (
blame)
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.admin.monitoring;
import com.google.common.collect.ImmutableSet;
import java.util.Set;
/**
* @author gjoranv
*/
public class NetworkMetrics {
public static final MetricSet networkMetricSet = createNetworkMetricSet();
private static MetricSet createNetworkMetricSet() {
Set<Metric> dockerNetworkMetrics =
ImmutableSet.of(new Metric("net.in.bytes"),
new Metric("net.in.errors"),
new Metric("net.in.dropped"),
new Metric("net.out.bytes"),
new Metric("net.out.errors"),
new Metric("net.out.dropped")
);
Set<Metric> networkMetrics = ImmutableSet.<Metric>builder()
.addAll(dockerNetworkMetrics)
.build();
return new MetricSet("network", networkMetrics);
}
}
|