Report packets dropped in interface plugin
authorMarc Falzon <marc@falzon.me>
Fri, 19 Feb 2016 11:07:07 +0000 (12:07 +0100)
committerMarc Falzon <marc@falzon.me>
Fri, 19 Feb 2016 11:07:07 +0000 (12:07 +0100)
Add `if_dropped` to the metrics reported by the interface plugin.

src/interface.c

index 1c01f6f..caaad47 100644 (file)
@@ -286,6 +286,10 @@ static int interface_read (void)
                incoming = atoll (fields[2]);
                outgoing = atoll (fields[10]);
                if_submit (device, "if_errors", incoming, outgoing);
+
+               incoming = atoll (fields[3]);
+               outgoing = atoll (fields[11]);
+               if_submit (device, "if_dropped", incoming, outgoing);
        }
 
        fclose (fh);