Skip to content

Conversation

@bebehei
Copy link
Contributor

@bebehei bebehei commented Jan 8, 2026

This adds conditional support to output JSON in the mod-probe support portal. Condition --json as the argument.

Makes it much easier to convert this as a e.g. elasticsearch ingest or similar for observability.

Since the official gitlab.nic.cz is closed and it seems, contributions are accepted here, too, I've chosen a GitHub PR.

@salzmdan
Copy link
Member

salzmdan commented Jan 8, 2026

Thanks! We will check soon.

@Dook97
Copy link
Member

Dook97 commented Jan 13, 2026

Hi @bebehei and thanks a lot for your contribution!

Your code is good, so we've adopted it with only minor changes. Could you take a look and tell us whether the end result is fine with you? We'll merge once you give your OK.

FYI: This Github repo is just a mirror of our Gitlab. If you'd like to contribute more in the future, we'd be happy to create an account for you there.

@bebehei
Copy link
Contributor Author

bebehei commented Jan 13, 2026

As far as I can see, you changed the print logic, especially just the flush=True.

Without verfying further: This should not be necessary, since print also spits out a newline and python is line buffered on stdout anyways. Forced flushes improve latency, but limit throughput. I don't see what you're trying to optimize for. But, you do you.

My main goal was to contribute back the JSON logic. Others can be faster now to start ingesting their DNS queries into elasticsearch/whatever.

Props for keeping up the commit in original form!

--

If I will do other commits, I'll ask for account on your GitLab.

Thanks!

@salzmdan
Copy link
Member

Merged as https://gitlab.nic.cz/knot/knot-dns/-/commit/1729a53709214a28b218e00b7a04bfa33042ccd2.

@salzmdan salzmdan closed this Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants