Correlation - Create Correlation Rule Test

URI

https://164.99.19.131:8443/SentinelRESTServices/correlation/ruletest

Supported Methods

POST

This API defines and begins execution of a new correlation rule test.

Authentication

Authentication Types
Sentinel Permissions Needed

URL Parameters

None.

Success Codes

Fault Codes

Request Data

Object type: Correlation rule test object
Correlation rule test object along with status of rule test and trigger events
FieldRequiredDescription
CardinalityfalseNumber of strings and related structures held in memory by the rule.
endTimefalseEnd time for event search.
EPSCapacityfalseThe processing time this rule consumes relative to the capacity of the engine.
errorMessagefalseError message if any. Will get in case of stauts Stopped and Error.
EventRefCountfalseNumber of events held in memory by the rule.
eventsProcessedfalseNumber of events processed.
LastEventTimefalseEvent time of the last event that triggered the Correlation rule while testing.
luceneFilterfalseLucene expression for event search.
OutputRatefalseThe number of times the rule has fired relative to the events processed.
percentCompletefalseCurrent level of percentage of overall test.
progressPhasefalsePhase the test is currently in. e.g. 1-Searching event, 2-Testing rule.
rulelgfalseCorrelation expression to be tested.
startTimefalseBegin time for event search.
statusfalseCurrent state of test. e.g. Running, Stopped, Completed, Error.
testFinishedAtfalseTime, rule test finished at.
testIdfalseID generated for this test.
testStartedAtfalseTime, rule test started at.
TotalProcessingTimefalseTotal time taken for processing events.
triggersfalseList of events triggering this correlation rule.

Response Data

Object type: Correlation rule test object
Correlation rule test object along with status of rule test and trigger events
FieldDescription
CardinalityNumber of strings and related structures held in memory by the rule.
endTimeEnd time for event search.
EPSCapacityThe processing time this rule consumes relative to the capacity of the engine.
errorMessageError message if any. Will get in case of stauts Stopped and Error.
EventRefCountNumber of events held in memory by the rule.
eventsProcessedNumber of events processed.
LastEventTimeEvent time of the last event that triggered the Correlation rule while testing.
luceneFilterLucene expression for event search.
OutputRateThe number of times the rule has fired relative to the events processed.
percentCompleteCurrent level of percentage of overall test.
progressPhasePhase the test is currently in. e.g. 1-Searching event, 2-Testing rule.
rulelgCorrelation expression to be tested.
startTimeBegin time for event search.
statusCurrent state of test. e.g. Running, Stopped, Completed, Error.
testFinishedAtTime, rule test finished at.
testIdID generated for this test.
testStartedAtTime, rule test started at.
TotalProcessingTimeTotal time taken for processing events.
triggersList of events triggering this correlation rule.

Sample Request

POST correlation/ruletest
{"startTime":1316409588646, "endTime":1316499588000, "rulelg":"filter(((e.EventName = "CreateEventSource")) AND ((e.Message match regex (".*EMPTYTZ.*"))))", "luceneFilter":"sev:[0 TO 5]"}

Sample Response for application/json
Status: 200
{"rulelg":"filter(((e.EventName = "CreateEventSource")) AND ((e.Message match regex (".*EMPTYTZ.*"))))","startTime":1316409588646,"endTime":1316499588000,"luceneFilter":"sev:[0 TO 5]","testId":"84BEC330-C575-102E-A847-000FFEE403E9","progressPhase":1,"percentComplete":0,"status":"running","eventsProcessed":0,"LastEventTime":0,"testStartedAt":1316496024393,"TotalProcessingTime":0,"EPSCapacity":0,"OutputRate":0,"triggers":[]}