diff --git a/main.go b/main.go index 80dd21f..4c28b7e 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/common/log" ) -const version string = "0.8.0" +const version string = "0.8.1" var ( showVersion = flag.Bool("version", false, "Print version information.") diff --git a/parser.go b/parser.go index d1403a1..da11538 100644 --- a/parser.go +++ b/parser.go @@ -19,7 +19,7 @@ var ( ) func init() { - protocolRegex, _ = regexp.Compile("^([^\\s]+)\\s+(BGP|OSPF)\\s+([^\\s]+)\\s+([^\\s]+)\\s+([^\\s]+)\\s+(.*?)\\s*$") + protocolRegex, _ = regexp.Compile("^(?:1002\\-)?([^\\s]+)\\s+(BGP|OSPF)\\s+([^\\s]+)\\s+([^\\s]+)\\s+([^\\s]+)\\s+(.*?)\\s*$") routeRegex, _ = regexp.Compile("^\\s+Routes:\\s+(\\d+) imported, (?:(\\d+) filtered, )?(\\d+) exported") uptimeRegex, _ = regexp.Compile("^(?:((\\d+):(\\d{2}):(\\d{2}))|\\d+)$") }