bundles/postfix: rework exporter for better usability
This commit is contained in:
parent
9b9465502a
commit
ae0bb8ed58
2 changed files with 2 additions and 4 deletions
|
@ -19,11 +19,9 @@ def dashboard_row_postfix(panel_id, node):
|
|||
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|
||||
|> filter(fn: (r) =>
|
||||
r["_measurement"] == "postfix_queue" and
|
||||
r["_field"] == "count" and
|
||||
r["status"] == "{measurement}" and
|
||||
r["_field"] == "{measurement}" and
|
||||
r["host"] == "{node.name}"
|
||||
)
|
||||
|> rename(columns: {{_field: "{measurement}"}})
|
||||
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|
||||
|> yield(name: "{measurement}")""",
|
||||
'resultFormat': 'time_series',
|
||||
|
|
|
@ -14,4 +14,4 @@ for line in queue_json.splitlines():
|
|||
queue_counts[j['queue_name']] += 1
|
||||
|
||||
for queue in ('incoming', 'active', 'deferred', 'corrupt', 'hold'):
|
||||
print('postfix_queue,status={} count={}i'.format(queue, queue_counts.get(queue, 0)))
|
||||
print('postfix_queue {}={}i'.format(queue, queue_counts.get(queue, 0)))
|
||||
|
|
Loading…
Reference in a new issue