-
Notifications
You must be signed in to change notification settings - Fork 621
[Cisco ise] Tag device-sensor fragments instead of erroring per line #20528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
5d3c459
f00d64c
306138c
f9bb5d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| CISE_Profiler 0000034521 2 1 cisco-av-pair=cdp-tlv=cdpCacheAddress=192.0.2.10, cisco-av-pair=lldp-tlv=lldpSystemDescription=Cisco IOS Software C3700 Software, cisco-av-pair=cdp-tlv=cdpCacheDeviceId=SAMPLE-AP-0001, | ||
| Technical Support: http://www.cisco.com/techsupport\ | ||
| Copyright (c) 1986-2024 by Cisco Systems, Inc.\ | ||
| Compiled Tue 16-Jul-24 14:24 by mcpre, cisco-av-pair=cdp-tlv=cdpCacheDeviceId=SAMPLE-AP-0001.8, cisco-av-pair=audit-session-id=C000020A00001111AAAA2222, cisco-av-pair=method=mab, AcsSessionID=SAMPLE-ISE-01/000000000/1111111, Step=11004, NetworkDeviceGroups=Location#All Locations#SAMPLE, CPMSessionID=C000020A00001111AAAA2222, StepLatency=1=0;2=0;3=0;4=1;5=0, TotalAuthenLatency=2, Operation=Operation#Operation#CLOSED, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: 🔵 Low The new guard suppresses Details
Recommendation: Append a malformed line that is not a device-sensor continuation to the fixture and assert the error is still reported in the expected output: {
"error": {
"message": [
"grok_time_details: Provided Grok expressions do not match field value: [Completely malformed ISE line with no header]"
]
},
"event": {
"original": "Completely malformed ISE line with no header"
},
"tags": [
"preserve_original_event"
]
}🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,10 +22,40 @@ processors: | |
| pattern_definitions: | ||
|
vinit-chauhan marked this conversation as resolved.
|
||
| TIMEONLYSTAMP_ISO8601: '%{YEAR}-%{MONTHNUM}-%{MONTHDAY}[T]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?' | ||
| on_failure: | ||
| - set: | ||
| tag: set_device_sensor_fragment_flag | ||
| description: >- | ||
| ISE forwards device-sensor values verbatim, so a neighbor's | ||
| multi-line banner (lldpSystemDescription) arrives with its newlines | ||
| intact, each escaped as a trailing backslash. The inputs split on | ||
| them, leaving continuation lines that carry no ISE header and can | ||
| never match. Flag them so they are tagged instead of erroring once | ||
| per line. | ||
| field: _tmp.device_sensor_fragment | ||
| value: true | ||
| if: >- | ||
| ctx.event?.original instanceof String && | ||
| (ctx.event.original.endsWith('\\') || | ||
|
robester0403 marked this conversation as resolved.
Outdated
|
||
| ctx.event.original.trim().endsWith(',')) | ||
|
robester0403 marked this conversation as resolved.
Outdated
|
||
| - append: | ||
| tag: append_tag_device_sensor_fragment | ||
| field: tags | ||
| value: cisco_ise.device_sensor_fragment | ||
| allow_duplicates: false | ||
| if: ctx._tmp?.device_sensor_fragment == true | ||
| - set: | ||
| tag: set_message_from_device_sensor_fragment | ||
| description: >- | ||
| The attributes a fragment carries belong to the preceding record and | ||
| cannot be rejoined here, so keep the raw text searchable in message. | ||
| field: message | ||
| copy_from: event.original | ||
| if: ctx._tmp?.device_sensor_fragment == true | ||
| - append: | ||
| tag: append_error_message_62c1fc01 | ||
| field: error.message | ||
| value: '{{{ _ingest.on_failure_processor_tag }}}: {{{_ingest.on_failure_message}}}' | ||
| if: ctx._tmp?.device_sensor_fragment == null | ||
| - grok: | ||
| field: _tmp.message | ||
| tag: grok_message_details | ||
|
|
@@ -287,26 +317,6 @@ processors: | |
| value: preserve_original_event | ||
| allow_duplicates: false | ||
| if: ctx.error?.message != null | ||
| - append: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's revert this, because we will still need |
||
| tag: append_tag_timestamp_defaulted_to_ingest_time | ||
| description: >- | ||
| Tag events whose @timestamp is defaulted to ingest time (no event date | ||
| parsed) so the assumed timestamps can be filtered out or audited. | ||
| field: tags | ||
| value: cisco_ise.timestamp_defaulted_to_ingest_time | ||
| allow_duplicates: false | ||
| if: ctx['@timestamp'] == null | ||
| - set: | ||
| tag: set_fallback_timestamp_to_ingest_time | ||
| description: >- | ||
| Default @timestamp to ingest time when no event date was parsed, so | ||
| valid but timestamp-less events (e.g. device-sensor fragments) are not | ||
| routed to the failure store. Guarded on null to never overwrite a | ||
| parsed event time. | ||
| field: '@timestamp' | ||
| value: '{{{_ingest.timestamp}}}' | ||
| if: ctx['@timestamp'] == null | ||
| ignore_failure: true | ||
| on_failure: | ||
| - set: | ||
| field: event.kind | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Severity: 🟡 Medium
confidence: highpath: packages/cisco_ise/changelog.yml:4The 1.32.11 changelog says it removes "the unreachable
@timestampfallback added in 1.32.9", but that fallback is still indefault.ymland is demonstrably reachable; drop that sentence from the entry.Details
The
set_fallback_timestamp_to_ingest_timeprocessor added in 1.32.9 is still present atdata_stream/log/elasticsearch/ingest_pipeline/default.ymllines 323-333, and this PR removes nothing from that file (the only pipeline changes are two added grok patterns and two added processors). It is also not unreachable: every document intest-pipeline-device-sensor-fragments.log-expected.jsongets its@timestampfrom it (the nanosecond-precision_ingest.timestampvalues) together with thecisco_ise.timestamp_defaulted_to_ingest_timetag. The changelog is user-facing release notes, so it currently tells operators a behaviour was removed when it was not.Recommendation:
Describe only what this PR actually changes:
🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills