effectivelywild.technitium_dns.technitium_dns_get_stats module – Get DNS statistics from server dashboard
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_get_stats.
New in effectivelywild.technitium_dns 0.8.0
Synopsis
Retrieve DNS statistics displayed on the server dashboard.
Returns aggregate stats, chart data, and top lists for clients, domains, and blocked domains.
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 |
|
End date in ISO 8601 format. Only applies to ‘Custom’ type. |
|
Start date in ISO 8601 format. Only applies to ‘Custom’ type. |
|
The duration type for statistics. Choices:
|
|
Set to true to return chart data with labels in UTC format. Choices:
|
|
Whether to validate SSL certificates when making API requests. Choices:
|
See Also
See also
- effectivelywild.technitium_dns.technitium_dns_get_top_stats
Get top statistics for specific stats type
- effectivelywild.technitium_dns.technitium_dns_delete_all_stats
Delete all statistics from the server
Examples
- name: Get last hour statistics
technitium_dns_get_stats:
api_url: "http://localhost"
api_token: "myapitoken"
register: result
- name: Get last day statistics in UTC
technitium_dns_get_stats:
api_url: "http://localhost"
api_token: "myapitoken"
type: "LastDay"
utc: true
register: result
- name: Get custom date range statistics
technitium_dns_get_stats:
api_url: "http://localhost"
api_token: "myapitoken"
type: "Custom"
start: "2024-01-01T00:00:00Z"
end: "2024-01-31T23:59:59Z"
register: result
- debug:
var: result.stats
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 get operations) Returned: always Sample: |
|
Whether the module failed Returned: always Sample: |
|
Main chart data with time series Returned: always |
|
Chart datasets for different metrics Returned: always |
|
Format for time labels Returned: always Sample: |
|
Array of timestamp labels Returned: always |
|
Protocol type distribution chart data Returned: always |
|
Protocol count datasets Returned: always |
|
Protocol labels (UDP, TCP, etc.) Returned: always |
|
Query response type distribution chart data Returned: always |
|
Response count datasets Returned: always |
|
Response type labels Returned: always |
|
Query type distribution chart data Returned: always |
|
Query count datasets Returned: always |
|
Query type labels (A, AAAA, HTTPS, etc.) Returned: always |
|
Aggregate DNS statistics Returned: always |
|
Total allowed zones Returned: always Sample: |
|
Total allow list zones Returned: always Sample: |
|
Total blocked zones Returned: always Sample: |
|
Total block list zones Returned: always Sample: |
|
Total cached entries Returned: always Sample: |
|
Total authoritative responses Returned: always Sample: |
|
Total blocked queries Returned: always Sample: |
|
Total cached responses Returned: always Sample: |
|
Total unique clients Returned: always Sample: |
|
Total dropped queries Returned: always Sample: |
|
Total successful queries Returned: always Sample: |
|
Total non-existent domain responses Returned: always Sample: |
|
Total number of queries Returned: always Sample: |
|
Total recursive queries Returned: always Sample: |
|
Total refused queries Returned: always Sample: |
|
Total server failure responses Returned: always Sample: |
|
Total number of zones Returned: always Sample: |
|
List of most blocked domains Returned: always |
|
Number of blocked queries for this domain Returned: always Sample: |
|
Blocked domain name Returned: always Sample: |
|
List of top DNS clients Returned: always |
|
Client hostname (if resolved) Returned: always Sample: |
|
Number of queries from this client Returned: always Sample: |
|
Client IP address Returned: always Sample: |
|
Whether client is rate limited Returned: always Sample: |
|
List of most queried domains Returned: always |
|
Number of queries for this domain Returned: always Sample: |
|
Domain name Returned: always Sample: |