summaryrefslogtreecommitdiffstats
path: root/pcp/meters
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-07-07 16:57:03 +1000
committerNathan Scott <nathans@redhat.com>2021-07-08 10:56:05 +1000
commit01f5b892785014db30db4d6b4b7c23e042c7ffe4 (patch)
tree785c3eec2534ed4654cfda34b3780c91e01372d7 /pcp/meters
parent149774209be588fb0da001e5d9cac224862cc5da (diff)
Pretty-print values in the PCP DynamicMeter code
Several improvements to the way values are displayed in the PCP platform DynamicMeter implementation: - handle the initial 'caption' setting as with regular meters, this required a new meter callback because we no longer have just a single meter caption for the DynamicMeter case - if no label is provided for a metric in a configuration file use the short form metric name as a fallback - honour the suffix setting in the configuration file - convert metric values to the canonical units for htop (kbyte and seconds), and use Meter_humanUnit when it makes sense to do so. Also improves the handling of fatal string error messages in a couple of places, thanks to BenBE for the review feedback.
Diffstat (limited to 'pcp/meters')
-rw-r--r--pcp/meters/mysql2
-rw-r--r--pcp/meters/postfix1
-rw-r--r--pcp/meters/redis2
-rw-r--r--pcp/meters/tcp1
4 files changed, 0 insertions, 6 deletions
diff --git a/pcp/meters/mysql b/pcp/meters/mysql
index 07ae11e9..a9e75e46 100644
--- a/pcp/meters/mysql
+++ b/pcp/meters/mysql
@@ -6,10 +6,8 @@
caption = MySQL I/O
recv.metric = mysql.status.bytes_received
recv.color = green
-recv.label = recv
sent.metric = mysql.status.bytes_sent
sent.color = blue
-sent.label = sent
[mysql_keys]
caption = MySQL keys
diff --git a/pcp/meters/postfix b/pcp/meters/postfix
index 66876c5a..cda68377 100644
--- a/pcp/meters/postfix
+++ b/pcp/meters/postfix
@@ -18,4 +18,3 @@ bounce.color = red
bounce.label = bnc
hold.metric = sum(postfix.queues.hold)
hold.color = yellow
-hold.label = hold
diff --git a/pcp/meters/redis b/pcp/meters/redis
index b9c084be..a72f7278 100644
--- a/pcp/meters/redis
+++ b/pcp/meters/redis
@@ -13,10 +13,8 @@ caption = Redis mem
description = Redis memory
lua.metric = redis.used_memory_lua
lua.color = magenta
-lua.label = lua:
used.metric = redis.used_memory
used.color = blue
-used.label = used:
[redisclient]
caption = Redis clients
diff --git a/pcp/meters/tcp b/pcp/meters/tcp
index cebc658d..c95736f3 100644
--- a/pcp/meters/tcp
+++ b/pcp/meters/tcp
@@ -13,7 +13,6 @@ active.color = blue
active.label = act
syn.metric = network.tcpconn.syn_sent + network.tcpconn.syn_recv + network.tcpconn.last_ack
syn.color = cyan
-syn.label = syn
wait.metric = network.tcpconn.time_wait
wait.color = red
wait.label = tim

© 2014-2024 Faster IT GmbH | imprint | privacy policy