diff --git a/package/etc/conf.d/filters/cisco/cisco_syslog.conf b/package/etc/conf.d/filters/cisco/cisco_syslog.conf index 90ecbbb..d1a77ae 100644 --- a/package/etc/conf.d/filters/cisco/cisco_syslog.conf +++ b/package/etc/conf.d/filters/cisco/cisco_syslog.conf @@ -60,7 +60,7 @@ parser cisco-parser-ex{ value("HOST") condition( not match('^\d+$', value('11')) - and match('^[A-Za-z]{1,3}.+' value('11')) + and match('^[A-Za-z0-9]{4,}$' value('11')) and match('^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$' value('11'))) ); set( diff --git a/tests/test_cisco_nx_os.py b/tests/test_cisco_nx_os.py index bb08dcb..97888c2 100644 --- a/tests/test_cisco_nx_os.py +++ b/tests/test_cisco_nx_os.py @@ -97,7 +97,7 @@ def test_cisco_nx_os_soup2( "{{ mark }}364241: {{ bsd }} GMT: %ADJ-3-RESOLVE_REQ: Adj resolve request: Failed to resolve {{ host }} Vlan1\n" ) message = mt.render( - mark="<111>", bsd=bsd, date=date, time=time, tzoffset=tzoffset + mark="<111>", bsd=bsd, host=host, date=date, time=time, tzoffset=tzoffset ) sendsingle(message, setup_sc4s[0], setup_sc4s[1][514])