Good day, It's been a while. I am trying to join two indexes together to see if a ticket has been logged based on the first search. Search 1: Is used to gather all the results. Here we will be using title, as our main source. (But we dont want to through away all the other colums) index="db_crowdstrike" sourcetype="crowdstrike:spotlight:vulnerability:json"
"falcon_spotlight.status"!="closed" "falcon_spotlight.suppression_info.is_suppressed"="false"
| makemv delim="\n" "falcon_spotlight.remediation.entities{}.title"
| mvexpand "falcon_spotlight.remediation.entities{}.title"
| stats values("falcon_spotlight.host_info.hostname") as hosts dc("falcon_spotlight.host_info.hostname") as host_count by "falcon_spotlight.remediation.entities{}.title"
| eval hosts=mvsort(hosts)
| table "falcon_spotlight.remediation.entities{}.title" host_count Search 2: Is used to gather all the tickets logged to our ITSM. index=db_service_now sourcetype="snow:incident" status!="Resolved" status!="Closed" affect_dest="CrowdStrike Vulnerability Management"
| dedup number description
| table _time active "number" "affect_dest" "description" "dv_description" "dv_impact" "priority" "status" "assignment_group_name" "assignment_user_name" "close_code" "close_notes" "closed_at" "short_description" in search 1 the title will be something like "Update Nvidea GeForce" in search two description will be something like "March: Low - Update Nvidea Geforce" index="db_crowdstrike" sourcetype="crowdstrike:spotlight:vulnerability:json"
"falcon_spotlight.status"!="closed" "falcon_spotlight.suppression_info.is_suppressed"="false"
| makemv delim="\n" "falcon_spotlight.remediation.entities{}.title"
| mvexpand "falcon_spotlight.remediation.entities{}.title"
| eval cs_title=trim('falcon_spotlight.remediation.entities{}.title')
| where len(cs_title)>0
| stats values('falcon_spotlight.host_info.hostname') AS hosts
dc('falcon_spotlight.host_info.hostname') AS host_count
BY cs_title
| eval hosts=mvsort(hosts), lc_title=lower(cs_title), key=1
| join type=left max=0 key [
search index=db_service_now sourcetype="snow:incident"
status!="Resolved" status!="Closed"
affect_dest="CrowdStrike Vulnerability Management"
| dedup number
| eval desc=lower(coalesce(dv_description, description, short_description))
| eval key=1
| fields key number status priority assignment_group_name assignment_user_name desc
]
| eval matched = if(like(desc, "%" . lc_title . "%"), 1, 0)
| eval number = if(matched=1, number, null())
| eval status = if(matched=1, status, null())
| eval priority = if(matched=1, priority, null())
| eval assignment_group_name = if(matched=1, assignment_group_name, null())
| eval assignment_user_name = if(matched=1, assignment_user_name, null())
| stats
max(host_count) AS host_count
values(hosts) AS hosts
values(number) AS snow_numbers
values(status) AS snow_status
values(priority) AS snow_priority
values(assignment_group_name) AS snow_group
values(assignment_user_name) AS snow_assignee
sum(matched) AS snow_count
BY cs_title
| eval has_ticket=if(snow_count>0,"Yes","No")
| dedup snow_numbers
| table cs_title host_count has_ticket snow_count snow_numbers snow_status snow_priority snow_group snow_assignee
| sort -has_ticket -host_count How can I combine my searches to search the second one where it contains the first title field? This is what I tried but it is not completely what I am looking for Any assistance would be greatly appreciated!
... View more