FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
netdata/python.d/powerdns.chart.py at master · fars/netdata · GitHub
fars
/
netdata
Public
forked from
netdata/netdata
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
netdata
/
python.d
/
powerdns.chart.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
58 lines (50 loc) · 1.96 KB
Breadcrumbs
netdata
/
python.d
/
powerdns.chart.py
Copy path
File metadata and controls
58 lines (50 loc) · 1.96 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# -*- coding: utf-8 -*-
# Description: powerdns netdata python.d module
# Author: l2isbad
from
json
import
loads
from
bases
.
FrameworkServices
.
UrlService
import
UrlService
priority
=
60000
retries
=
60
# update_every = 3
ORDER
=
[
'questions'
,
'cache_usage'
,
'cache_size'
,
'latency'
]
CHARTS
=
{
'questions'
: {
'options'
: [
None
,
'PowerDNS Queries and Answers'
,
'count'
,
'questions'
,
'powerdns.questions'
,
'line'
],
'lines'
: [
[
'udp-queries'
,
None
,
'incremental'
],
[
'udp-answers'
,
None
,
'incremental'
],
[
'tcp-queries'
,
None
,
'incremental'
],
[
'tcp-answers'
,
None
,
'incremental'
]
]},
'cache_usage'
: {
'options'
: [
None
,
'PowerDNS Cache Usage'
,
'count'
,
'cache'
,
'powerdns.cache_usage'
,
'line'
],
'lines'
: [
[
'query-cache-hit'
,
None
,
'incremental'
],
[
'query-cache-miss'
,
None
,
'incremental'
],
[
'packetcache-hit'
,
'packet-cache-hit'
,
'incremental'
],
[
'packetcache-miss'
,
'packet-cache-miss'
,
'incremental'
]
]},
'cache_size'
: {
'options'
: [
None
,
'PowerDNS Cache Size'
,
'count'
,
'cache'
,
'powerdns.cache_size'
,
'line'
],
'lines'
: [
[
'query-cache-size'
,
None
,
'absolute'
],
[
'packetcache-size'
,
'packet-cache-size'
,
'absolute'
],
[
'key-cache-size'
,
None
,
'absolute'
],
[
'meta-cache-size'
,
None
,
'absolute'
]
]},
'latency'
: {
'options'
: [
None
,
'PowerDNS Latency'
,
'microseconds'
,
'latency'
,
'powerdns.latency'
,
'line'
],
'lines'
: [
[
'latency'
,
None
,
'absolute'
]
]}
}
class
Service
(
UrlService
):
def
__init__
(
self
,
configuration
=
None
,
name
=
None
):
UrlService
.
__init__
(
self
,
configuration
=
configuration
,
name
=
name
)
self
.
order
=
ORDER
self
.
definitions
=
CHARTS
def
_get_data
(
self
):
data
=
self
.
_get_raw_data
()
if
not
data
:
return
None
return
dict
((
d
[
'name'
],
d
[
'value'
])
for
d
in
loads
(
data
))
Back
|
FazBrowse Home
|
New Git URL