| 1 | plugin_name: go.d.plugin |
| 2 | modules: |
| 3 | - meta: |
| 4 | id: collector-go.d.plugin-pihole |
| 5 | plugin_name: go.d.plugin |
| 6 | module_name: pihole |
| 7 | monitored_instance: |
| 8 | name: Pi-hole |
| 9 | link: https://pi-hole.net |
| 10 | icon_filename: pihole.png |
| 11 | categories: |
| 12 | - data-collection.networking |
| 13 | keywords: |
| 14 | - pihole |
| 15 | related_resources: |
| 16 | integrations: |
| 17 | list: [] |
| 18 | info_provided_to_referring_integrations: |
| 19 | description: "" |
| 20 | overview: |
| 21 | data_collection: |
| 22 | metrics_description: | |
| 23 | This collector monitors Pi-hole instances using [Pi-hole API 6.0](https://ftl.pi-hole.net/master/docs/). |
| 24 | |
| 25 | It collects DNS query statistics including total queries, blocked domains, query types, resolution status, and client information. |
| 26 | |
| 27 | **Note**: This collector is not compatible with Pi-hole versions earlier than v6.0. |
| 28 | method_description: "" |
| 29 | supported_platforms: |
| 30 | include: [] |
| 31 | exclude: [] |
| 32 | multi_instance: true |
| 33 | additional_permissions: |
| 34 | description: "" |
| 35 | default_behavior: |
| 36 | auto_detection: |
| 37 | description: | |
| 38 | By default, it detects Pi-hole instances running on: |
| 39 | |
| 40 | - localhost that are listening on port 80 |
| 41 | - within Docker containers |
| 42 | |
| 43 | > **Note that the Pi-hole API 6.0 requires a password**. |
| 44 | > While Netdata can automatically detect Pi-hole instances and create data collection jobs, these jobs will fail unless you provide the necessary credentials. |
| 45 | limits: |
| 46 | description: "" |
| 47 | performance_impact: |
| 48 | description: "" |
| 49 | setup: |
| 50 | prerequisites: |
| 51 | list: |
| 52 | - title: Pi-hole v6.0 or newer |
| 53 | description: | |
| 54 | This collector requires Pi-hole v6.0 or newer as it uses the [Pi-hole API 6.0](https://ftl.pi-hole.net/master/docs/). |
| 55 | - title: Authentication credentials |
| 56 | description: | |
| 57 | Pi-hole administrator password is required for API authentication. Make sure to configure this in the collector settings even when using auto-detection. |
| 58 | configuration: |
| 59 | file: |
| 60 | name: go.d/pihole.conf |
| 61 | options: |
| 62 | description: | |
| 63 | The following options can be defined globally: update_every, autodetection_retry. |
| 64 | folding: |
| 65 | title: Config options |
| 66 | enabled: true |
| 67 | list: |
| 68 | - name: update_every |
| 69 | description: Data collection interval (seconds). |
| 70 | default_value: 1 |
| 71 | required: false |
| 72 | group: Collection |
| 73 | - name: autodetection_retry |
| 74 | description: Autodetection retry interval (seconds). Set 0 to disable. |
| 75 | default_value: 0 |
| 76 | required: false |
| 77 | group: Collection |
| 78 | |
| 79 | - name: url |
| 80 | description: Target endpoint URL. |
| 81 | default_value: http://127.0.0.1 |
| 82 | required: true |
| 83 | group: Target |
| 84 | - name: timeout |
| 85 | description: HTTP request timeout (seconds). |
| 86 | default_value: 1 |
| 87 | required: false |
| 88 | group: Target |
| 89 | |
| 90 | - name: username |
| 91 | description: Username for Basic HTTP authentication. |
| 92 | default_value: "" |
| 93 | required: true |
| 94 | group: HTTP Auth |
| 95 | - name: password |
| 96 | description: Password for Basic HTTP authentication. |
| 97 | default_value: "" |
| 98 | required: true |
| 99 | group: HTTP Auth |
| 100 | - name: bearer_token_file |
| 101 | description: "Path to a file containing a bearer token (used for `Authorization: Bearer`)." |
| 102 | default_value: "" |
| 103 | required: false |
| 104 | group: HTTP Auth |
| 105 | |
| 106 | - name: tls_skip_verify |
| 107 | description: Skip TLS certificate and hostname verification (insecure). |
| 108 | default_value: no |
| 109 | required: false |
| 110 | group: TLS |
| 111 | - name: tls_ca |
| 112 | description: Path to CA bundle used to validate the server certificate. |
| 113 | default_value: "" |
| 114 | required: false |
| 115 | group: TLS |
| 116 | - name: tls_cert |
| 117 | description: Path to client TLS certificate (for mTLS). |
| 118 | default_value: "" |
| 119 | required: false |
| 120 | group: TLS |
| 121 | - name: tls_key |
| 122 | description: Path to client TLS private key (for mTLS). |
| 123 | default_value: "" |
| 124 | required: false |
| 125 | group: TLS |
| 126 | |
| 127 | - name: proxy_url |
| 128 | description: HTTP proxy URL. |
| 129 | default_value: "" |
| 130 | required: false |
| 131 | group: Proxy |
| 132 | - name: proxy_username |
| 133 | description: Username for proxy Basic HTTP authentication. |
| 134 | default_value: "" |
| 135 | required: false |
| 136 | group: Proxy |
| 137 | - name: proxy_password |
| 138 | description: Password for proxy Basic HTTP authentication. |
| 139 | default_value: "" |
| 140 | required: false |
| 141 | group: Proxy |
| 142 | |
| 143 | - name: method |
| 144 | description: HTTP method to use. |
| 145 | default_value: "GET" |
| 146 | required: false |
| 147 | group: Request |
| 148 | - name: body |
| 149 | description: Request body (e.g., for POST/PUT). |
| 150 | default_value: "" |
| 151 | required: false |
| 152 | group: Request |
| 153 | - name: headers |
| 154 | description: "Additional HTTP headers (one per line as key: value)." |
| 155 | default_value: "" |
| 156 | required: false |
| 157 | group: Request |
| 158 | - name: not_follow_redirects |
| 159 | description: Do not follow HTTP redirects. |
| 160 | default_value: no |
| 161 | required: false |
| 162 | group: Request |
| 163 | - name: force_http2 |
| 164 | description: Force HTTP/2 (including h2c over TCP). |
| 165 | default_value: no |
| 166 | required: false |
| 167 | group: Request |
| 168 | |
| 169 | - name: vnode |
| 170 | description: Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes). |
| 171 | default_value: "" |
| 172 | required: false |
| 173 | group: Virtual Node |
| 174 | examples: |
| 175 | folding: |
| 176 | title: Config |
| 177 | enabled: true |
| 178 | list: |
| 179 | - name: Basic |
| 180 | description: A basic example configuration. |
| 181 | config: | |
| 182 | jobs: |
| 183 | - name: local |
| 184 | url: http://127.0.0.1 |
| 185 | password: Gv7#pQm9Xy |
| 186 | - name: HTTPS with self-signed certificate |
| 187 | description: Remote instance with enabled HTTPS and self-signed certificate. |
| 188 | config: | |
| 189 | jobs: |
| 190 | - name: local |
| 191 | url: https://203.0.113.11 |
| 192 | tls_skip_verify: yes |
| 193 | password: bT4@zK1wVr |
| 194 | - name: Multi-instance |
| 195 | description: | |
| 196 | > **Note**: When you define multiple jobs, their names must be unique. |
| 197 | |
| 198 | Collecting metrics from local and remote instances. |
| 199 | config: | |
| 200 | jobs: |
| 201 | - name: local |
| 202 | url: http://127.0.0.1 |
| 203 | password: Gv7#pQm9Xy |
| 204 | |
| 205 | - name: remote |
| 206 | url: http://203.0.113.10 |
| 207 | password: bT4@zK1wVr |
| 208 | troubleshooting: |
| 209 | problems: |
| 210 | list: [] |
| 211 | alerts: |
| 212 | - name: pihole_gravity_list_last_update |
| 213 | metric: pihole.gravity_list_last_update_time_ago |
| 214 | info: "gravity.list (blocklist) file last update time" |
| 215 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/pihole.conf |
| 216 | metrics: |
| 217 | folding: |
| 218 | title: Metrics |
| 219 | enabled: false |
| 220 | description: "" |
| 221 | availability: [] |
| 222 | scopes: |
| 223 | - name: global |
| 224 | description: These metrics refer to the entire monitored application. |
| 225 | labels: [] |
| 226 | metrics: |
| 227 | - name: pihole.dns_queries_total |
| 228 | description: Pi-hole DNS Queries Total (Cached, Blocked and Forwarded) |
| 229 | unit: queries/s |
| 230 | chart_type: line |
| 231 | dimensions: |
| 232 | - name: queries |
| 233 | - name: pihole.dns_queries_blocked_percent |
| 234 | description: Pi-hole DNS Queries Blocked Percent |
| 235 | unit: percent |
| 236 | chart_type: line |
| 237 | dimensions: |
| 238 | - name: blocked |
| 239 | - name: pihole.dns_queries_by_destination |
| 240 | description: Pi-hole DNS Queries by Destination |
| 241 | unit: queries/s |
| 242 | chart_type: stacked |
| 243 | dimensions: |
| 244 | - name: cached |
| 245 | - name: blocked |
| 246 | - name: forwarded |
| 247 | - name: pihole.dns_queries_by_type |
| 248 | description: Pi-hole DNS Queries by Type |
| 249 | unit: queries/s |
| 250 | chart_type: stacked |
| 251 | dimensions: |
| 252 | - name: A |
| 253 | - name: AAA |
| 254 | - name: ANY |
| 255 | - name: SRV |
| 256 | - name: SOA |
| 257 | - name: PTR |
| 258 | - name: TXT |
| 259 | - name: NAPTR |
| 260 | - name: MX |
| 261 | - name: DS |
| 262 | - name: RRSIG |
| 263 | - name: DNSKEY |
| 264 | - name: NS |
| 265 | - name: SVCB |
| 266 | - name: HTTPS |
| 267 | - name: OTHER |
| 268 | - name: pihole.dns_queries_by_status |
| 269 | description: Pi-hole DNS Queries by Status |
| 270 | unit: queries/s |
| 271 | chart_type: stacked |
| 272 | dimensions: |
| 273 | - name: UNKNOWN |
| 274 | - name: GRAVITY |
| 275 | - name: FORWARDED |
| 276 | - name: CACHE |
| 277 | - name: REGEX |
| 278 | - name: DENYLIST |
| 279 | - name: EXTERNAL_BLOCKED_IP |
| 280 | - name: EXTERNAL_BLOCKED_NULL |
| 281 | - name: EXTERNAL_BLOCKED_NXRA |
| 282 | - name: GRAVITY_CNAME |
| 283 | - name: REGEX_CNAME |
| 284 | - name: DENYLIST_CNAME |
| 285 | - name: RETRIED |
| 286 | - name: RETRIED_DNSSEC |
| 287 | - name: IN_PROGRESS |
| 288 | - name: DBBUSY |
| 289 | - name: SPECIAL_DOMAIN |
| 290 | - name: CACHE_STALE |
| 291 | - name: EXTERNAL_BLOCKED_EDE15 |
| 292 | - name: pihole.dns_replies_by_status |
| 293 | description: Pi-hole DNS Replies by Status |
| 294 | unit: replies/s |
| 295 | chart_type: stacked |
| 296 | dimensions: |
| 297 | - name: UNKNOWN |
| 298 | - name: NODATA |
| 299 | - name: NXDOMAIN |
| 300 | - name: CNAME |
| 301 | - name: IP |
| 302 | - name: DOMAIN |
| 303 | - name: RRNAME |
| 304 | - name: SERVFAIL |
| 305 | - name: REFUSED |
| 306 | - name: NOTIMP |
| 307 | - name: DNSSEC |
| 308 | - name: NONE |
| 309 | - name: OTHER |
| 310 | - name: pihole.active_clients |
| 311 | description: Pi-hole Active Clients (Seen in the Last 24 Hours) |
| 312 | unit: clients |
| 313 | chart_type: line |
| 314 | dimensions: |
| 315 | - name: active |
| 316 | - name: pihole.gravity_list_blocked_domains |
| 317 | description: Pi-hole Gravity List Blocked Domains |
| 318 | unit: domains |
| 319 | chart_type: line |
| 320 | dimensions: |
| 321 | - name: blocked |
| 322 | - name: pihole.gravity_list_last_update_time_ago |
| 323 | description: Pi-hole Gravity List Time Since Last Update |
| 324 | unit: seconds |
| 325 | chart_type: line |
| 326 | dimensions: |
| 327 | - name: last_update_ago |