summaryrefslogtreecommitdiffstats
path: root/collectors/freebsd.plugin/freebsd_devstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/freebsd.plugin/freebsd_devstat.c')
-rw-r--r--collectors/freebsd.plugin/freebsd_devstat.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/collectors/freebsd.plugin/freebsd_devstat.c b/collectors/freebsd.plugin/freebsd_devstat.c
index 81a301e4a..910def599 100644
--- a/collectors/freebsd.plugin/freebsd_devstat.c
+++ b/collectors/freebsd.plugin/freebsd_devstat.c
@@ -352,7 +352,8 @@ int do_kern_devstat(int update_every, usec_t dt) {
if(dm->do_io == CONFIG_BOOLEAN_YES || (dm->do_io == CONFIG_BOOLEAN_AUTO &&
(dstat[i].bytes[DEVSTAT_READ] ||
dstat[i].bytes[DEVSTAT_WRITE] ||
- dstat[i].bytes[DEVSTAT_FREE]))) {
+ dstat[i].bytes[DEVSTAT_FREE] ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if (unlikely(!dm->st_io)) {
dm->st_io = rrdset_create_localhost("disk",
disk,
@@ -389,7 +390,8 @@ int do_kern_devstat(int update_every, usec_t dt) {
(dstat[i].operations[DEVSTAT_READ] ||
dstat[i].operations[DEVSTAT_WRITE] ||
dstat[i].operations[DEVSTAT_NO_DATA] ||
- dstat[i].operations[DEVSTAT_FREE]))) {
+ dstat[i].operations[DEVSTAT_FREE] ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if (unlikely(!dm->st_ops)) {
dm->st_ops = rrdset_create_localhost("disk_ops",
disk,
@@ -428,7 +430,9 @@ int do_kern_devstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
if(dm->do_qops == CONFIG_BOOLEAN_YES || (dm->do_qops == CONFIG_BOOLEAN_AUTO &&
- (dstat[i].start_count || dstat[i].end_count))) {
+ (dstat[i].start_count ||
+ dstat[i].end_count ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if (unlikely(!dm->st_qops)) {
dm->st_qops = rrdset_create_localhost("disk_qops",
disk,
@@ -457,7 +461,8 @@ int do_kern_devstat(int update_every, usec_t dt) {
// --------------------------------------------------------------------
if(dm->do_util == CONFIG_BOOLEAN_YES || (dm->do_util == CONFIG_BOOLEAN_AUTO &&
- cur_dstat.busy_time_ms)) {
+ (cur_dstat.busy_time_ms ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if (unlikely(!dm->st_util)) {
dm->st_util = rrdset_create_localhost("disk_util",
disk,
@@ -490,7 +495,8 @@ int do_kern_devstat(int update_every, usec_t dt) {
(cur_dstat.duration_read_ms ||
cur_dstat.duration_write_ms ||
cur_dstat.duration_other_ms ||
- cur_dstat.duration_free_ms))) {
+ cur_dstat.duration_free_ms ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if (unlikely(!dm->st_iotime)) {
dm->st_iotime = rrdset_create_localhost("disk_iotime",
disk,
@@ -538,7 +544,8 @@ int do_kern_devstat(int update_every, usec_t dt) {
(dstat[i].operations[DEVSTAT_READ] ||
dstat[i].operations[DEVSTAT_WRITE] ||
dstat[i].operations[DEVSTAT_NO_DATA] ||
- dstat[i].operations[DEVSTAT_FREE]))) {
+ dstat[i].operations[DEVSTAT_FREE] ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if (unlikely(!dm->st_await)) {
dm->st_await = rrdset_create_localhost("disk_await",
disk,
@@ -603,7 +610,8 @@ int do_kern_devstat(int update_every, usec_t dt) {
if(dm->do_avagsz == CONFIG_BOOLEAN_YES || (dm->do_avagsz == CONFIG_BOOLEAN_AUTO &&
(dstat[i].operations[DEVSTAT_READ] ||
dstat[i].operations[DEVSTAT_WRITE] ||
- dstat[i].operations[DEVSTAT_FREE]))) {
+ dstat[i].operations[DEVSTAT_FREE] ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if (unlikely(!dm->st_avagsz)) {
dm->st_avagsz = rrdset_create_localhost("disk_avgsz",
disk,
@@ -660,7 +668,8 @@ int do_kern_devstat(int update_every, usec_t dt) {
(dstat[i].operations[DEVSTAT_READ] ||
dstat[i].operations[DEVSTAT_WRITE] ||
dstat[i].operations[DEVSTAT_NO_DATA] ||
- dstat[i].operations[DEVSTAT_FREE]))) {
+ dstat[i].operations[DEVSTAT_FREE] ||
+ netdata_zero_metrics_enabled == CONFIG_BOOLEAN_YES))) {
if (unlikely(!dm->st_svctm)) {
dm->st_svctm = rrdset_create_localhost("disk_svctm",
disk,