diff --git a/plugins/telegraf_pfifgw.php b/plugins/telegraf_pfifgw.php index 6131c47..e0a3052 100755 --- a/plugins/telegraf_pfifgw.php +++ b/plugins/telegraf_pfifgw.php @@ -27,6 +27,12 @@ } if (strtolower($ifstatus) == "active") { $ifstatus = 1; + } + if (strtolower($ifstatus) == "associated") { + $ifstatus = 1; + } + if (strtolower($ifstatus) == "active") { + $ifstatus = 1; } if (strtolower($ifstatus) == "no carrier") { $ifstatus = 0; @@ -61,7 +67,7 @@ printf( - "interface,host=%s,name=%s,ip4_address=%s,ip4_subnet=%s,ip6_address=%s,ip6_subnet=%s,mac_address=%s,friendlyname=%s,source=%s status=%s\n", + "interface,host=%s,name=%s,ip4_address=%s,ip4_subnet=%s,ip6_address=%s,ip6_subnet=%s,mac_address=%s,friendlyname=%s,source=%s ifstatus=%s\n", $host, $realif, $ip4addr, @@ -176,4 +182,4 @@ $substatus ); }; -?> \ No newline at end of file +?>