Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optionally submit testdata via pDNS channel #92

Merged
merged 3 commits into from
Dec 8, 2021
Merged

optionally submit testdata via pDNS channel #92

merged 3 commits into from
Dec 8, 2021

Conversation

satta
Copy link
Member

@satta satta commented Dec 7, 2021

This PR introduces a feature configurable via the new test-domain config entry in the pdns section:

# Configuration for passive DNS submission.
pdns:
  enable: true
  submission-url: amqp://guest:guest@localhost:5672/
  submission-exchange: pdns
  # If test-domain is non-empty, add an extra `A` observation for this rrname to
  # all submissions
  test-domain: heartbeat.fever-heartbeat

which will cause an additional observation to be included with dummy data to each submission:

{
  "timestamp_start": "2021-12-07T18:18:00.029197078Z",
  "timestamp_end": "2021-12-07T18:19:00.063460044Z",
  "dns": {
    "heartbeat.fever-heartbeat": {
      "rdata": [
        {
          "answering_host": "0.0.0.0",
          "rrtype": "A",
          "rdata": "0.0.0.0",
          "rcode": "NOERROR",
          "count": 1
        }
      ]
    },
...
  }
}

This can, for example, be used as a known present observation to implement in-band end-to-end monitoring in a production pipeline.

This fixes the test for PreprocessAddedFields() not to be dependent
on nondeterministic map traversals.
@satta satta requested a review from 0mbi December 7, 2021 22:20
@satta satta added the enhancement New feature or request label Dec 7, 2021
Copy link
Contributor

@0mbi 0mbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't forget to update README.md (if necessary).
I think this would fit in the testing section.

And ofc squash the commits.

Besides that, looks fine for me.

@satta
Copy link
Member Author

satta commented Dec 8, 2021

Done, thanks for taking a look

@satta satta merged commit 3649f0f into master Dec 8, 2021
@satta satta deleted the pdns-testdata branch December 8, 2021 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants