X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdrbd.c;h=f0298943e5aaad07d6b015597f408e7527dff619;hb=c6557cb8950f50a41a1decfb34439b060e2fd371;hp=af55667ee34ace9056f4ae95eb1d1fb46c2a2511;hpb=009bcdff4012d1f0eae13e8b19fb79643d1c655f;p=collectd.git diff --git a/src/drbd.c b/src/drbd.c index af55667e..f0298943 100644 --- a/src/drbd.c +++ b/src/drbd.c @@ -28,7 +28,7 @@ See: http://www.drbd.org/users-guide/ch-admin.html#s-performance-indicators version: 8.3.11 (api:88/proto:86-96) - srcversion: 71955441799F513ACA6DA60 + srcversion: 71955441799F513ACA6DA60 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate B r----- ns:64363752 nr:0 dw:357799284 dr:846902273 al:34987022 bm:18062 lo:0 \ pe:0 ua:0 ap:0 ep:1 wo:f oos:0 @@ -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])) {