From: Florian Forster Date: Wed, 10 Jan 2024 21:19:58 +0000 (+0100) Subject: swap plugin: Populate the `unit` field. X-Git-Tag: collectd-6.0.0.rc1~2^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b831b3beef660fc5aeeef32ce1afd37e20c80a5;p=thirdparty%2Fcollectd.git swap plugin: Populate the `unit` field. --- diff --git a/src/swap.c b/src/swap.c index e79f4fbc0..93d68618d 100644 --- a/src/swap.c +++ b/src/swap.c @@ -810,24 +810,28 @@ static int swap_read(void) { { .name = "system.paging.usage", .help = "Unix swap usage", + .unit = "By", .type = METRIC_TYPE_GAUGE, }, [FAM_SWAP_UTILIZATION] = { .name = "system.paging.utilization", .help = "Unix swap utilization", + .unit = "1", .type = METRIC_TYPE_GAUGE, }, [FAM_SWAP_OPS] = { /* used when report_io && !report_bytes */ .name = "system.paging.operations", + .unit = "{operation}", .type = METRIC_TYPE_COUNTER, }, [FAM_SWAP_IO] = { /* used when report_io && report_bytes */ .name = "system.paging.io", + .unit = "By", .type = METRIC_TYPE_COUNTER, }, };