X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdrbd.c;h=d46bb020ed5cc89d821c1ea5caa71d665f169ec8;hb=4de248994479ec6b32a0beb39a7bf9aca1a18387;hp=af55667ee34ace9056f4ae95eb1d1fb46c2a2511;hpb=446a764be3e33b6fa48b93049751c051724ee650;p=collectd.git diff --git a/src/drbd.c b/src/drbd.c index af55667e..d46bb020 100644 --- a/src/drbd.c +++ b/src/drbd.c @@ -132,7 +132,7 @@ static int drbd_read (void) fh = fopen (drbd_stats, "r"); if (fh == NULL) { - WARNING ("Unable to open%s", drbd_stats); + WARNING ("drbd plugin: Unable to open %s", drbd_stats); return (EINVAL); } @@ -142,8 +142,12 @@ static int drbd_read (void) fields, STATIC_ARRAY_SIZE (fields)); /* ignore headers (first two iterations) */ - if (fields_num < 4) + if ((strcmp(fields[0], "version:") == 0) || + (strcmp(fields[0], "srcversion:") == 0) || + (strcmp(fields[0], "GIT-hash:") == 0)) + { continue; + } if (isdigit(fields[0][0])) {