effectivelywild.technitium_dns.technitium_dns_query_logs module – Query logs from a specified DNS app on Technitium DNS server
Note
This module is part of the effectivelywild.technitium_dns collection (version 0.9.1).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install effectivelywild.technitium_dns.
To use it in a playbook, specify: effectivelywild.technitium_dns.technitium_dns_query_logs.
New in effectivelywild.technitium_dns 0.9.0
Synopsis
Query logs from a specified DNS app with optional filtering.
Supports pagination and filtering by various criteria.
Parameters
Parameter |
Comments |
|---|---|
Port for the Technitium DNS API. Defaults to 5380 Default: |
|
API token for authenticating with the Technitium DNS API |
|
Base URL for the Technitium DNS API |
|
The class path of the DNS app |
|
The client IP address to filter the logs |
|
Orders the selected data set in descending order Choices:
|
|
The end date time in ISO 8601 format to filter the logs |
|
The number of entries per page |
|
The name of the installed DNS app |
|
The page number of the data set to retrieve |
|
The DNS transport protocol to filter the logs Choices:
|
|
The DNS class (QCLASS) in the request question section to filter the logs |
|
The query name (QNAME) in the request question section to filter the logs |
|
The DNS resource record type (QTYPE) in the request question section to filter the logs |
|
The DNS response code to filter the logs |
|
The DNS server response type to filter the logs Choices:
|
|
The start date time in ISO 8601 format to filter the logs |
|
Whether to validate SSL certificates when making API requests. Choices:
|
See Also
See also
- effectivelywild.technitium_dns.technitium_dns_list_logs
List all log files
- effectivelywild.technitium_dns.technitium_dns_delete_log
Delete a specific log file
Examples
- name: Query logs from a DNS app
technitium_dns_query_logs:
api_url: "http://localhost"
api_token: "myapitoken"
name: "Query Logger"
class_path: "QueryLogger.App"
register: result
- debug:
var: result.entries
- name: Query logs with filters
technitium_dns_query_logs:
api_url: "http://localhost"
api_token: "myapitoken"
name: "Query Logger"
class_path: "QueryLogger.App"
page_number: 1
entries_per_page: 50
descending_order: true
response_type: "Blocked"
qname: "example.com"
register: blocked_queries
- name: Query logs for a specific time range
technitium_dns_query_logs:
api_url: "http://localhost"
api_token: "myapitoken"
name: "Query Logger"
class_path: "QueryLogger.App"
start: "2021-09-10 00:00:00"
end: "2021-09-11 23:59:59"
protocol: "Udp"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Whether the module made changes (always false for query operations) Returned: always Sample: |
|
List of log entries Returned: always |
|
DNS answer Returned: always Sample: |
|
Client IP address Returned: always Sample: |
|
DNS transport protocol Returned: always Sample: |
|
Query class Returned: always Sample: |
|
Query name Returned: always Sample: |
|
Query type Returned: always Sample: |
|
DNS response code Returned: always Sample: |
|
Response round-trip time in milliseconds (for recursive queries) Returned: when available Sample: |
|
DNS server response type Returned: always Sample: |
|
Row number of the entry Returned: always Sample: |
|
Timestamp of the query Returned: always Sample: |
|
Whether the module failed Returned: always Sample: |
|
Current page number Returned: always Sample: |
|
Total number of entries Returned: always Sample: |
|
Total number of pages Returned: always Sample: |