summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJesper Jensen <jesper@jnsn.dev>2025-07-03 19:11:11 +0200
committerJesper Jensen <jesper@jnsn.dev>2025-07-03 19:11:11 +0200
commit75e3fd649bf4baae66a7415634fe999c726ba149 (patch)
tree8bff69c69ebdc92f9fefdfb7a95b83c680de7889 /src/main.c
parent570181d2004e1d07a8a4e946f352d619a5f8895f (diff)
Add metric for lookup state
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 0f81440..3d749ab 100644
--- a/src/main.c
+++ b/src/main.c
@@ -180,6 +180,7 @@ int main(int argc, char** argv) {
// Init the lookup
dht.lookup.target = (struct nodeid){.inner={0x19b8a941, 0x38fa0191, 0x1403fac2, 0x581000ab, 0x19583cda}};
dht.lookup.state = OP_PENDING; // We want this to run at some point.
+ prom_gauge_set(lookup_state, dht.lookup.state, NULL);
#define RECV_BUFF_SIZE 4096
char buff_storage[RECV_BUFF_SIZE+1];
@@ -251,6 +252,7 @@ int main(int argc, char** argv) {
lookup_refresh = 0;
// Restart the lookup periodically
dht.lookup.state = OP_PENDING;
+ prom_gauge_set(lookup_state, dht.lookup.state, NULL);
}
}