-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SOAR-15940] InsightIDR - advanced_query_on_log_set statistical resul…
…t bug fix (#2108) * SOAR-15940-Fixing issue where statistical calls to advanced_query_on_log_set was always coming back as 0.0 * SOAR-15940-updated unit tests for advanced_query_on_log_set to include schema validation * SOAR-15940-updated unit tests for advanced_query_on_log_set to include schema validation * SOAR-15940-updating count to better reflect the total items matched * SOAR-15940-updating count to better reflect the total items matched * SOAR-15940-updating unit test to reflect change to count * SOAR-15940-adding more specific error handling
- Loading branch information
1 parent
b38a5d5
commit 34642e7
Showing
13 changed files
with
572 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
plugins/rapid7_insightidr/unit_test/payloads/log_id5.json.resp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"logs": [ | ||
"553048ff-e6ab-4597-a3e0-2b24032c233e", | ||
"3244ed07-c3af-4bee-90b5-905a38a034b4" | ||
], | ||
"progress": 0, | ||
"events": [], | ||
"partial": { | ||
"cardinality": 0, | ||
"granularity": 4320000, | ||
"from": 1699567413000, | ||
"to": 1699610613000, | ||
"type": "count", | ||
"stats": { | ||
"global_timeseries": { | ||
"count": 0 | ||
} | ||
}, | ||
"groups": [], | ||
"others": {}, | ||
"status": 200, | ||
"timeseries": { | ||
"global_timeseries": [ | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
}, | ||
{ | ||
"count": 0 | ||
} | ||
] | ||
}, | ||
"groups_timeseries": [], | ||
"all_exact_result": null, | ||
"count": 0 | ||
}, | ||
"id": "7176face-f659-45a6-bd46-81fdc2b1f74b:1:85f959aecc0a7300f9ad93ddacf3454e36348348::bafefd2e9cf60c699529d5a8cf4493578b0b56dd:", | ||
"links": [ | ||
{ | ||
"rel": "Self", | ||
"href": "https://us.api.insight.rapid7.com/log_search/query/7176face-f659-45a6-bd46-81fdc2b1f74b:1:85f959aecc0a7300f9ad93ddacf3454e36348348::bafefd2e9cf60c699529d5a8cf4493578b0b56dd:" | ||
} | ||
], | ||
"leql": { | ||
"statement": "where(hostname='WindowsX64') calculate(count)", | ||
"during": { | ||
"from": 1699567413000, | ||
"to": 1699610613000 | ||
} | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
plugins/rapid7_insightidr/unit_test/payloads/log_id6.json.resp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"logs": [ | ||
"553048ff-e6ab-4597-a3e0-2b24032c233e", | ||
"3244ed07-c3af-4bee-90b5-905a38a034b4" | ||
], | ||
"statistics": { | ||
"cardinality": 0, | ||
"granularity": 4320000, | ||
"from": 1699567413000, | ||
"to": 1699610613000, | ||
"type": "count", | ||
"stats": { | ||
"global_timeseries": { | ||
"count": 462 | ||
} | ||
}, | ||
"groups": [], | ||
"others": {}, | ||
"status": 200, | ||
"timeseries": { | ||
"global_timeseries": [ | ||
{ | ||
"count": 38 | ||
}, | ||
{ | ||
"count": 47 | ||
}, | ||
{ | ||
"count": 36 | ||
}, | ||
{ | ||
"count": 56 | ||
}, | ||
{ | ||
"count": 60 | ||
}, | ||
{ | ||
"count": 40 | ||
}, | ||
{ | ||
"count": 39 | ||
}, | ||
{ | ||
"count": 41 | ||
}, | ||
{ | ||
"count": 61 | ||
}, | ||
{ | ||
"count": 44 | ||
} | ||
] | ||
}, | ||
"groups_timeseries": [], | ||
"all_exact_result": null, | ||
"count": 462 | ||
}, | ||
"search_stats": { | ||
"bytes_checked": 3589232, | ||
"index_factor": 0.4294746, | ||
"events_matched": 462, | ||
"events_checked": 595, | ||
"duration_ms": 19, | ||
"events_all": 1025, | ||
"bytes_all": 6291099 | ||
}, | ||
"leql": { | ||
"statement": "where(hostname='WindowsX64') calculate(count)", | ||
"during": { | ||
"from": 1699567413000, | ||
"to": 1699610613000 | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
plugins/rapid7_insightidr/unit_test/payloads/log_id7.json.resp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"logs": [ | ||
"553048ff-e6ab-4597-a3e0-2b24032c233e", | ||
"3244ed07-c3af-4bee-90b5-905a38a034b4" | ||
], | ||
"progress": 0, | ||
"events": [], | ||
"partial": { | ||
"cardinality": 0, | ||
"granularity": 4320000, | ||
"from": 1699569260000, | ||
"to": 1699612460000, | ||
"type": "count", | ||
"stats": {}, | ||
"groups": [], | ||
"others": {}, | ||
"status": 204, | ||
"timeseries": {}, | ||
"groups_timeseries": [], | ||
"all_exact_result": true | ||
}, | ||
"id": "b55a768a-4c0e-449a-84ae-adc70e18eb20:1:8956245765c23b46f1d20322e5c076e53a7ab662::d56c37ab761ff5e65950abd93476f02ffbcb5a45:", | ||
"links": [ | ||
{ | ||
"rel": "Self", | ||
"href": "https://us.api.insight.rapid7.com/log_search/query/b55a768a-4c0e-449a-84ae-adc70e18eb20:1:8956245765c23b46f1d20322e5c076e53a7ab662::d56c37ab761ff5e65950abd93476f02ffbcb5a45:" | ||
} | ||
], | ||
"leql": { | ||
"statement": "groupby(r7_context.asset.name)", | ||
"during": { | ||
"from": 1699569260000, | ||
"to": 1699612460000 | ||
} | ||
} | ||
} |
Oops, something went wrong.