df: rename percentage types to a more generic name
authorMarc Fournier <marc.fournier@camptocamp.com>
Wed, 17 Jul 2013 09:59:57 +0000 (11:59 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Wed, 17 Jul 2013 09:59:57 +0000 (11:59 +0200)
src/df.c
src/types.db

index 540985d..4936cc0 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -309,11 +309,11 @@ static int df_read (void)
                {
                        if (statbuf.f_blocks > 0)
                                {
-                               df_submit_one (disk_name, "df_complex_pct", "free",
+                               df_submit_one (disk_name, "percent_bytes", "free",
                                        (gauge_t) ((float_t)(blk_free) / statbuf.f_blocks * 100));
-                               df_submit_one (disk_name, "df_complex_pct", "reserved",
+                               df_submit_one (disk_name, "percent_bytes", "reserved",
                                        (gauge_t) ((float_t)(blk_reserved) / statbuf.f_blocks * 100));
-                               df_submit_one (disk_name, "df_complex_pct", "used",
+                               df_submit_one (disk_name, "percent_bytes", "used",
                                        (gauge_t) ((float_t)(blk_used) / statbuf.f_blocks * 100));
                                }
                        else return (-1);
@@ -340,11 +340,11 @@ static int df_read (void)
                        {
                                if (statbuf.f_files > 0)
                                {
-                                       df_submit_one (disk_name, "df_inodes_pct", "free",
+                                       df_submit_one (disk_name, "percent_inodes", "free",
                                                (gauge_t) ((float_t)(inode_free) / statbuf.f_files * 100));
-                                       df_submit_one (disk_name, "df_inodes_pct", "reserved",
+                                       df_submit_one (disk_name, "percent_inodes", "reserved",
                                                (gauge_t) ((float_t)(inode_reserved) / statbuf.f_files * 100));
-                                       df_submit_one (disk_name, "df_inodes_pct", "used",
+                                       df_submit_one (disk_name, "percent_inodes", "used",
                                                (gauge_t) ((float_t)(inode_used) / statbuf.f_files * 100));
                                }
                                else return (-1);
index 9ac3e0a..f1d30f0 100644 (file)
@@ -30,8 +30,6 @@ delay                 value:GAUGE:-1000000:1000000
 derive                 value:DERIVE:0:U
 df_complex             value:GAUGE:0:U
 df_inodes              value:GAUGE:0:U
-df_complex_pct         value:GAUGE:0:100.1
-df_inodes_pct          value:GAUGE:0:100.1
 df                     used:GAUGE:0:1125899906842623, free:GAUGE:0:1125899906842623
 disk_latency           read:GAUGE:0:U, write:GAUGE:0:U
 disk_merged            read:DERIVE:0:U, write:DERIVE:0:U
@@ -116,6 +114,8 @@ node_tx_rate                value:GAUGE:0:127
 objects                        value:GAUGE:0:U
 operations             value:DERIVE:0:U
 percent                        value:GAUGE:0:100.1
+percent_bytes          value:GAUGE:0:100.1
+percent_inodes         value:GAUGE:0:100.1
 pf_counters            value:DERIVE:0:U
 pf_limits              value:DERIVE:0:U
 pf_source              value:DERIVE:0:U