All Apps and Add-ons

Content Analysis comparison with Http Response

ashishamalviya1
Explorer

Currently we are matching the Content of http Response with value in Content Analysis,
we have a scenario where we need to compare the content (greater then or less then) and provide the content match as True or False,

eg :-

`<group-status xmlns="http://abc.com/manage/groups" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://abc.com/manage/groups manage-groups.xsd">
<id>1041339500789136</id>
<name>Default</name>
<meta>...</meta>
<relations>...</relations>
<status-properties>
<hosts-status-summary>
<total-hosts units="quantity">4</total-hosts>`

we need to compare, total-hosts units should be greater then 3

Tags (1)
0 Karma

LukeMurphey
Champion

I would recommend the Website Input app instead.

You should be able to get what you want using Website Input by using an input that extracts that data along with a search the ensures the value is what you expect. Here is what I am thinking:

  1. Create an input using the included wizard against the URL with the given XML file. Set the selector to "total-hosts". Confirm that the extraction is working as intended by clicking "Preview Output".
  2. Create a saved search that looks at the output created by the input you just made. You ought to be able to setup the logic such that it will alert you when "total-hosts" is 3 or less (something like "... | search match <= 3"
0 Karma
Get Updates on the Splunk Community!

Build Scalable Security While Moving to Cloud - Guide From Clayton Homes

 Clayton Homes faced the increased challenge of strengthening their security posture as they went through ...

Mission Control | Explore the latest release of Splunk Mission Control (2.3)

We’re happy to announce the release of Mission Control 2.3 which includes several new and exciting features ...

Cloud Platform | Migrating your Splunk Cloud deployment to Python 3.7

Python 2.7, the last release of Python 2, reached End of Life back on January 1, 2020. As part of our larger ...