summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <ahferroin7@gmail.com>2019-10-17 11:31:24 -0400
committerIlya Mashchenko <ilya@netdata.cloud>2019-10-17 18:31:24 +0300
commit7635704ac48dce9bbe55c190988cfeacb277cbfc (patch)
tree861f77af55837bb971ea3beb57e2dd9de52ddb2b
parent7ff016ea74261246def5500308f17cb575059856 (diff)
Convert recursion timings to miliseconds. (#7121)
* Convert recusion timings to miliseconds. Ths avoids them being mangled to the point of being useless when the locale settings are configured to convert seconds to times. These were originally implemented as seconds because that's how Unound itself reports them. Fixes: #7120 * Fix misspelling of milliseconds.
-rw-r--r--collectors/python.d.plugin/unbound/unbound.chart.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/collectors/python.d.plugin/unbound/unbound.chart.py b/collectors/python.d.plugin/unbound/unbound.chart.py
index c0fb225410..590de4c98b 100644
--- a/collectors/python.d.plugin/unbound/unbound.chart.py
+++ b/collectors/python.d.plugin/unbound/unbound.chart.py
@@ -32,10 +32,10 @@ CHARTS = {
]
},
'recursion': {
- 'options': [None, 'Recursion Timings', 'seconds', 'Unbound', 'unbound.recursion', 'line'],
+ 'options': [None, 'Recursion Timings', 'milliseconds', 'Unbound', 'unbound.recursion', 'line'],
'lines': [
- ['recursive_avg', 'average', 'absolute', 1, PRECISION],
- ['recursive_med', 'median', 'absolute', 1, PRECISION]
+ ['recursive_avg', 'average', 'absolute', 1, 1],
+ ['recursive_med', 'median', 'absolute', 1, 1]
]
},
'reqlist': {
@@ -83,11 +83,11 @@ PER_THREAD_CHARTS = {
]
},
'_recursion': {
- 'options': [None, '{longname} Recursion Timings', 'seconds', 'Recursive Timings',
+ 'options': [None, '{longname} Recursion Timings', 'milliseconds', 'Recursive Timings',
'unbound.threads.recursion', 'line'],
'lines': [
- ['{shortname}_recursive_avg', 'average', 'absolute', 1, PRECISION],
- ['{shortname}_recursive_med', 'median', 'absolute', 1, PRECISION]
+ ['{shortname}_recursive_avg', 'average', 'absolute', 1, 1],
+ ['{shortname}_recursive_med', 'median', 'absolute', 1, 1]
]
},
'_reqlist': {
@@ -117,6 +117,7 @@ STAT_MAP = {
'total.requestlist.exceeded': ('reqlist_exceeded', 1),
'total.requestlist.current.all': ('reqlist_current', 1),
'total.requestlist.current.user': ('reqlist_user', 1),
+ # Unbound reports recursion timings as fractional seconds, but we want to show them as milliseconds.
'total.recursion.time.avg': ('recursive_avg', PRECISION),
'total.recursion.time.median': ('recursive_med', PRECISION),
'msg.cache.count': ('cache_message', 1),
@@ -141,6 +142,7 @@ PER_THREAD_STAT_MAP = {
'{shortname}.requestlist.exceeded': ('{shortname}_reqlist_exceeded', 1),
'{shortname}.requestlist.current.all': ('{shortname}_reqlist_current', 1),
'{shortname}.requestlist.current.user': ('{shortname}_reqlist_user', 1),
+ # Unbound reports recursion timings as fractional seconds, but we want to show them as milliseconds.
'{shortname}.recursion.time.avg': ('{shortname}_recursive_avg', PRECISION),
'{shortname}.recursion.time.median': ('{shortname}_recursive_med', PRECISION)
}