summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/forward.c2
-rw-r--r--src/metrics.c1
-rw-r--r--src/metrics.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/forward.c b/src/forward.c
index 4e127ba..49a0bbc 100644
--- a/src/forward.c
+++ b/src/forward.c
@@ -2790,6 +2790,7 @@ static struct frec *get_new_frec(time_t now, struct server *master, int force)
{
if (difftime(now, f->time) >= 4*TIMEOUT)
{
+ daemon->metrics[METRIC_DNS_UNANSWERED_QUERY]++;
free_frec(f);
target = f;
}
@@ -2811,6 +2812,7 @@ static struct frec *get_new_frec(time_t now, struct server *master, int force)
if (!target && oldest && ((int)difftime(now, oldest->time)) >= TIMEOUT)
{
/* can't find empty one, use oldest if there is one and it's older than timeout */
+ daemon->metrics[METRIC_DNS_UNANSWERED_QUERY]++;
free_frec(oldest);
target = oldest;
}
diff --git a/src/metrics.c b/src/metrics.c
index eeea074..68fe7c6 100644
--- a/src/metrics.c
+++ b/src/metrics.c
@@ -23,6 +23,7 @@ const char * metric_names[] = {
"dns_auth_answered",
"dns_local_answered",
"dns_stale_answered",
+ "dns_unanswered",
"bootp",
"pxe",
"dhcp_ack",
diff --git a/src/metrics.h b/src/metrics.h
index f7c817b..bc91adf 100644
--- a/src/metrics.h
+++ b/src/metrics.h
@@ -22,6 +22,7 @@ enum {
METRIC_DNS_AUTH_ANSWERED,
METRIC_DNS_LOCAL_ANSWERED,
METRIC_DNS_STALE_ANSWERED,
+ METRIC_DNS_UNANSWERED_QUERY,
METRIC_BOOTP,
METRIC_PXE,
METRIC_DHCPACK,