Code

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 1c01f6ff773cf8e5bb92697b73e21e4bacee1663..caaad47a4acc8e03902e93277b67dfe52c0f1df2 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);