Skip to content

Commit

Permalink
[FILTERMOD] Cisco FPMC chassis support (#564)
Browse files Browse the repository at this point in the history
* [FILTERMOD] Change Cisco ISO XR to allow for a colon on the syslog version position

Co-authored-by: mbonsack <mbonsack@splunk.com>
  • Loading branch information
2 people authored and GitHub committed Jul 10, 2020
1 parent 9bf5b2e commit 7993086
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/sources/Cisco/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ Cisco Network Products of multiple types share common logging characteristics th
* Cisco IOS-XR
* Cisco IOS-XE
* Cisco NX-OS
* Cisco FX-OS


| Ref | Link |
Expand Down
2 changes: 1 addition & 1 deletion package/etc/conf.d/filters/cisco/cisco_syslog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ parser cisco-parser-ex{
} elif {
# Cisco Nexus Switch
filter {
message('^<(?<pri>\d*)> ?20\d\d (\w\w\w \d+ \d\d:\d\d:\d\d(?:.\d{3,3})?) ([^ ]+) ((%[^\: ]+)\:? ?.*)'
message('^<(?<pri>\d*)>:? ?20\d\d (\w\w\w \d+ \d\d:\d\d:\d\d(?:.\d{3,3})?) ([^ ]+) ((%[^\: ]+)\:? ?.*)'
flags(store-matches));
};
rewrite {
Expand Down
3 changes: 3 additions & 0 deletions tests/test_cisco_ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"{{ mark }} 2014 {{ bsd }}.{{ millisec }} {{ host }} %MODULE-2-MOD_SOMEPORTS_FAILED: Module 13 (Serial number: JAF12345678) reported failure on ports Eth13/17-20 (Ethernet) due to hardware not accessible in device DEV_CLP_FWD(device error 0xca804200)",
"{{ mark }} 2014 {{ bsd }} {{ host }} %MODULE-2-MOD_SOMEPORTS_FAILED: Module 13 (Serial number: JAF12345678) reported failure on ports Eth13/17-20 (Ethernet) due to hardware not accessible in device DEV_CLP_FWD(device error 0xca804200)",
"{{ mark }}22191: {{ host }}: 022546: .{{ bsd }}.{{ millisec }} CDT: %PARSER-5-CFGLOG_LOGGEDCMD: User:dfa_service_admin logged command:!exec: enable",
"{{ mark }}: {{ year }} {{ bsd }} PDT: %DAEMON-3-SYSTEM_MSG: ftp disabled, removing - xinetd[4930] {{ host }}",
]

testdata_uptime = [
Expand Down Expand Up @@ -125,6 +126,7 @@ def test_cisco_ios_badtime(

dt = datetime.datetime.now()
iso, bsd, time, date, tzoffset, tzname, epoch = time_operations(dt)
year = dt.year

# Tune time functions
epoch = epoch[:-7]
Expand All @@ -140,6 +142,7 @@ def test_cisco_ios_badtime(
time=time,
millisec=millisec,
microsec=microsec,
year=year,
tzname=tzname,
host=host,
)
Expand Down

0 comments on commit 7993086

Please sign in to comment.