summaryrefslogtreecommitdiffstats
path: root/metrics
diff options
context:
space:
mode:
authoryngveaasheim <yngve@yahooinc.com>2023-07-31 14:10:38 +0200
committeryngveaasheim <yngve@yahooinc.com>2023-07-31 14:10:38 +0200
commit5ab417895e48ba4b45d624e899a80e866d25a442 (patch)
treec3a8ab132a80650419ff4d0ff004ffd2654f929b /metrics
parentd6a8c56d1816d8e6c793c9dc3e2e527fad09e27c (diff)
Document and add some more infrastructure metrics
Diffstat (limited to 'metrics')
-rw-r--r--metrics/src/main/java/ai/vespa/metrics/ConfigServerMetrics.java12
-rw-r--r--metrics/src/main/java/ai/vespa/metrics/ControllerMetrics.java11
-rw-r--r--metrics/src/main/java/ai/vespa/metrics/Unit.java2
3 files changed, 24 insertions, 1 deletions
diff --git a/metrics/src/main/java/ai/vespa/metrics/ConfigServerMetrics.java b/metrics/src/main/java/ai/vespa/metrics/ConfigServerMetrics.java
index a277f6b4dda..ca028547171 100644
--- a/metrics/src/main/java/ai/vespa/metrics/ConfigServerMetrics.java
+++ b/metrics/src/main/java/ai/vespa/metrics/ConfigServerMetrics.java
@@ -112,6 +112,7 @@ public enum ConfigServerMetrics implements VespaMetrics {
HOSTED_VESPA_DOCKER_ALLOCATED_CAPACITY_DISK("hostedVespa.docker.allocatedCapacityDisk", Unit.GIGABYTE, "Total amount of allocated disk space on tenant hosts managed by hosted Vespa in a zone"),
HOSTED_VESPA_PENDING_REDEPLOYMENTS("hostedVespa.pendingRedeployments", Unit.TASK, "The number of hosted Vespa re-deployments pending"),
HOSTED_VESPA_DOCKER_SKEW("hostedVespa.docker.skew", Unit.FRACTION, "A number in the range 0..1 indicating how well allocated resources are balanced with availability on hosts"),
+
HOSTED_VESPA_ACTIVE_HOSTS("hostedVespa.activeHosts", Unit.HOST, "The number of managed hosts that are in state \"active\""),
HOSTED_VESPA_BREAKFIXED_HOSTS("hostedVespa.breakfixedHosts", Unit.HOST, "The number of managed hosts that are in state \"breakfixed\""),
HOSTED_VESPA_DEPROVISIONED_HOSTS("hostedVespa.deprovisionedHosts", Unit.HOST, "The number of managed hosts that are in state \"deprovisioned\""),
@@ -123,6 +124,17 @@ public enum ConfigServerMetrics implements VespaMetrics {
HOSTED_VESPA_READY_HOSTS("hostedVespa.readyHosts", Unit.HOST, "The number of managed hosts that are in state \"ready\""),
HOSTED_VESPA_RESERVED_HOSTS("hostedVespa.reservedHosts", Unit.HOST, "The number of managed hosts that are in state \"reserved\""),
+ HOSTED_VESPA_ACTIVE_NODES("hostedVespa.activeNodes", Unit.HOST, "The number of managed nodes that are in state \"active\""),
+ HOSTED_VESPA_BREAKFIXED_NODES("hostedVespa.breakfixedNodes", Unit.HOST, "The number of managed nodes that are in state \"breakfixed\""),
+ HOSTED_VESPA_DEPROVISIONED_NODES("hostedVespa.deprovisionedNodes", Unit.HOST, "The number of managed nodes that are in state \"deprovisioned\""),
+ HOSTED_VESPA_DIRTY_NODES("hostedVespa.dirtyNodes", Unit.HOST, "The number of managed nodes that are in state \"dirty\""),
+ HOSTED_VESPA_FAILED_NODES("hostedVespa.failedNodes", Unit.HOST, "The number of managed nodes that are in state \"failed\""),
+ HOSTED_VESPA_INACTIVE_NODES("hostedVespa.inactiveNodes", Unit.HOST, "The number of managed nodes that are in state \"inactive\""),
+ HOSTED_VESPA_PARKED_NODES("hostedVespa.parkedNodes", Unit.HOST, "The number of managed nodes that are in state \"parked\""),
+ HOSTED_VESPA_PROVISIONED_NODES("hostedVespa.provisionedNodes", Unit.HOST, "The number of managed nodes that are in state \"provisioned\""),
+ HOSTED_VESPA_READY_NODES("hostedVespa.readyNodes", Unit.HOST, "The number of managed nodes that are in state \"ready\""),
+ HOSTED_VESPA_RESERVED_NODES("hostedVespa.reservedNodes", Unit.HOST, "The number of managed nodes that are in state \"reserved\""),
+
OVERCOMMITTED_HOSTS("overcommittedHosts", Unit.HOST, "The number of hosts with over-committed resources"),
SPARE_HOST_CAPACITY("spareHostCapacity", Unit.HOST, "The number of spare hosts"),
diff --git a/metrics/src/main/java/ai/vespa/metrics/ControllerMetrics.java b/metrics/src/main/java/ai/vespa/metrics/ControllerMetrics.java
index aa2ebd62284..01146adb8f0 100644
--- a/metrics/src/main/java/ai/vespa/metrics/ControllerMetrics.java
+++ b/metrics/src/main/java/ai/vespa/metrics/ControllerMetrics.java
@@ -46,7 +46,16 @@ public enum ControllerMetrics implements VespaMetrics {
OPERATION_FLAGS("operation.flags", Unit.REQUEST, "Controller: Requests for /flags API"),
OPERATION_OS("operation.os", Unit.REQUEST, "Controller: Requests for /os API"),
OPERATION_ROUTING("operation.routing", Unit.REQUEST, "Controller: Requests for /routing API"),
- OPERATION_ZONE("operation.zone", Unit.REQUEST, "Controller: Requests for /zone API");
+ OPERATION_ZONE("operation.zone", Unit.REQUEST, "Controller: Requests for /zone API"),
+
+ // Metering metrics - not used - TODO: remove from controller code.
+ METERING_AGE_SECONDS("metering.age.seconds", Unit.SECOND, "Controller: Metering age seconds"),
+ METERING_COST_HOURLY("metering.cost.hourly", Unit.DOLLAR_PER_HOUR, "Controller: Metering cost hourly"),
+ METERING_DISK_GB("metering.diskGB", Unit.GIGABYTE, "Controller: Metering disk GB"),
+ METERING_MEMORY_GB("metering.memoryGB", Unit.GIGABYTE, "Controller: Metering memory GB"),
+ METERING_VCPU("metering.vcpu", Unit.VCPU, "Controller: Metering VCPU"),
+ METERING_LAST_REPORTED("metering_last_reported", Unit.SECONDS_SINCE_EPOCH, "Controller: Metering last reported"),
+ METERING_TOTAL_REPORTED("metering_total_reported", Unit.ITEM, "Controller: Metering total reported (sum of resources)");
private final String name;
diff --git a/metrics/src/main/java/ai/vespa/metrics/Unit.java b/metrics/src/main/java/ai/vespa/metrics/Unit.java
index 3a438efde06..48b4e72891f 100644
--- a/metrics/src/main/java/ai/vespa/metrics/Unit.java
+++ b/metrics/src/main/java/ai/vespa/metrics/Unit.java
@@ -40,6 +40,7 @@ public enum Unit {
ROTATION(BaseUnit.ROTATION, "Routing rotation"),
SCORE(BaseUnit.SCORE, "Relevance score for a document"),
SECOND(BaseUnit.SECOND, "Time span of 1 second"),
+ SECONDS_SINCE_EPOCH(BaseUnit.SECONDS_SINCE_EPOCH,"Seconds since Unix Epoch"),
SESSION(BaseUnit.SESSION, "A set of operations taking place during one connection or as part of a higher level operation"),
TASK(BaseUnit.TASK, "Piece of work executed by a server, e.g. to perform back-ground data maintenance"),
TENANT(BaseUnit.TENANT, "Tenant that owns zero or more applications in a managed Vespa system"),
@@ -115,6 +116,7 @@ public enum Unit {
ROTATION("routing rotation"),
SCORE("score"),
SECOND("second", "s"),
+ SECONDS_SINCE_EPOCH("seconds since epoch"),
SESSION("session"),
TASK("task"),
TENANT("tenant"),