dns_query module shows response as a 0 rather than 1

Just a quick one: I’ve setup the DNS latency collector as per:

The chart for latency looks OK but the one for query status shows all as returning a value of ‘0’. This seems count-intuitive to me; is there any good reason why it’s a 0 instead of a 1? :slight_smile:

Hi, @Luis_Johnstone. The query_status chart has 3 dimensions: success, network_error, dns_error.

  • Each of them represents a state.
  • The values can be 0 or 1.
  • 0 means not in the state.
  • 1 means in the state.
  • Only one of them can be 1 (active) at a time (read as “the current state is …”).

Ah, I see; it’s because you need any of the other 3 dimensions of the chart to also be able to be a 1 to indicate a problem (e.g. it wouldn’t make sense if network_error = 1 meant everything was OK). I figured that it was something like that. Thanks!!

It is like this @Luis_Johnstonebecause because aggregation over time is meaningful.

For instance, you get an average value for every state for the last 30 minutes and they are:

  • success: 0.7
  • network_error: 0.2
  • dns_error: 0.1

This means that in the last 30 minutes, the percentage of successful requests is 70%, and so on.