Skip to content

Commit

Permalink
Extend RFC3164 parser to support Cisco iOS logs
Browse files Browse the repository at this point in the history
These devices seem to send non-standard logs that include a sequence
number, and a couple of extra characters (for good luck, I assume).

For example:
```
    10.51.101.233.50433 > 10.51.101.164.514: SYSLOG, length: 112 Facility local7 (23), Severity notice (5)
        Msg: 485: *Jan  8 21:50:03.406: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback100, changed state to up
```

Note the `485: *` here. This is the sequence number (and a `*` -- no
idea).

It also includes a ms-precision timestamp.
  • Loading branch information
alistairking committed Jan 8, 2025
1 parent 46afcec commit 8231f01
Show file tree
Hide file tree
Showing 7 changed files with 11,355 additions and 10,880 deletions.
2 changes: 1 addition & 1 deletion common/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package common
import "strings"

// UnsafeUTF8DecimalCodePointsToInt converts a slice containing
// a series of UTF-8 decimal code points into their integer rapresentation.
// a series of UTF-8 decimal code points into their integer representation.
//
// It assumes input code points are in the range 48-57.
// Returns a pointer since an empty slice is equal to nil and not to the zero value of the codomain (ie., `int`).
Expand Down
Loading

0 comments on commit 8231f01

Please sign in to comment.