Skip to content

Commit 5a182a7

Browse files
authored
Create a new pihole entity definition (#102)
1 parent 729dd36 commit 5a182a7

File tree

4 files changed

+207
-0
lines changed

4 files changed

+207
-0
lines changed
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
{
2+
"dashboard": {
3+
"title": "PiHole",
4+
"widgets": [
5+
{
6+
"title": "Total DNS requests",
7+
"nrql": "FROM Metric SELECT latest(pihole_dns_queries_today) as 'Total DNS requests'",
8+
"process_as": "billboard",
9+
"width": 3,
10+
"height": 2,
11+
"row": 1,
12+
"column": 1,
13+
"event_types": null,
14+
"facet": null,
15+
"customizations": { "thresholds": {} },
16+
"notes": null
17+
},
18+
{
19+
"title": "Blocked DNS requests",
20+
"nrql": "FROM Metric SELECT latest(pihole_ads_blocked_today) as 'Blocked DNS requests'",
21+
"process_as": "billboard",
22+
"width": 3,
23+
"height": 2,
24+
"row": 1,
25+
"column": 4,
26+
"event_types": null,
27+
"facet": null,
28+
"customizations": { "thresholds": {} },
29+
"notes": null
30+
},
31+
{
32+
"title": "% blocked requests",
33+
"nrql": "FROM Metric SELECT latest(pihole_ads_percentage_today) as '% blocked requests'",
34+
"process_as": "billboard",
35+
"width": 3,
36+
"height": 2,
37+
"row": 1,
38+
"column": 7,
39+
"event_types": null,
40+
"facet": null,
41+
"customizations": { "thresholds": {} },
42+
"notes": null
43+
},
44+
{
45+
"title": "Domains on blocklist",
46+
"nrql": "FROM Metric SELECT latest(pihole_domains_being_blocked) as 'Domains on blocklist'",
47+
"process_as": "billboard",
48+
"width": 3,
49+
"height": 2,
50+
"row": 1,
51+
"column": 10,
52+
"event_types": null,
53+
"facet": null,
54+
"customizations": { "thresholds": {} },
55+
"notes": null
56+
},
57+
{
58+
"title": "DNS requests",
59+
"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",
60+
"process_as": "line_chart",
61+
"width": 3,
62+
"height": 3,
63+
"row": 3,
64+
"column": 1,
65+
"event_types": null,
66+
"facet": null,
67+
"customizations": { "thresholds": {} },
68+
"notes": null
69+
},
70+
{
71+
"title": "Requests blocked",
72+
"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",
73+
"process_as": "line_chart",
74+
"width": 3,
75+
"height": 3,
76+
"row": 3,
77+
"column": 4,
78+
"event_types": null,
79+
"facet": null,
80+
"customizations": { "thresholds": {} },
81+
"notes": null
82+
},
83+
{
84+
"title": "Requests forwarded",
85+
"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",
86+
"process_as": "line_chart",
87+
"width": 3,
88+
"height": 3,
89+
"row": 3,
90+
"column": 7,
91+
"event_types": null,
92+
"facet": null,
93+
"customizations": { "thresholds": {} },
94+
"notes": null
95+
},
96+
{
97+
"title": "Requests cached",
98+
"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",
99+
"process_as": "line_chart",
100+
"width": 3,
101+
"height": 3,
102+
"row": 3,
103+
"column": 10,
104+
"event_types": null,
105+
"facet": null,
106+
"customizations": { "thresholds": {} },
107+
"notes": null
108+
},
109+
{
110+
"title": "Cumulative DNS requests",
111+
"nrql": "FROM Metric SELECT latest(pihole_dns_queries_today) as 'Cumulative DNS requests' TIMESERIES",
112+
"process_as": "line_chart",
113+
"width": 3,
114+
"height": 3,
115+
"row": 6,
116+
"column": 1,
117+
"event_types": null,
118+
"facet": null,
119+
"customizations": null,
120+
"notes": null
121+
},
122+
{
123+
"title": "Cumulative requests blocked",
124+
"nrql": "FROM Metric SELECT latest(pihole_ads_blocked_today) as 'Cumulative requests blocked' TIMESERIES",
125+
"process_as": "line_chart",
126+
"width": 3,
127+
"height": 3,
128+
"row": 6,
129+
"column": 4,
130+
"event_types": null,
131+
"facet": null,
132+
"customizations": null,
133+
"notes": null
134+
},
135+
{
136+
"title": "Cumulative requests forwarded",
137+
"nrql": "FROM Metric SELECT latest(pihole_queries_forwarded) as 'Cumulative requests forwarded' TIMESERIES",
138+
"process_as": "line_chart",
139+
"width": 3,
140+
"height": 3,
141+
"row": 6,
142+
"column": 7,
143+
"event_types": null,
144+
"facet": null,
145+
"customizations": null,
146+
"notes": null
147+
},
148+
{
149+
"title": "Cumulative requests cached",
150+
"nrql": "FROM Metric SELECT latest(pihole_queries_cached) as 'Cumulative requests cached' TIMESERIES",
151+
"process_as": "line_chart",
152+
"width": 3,
153+
"height": 3,
154+
"row": 6,
155+
"column": 10,
156+
"event_types": null,
157+
"facet": null,
158+
"customizations": null,
159+
"notes": null
160+
}
161+
]
162+
}
163+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
domain: EXT
2+
type: PIHOLE
3+
4+
synthesis:
5+
name: piHoleName
6+
identifier: piHoleName
7+
8+
conditions:
9+
- attribute: metricName
10+
prefix: pihole_
11+
dashboardTemplates:
12+
- dashboard.json
13+
14+
compositeMetrics:
15+
goldenMetrics:
16+
- golden_metrics.yml
17+
summaryMetrics:
18+
- summary_metrics.yml
19+
20+
configuration:
21+
entityExpirationTime: EIGHT_DAYS
22+
alertable: true
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
totalQueries:
2+
title: Total queries
3+
query:
4+
select: latest(pi_hole_dns_queries_all_types)
5+
adsBlockedToday:
6+
title: Ads Blocked Today
7+
query:
8+
select: latest(pi_hole_ads_blocked_today)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
totalQueries:
2+
title: Total queries
3+
unit: COUNT
4+
query:
5+
select: latest(pi_hole_dns_queries_all_types)
6+
from: Metric
7+
eventId: entity.guid
8+
adsBlockedToday:
9+
title: Ads Blocked Today
10+
unit: COUNT
11+
query:
12+
select: latest(pi_hole_ads_blocked_today)
13+
from: Metric
14+
eventId: entity.guid

0 commit comments

Comments
 (0)