-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a new pihole entity definition (#102)
- Loading branch information
Showing
4 changed files
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
{ | ||
"dashboard": { | ||
"title": "PiHole", | ||
"widgets": [ | ||
{ | ||
"title": "Total DNS requests", | ||
"nrql": "FROM Metric SELECT latest(pihole_dns_queries_today) as 'Total DNS requests'", | ||
"process_as": "billboard", | ||
"width": 3, | ||
"height": 2, | ||
"row": 1, | ||
"column": 1, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": { "thresholds": {} }, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Blocked DNS requests", | ||
"nrql": "FROM Metric SELECT latest(pihole_ads_blocked_today) as 'Blocked DNS requests'", | ||
"process_as": "billboard", | ||
"width": 3, | ||
"height": 2, | ||
"row": 1, | ||
"column": 4, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": { "thresholds": {} }, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "% blocked requests", | ||
"nrql": "FROM Metric SELECT latest(pihole_ads_percentage_today) as '% blocked requests'", | ||
"process_as": "billboard", | ||
"width": 3, | ||
"height": 2, | ||
"row": 1, | ||
"column": 7, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": { "thresholds": {} }, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Domains on blocklist", | ||
"nrql": "FROM Metric SELECT latest(pihole_domains_being_blocked) as 'Domains on blocklist'", | ||
"process_as": "billboard", | ||
"width": 3, | ||
"height": 2, | ||
"row": 1, | ||
"column": 10, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": { "thresholds": {} }, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "DNS requests", | ||
"nrql": "FROM Metric SELECT ifthen( (earliest(pihole_dns_queries_today) - latest(pihole_dns_queries_today)) <= 0 , latest(pihole_dns_queries_today) - earliest(pihole_dns_queries_today) ) as 'DNS requests' timeseries", | ||
"process_as": "line_chart", | ||
"width": 3, | ||
"height": 3, | ||
"row": 3, | ||
"column": 1, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": { "thresholds": {} }, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Requests blocked", | ||
"nrql": "FROM Metric SELECT ifthen( (earliest(pihole_ads_blocked_today) - latest(pihole_ads_blocked_today)) <= 0 , latest(pihole_ads_blocked_today) - earliest(pihole_ads_blocked_today) ) as 'Requests blocked' timeseries", | ||
"process_as": "line_chart", | ||
"width": 3, | ||
"height": 3, | ||
"row": 3, | ||
"column": 4, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": { "thresholds": {} }, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Requests forwarded", | ||
"nrql": "FROM Metric SELECT ifthen( (earliest(pihole_queries_forwarded) - latest(pihole_queries_forwarded)) <= 0 , latest(pihole_queries_forwarded) - earliest(pihole_queries_forwarded) ) as 'Requests forwarded' timeseries", | ||
"process_as": "line_chart", | ||
"width": 3, | ||
"height": 3, | ||
"row": 3, | ||
"column": 7, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": { "thresholds": {} }, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Requests cached", | ||
"nrql": "FROM Metric SELECT ifthen( (earliest(pihole_queries_cached) - latest(pihole_queries_cached)) <= 0 , latest(pihole_queries_cached) - earliest(pihole_queries_cached) ) as 'Requests cached' timeseries", | ||
"process_as": "line_chart", | ||
"width": 3, | ||
"height": 3, | ||
"row": 3, | ||
"column": 10, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": { "thresholds": {} }, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Cumulative DNS requests", | ||
"nrql": "FROM Metric SELECT latest(pihole_dns_queries_today) as 'Cumulative DNS requests' TIMESERIES", | ||
"process_as": "line_chart", | ||
"width": 3, | ||
"height": 3, | ||
"row": 6, | ||
"column": 1, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": null, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Cumulative requests blocked", | ||
"nrql": "FROM Metric SELECT latest(pihole_ads_blocked_today) as 'Cumulative requests blocked' TIMESERIES", | ||
"process_as": "line_chart", | ||
"width": 3, | ||
"height": 3, | ||
"row": 6, | ||
"column": 4, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": null, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Cumulative requests forwarded", | ||
"nrql": "FROM Metric SELECT latest(pihole_queries_forwarded) as 'Cumulative requests forwarded' TIMESERIES", | ||
"process_as": "line_chart", | ||
"width": 3, | ||
"height": 3, | ||
"row": 6, | ||
"column": 7, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": null, | ||
"notes": null | ||
}, | ||
{ | ||
"title": "Cumulative requests cached", | ||
"nrql": "FROM Metric SELECT latest(pihole_queries_cached) as 'Cumulative requests cached' TIMESERIES", | ||
"process_as": "line_chart", | ||
"width": 3, | ||
"height": 3, | ||
"row": 6, | ||
"column": 10, | ||
"event_types": null, | ||
"facet": null, | ||
"customizations": null, | ||
"notes": null | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
domain: EXT | ||
type: PIHOLE | ||
|
||
synthesis: | ||
name: piHoleName | ||
identifier: piHoleName | ||
|
||
conditions: | ||
- attribute: metricName | ||
prefix: pihole_ | ||
dashboardTemplates: | ||
- dashboard.json | ||
|
||
compositeMetrics: | ||
goldenMetrics: | ||
- golden_metrics.yml | ||
summaryMetrics: | ||
- summary_metrics.yml | ||
|
||
configuration: | ||
entityExpirationTime: EIGHT_DAYS | ||
alertable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
totalQueries: | ||
title: Total queries | ||
query: | ||
select: latest(pi_hole_dns_queries_all_types) | ||
adsBlockedToday: | ||
title: Ads Blocked Today | ||
query: | ||
select: latest(pi_hole_ads_blocked_today) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
totalQueries: | ||
title: Total queries | ||
unit: COUNT | ||
query: | ||
select: latest(pi_hole_dns_queries_all_types) | ||
from: Metric | ||
eventId: entity.guid | ||
adsBlockedToday: | ||
title: Ads Blocked Today | ||
unit: COUNT | ||
query: | ||
select: latest(pi_hole_ads_blocked_today) | ||
from: Metric | ||
eventId: entity.guid |