Adding alert csv generation capability and weekly trend report #163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adding alert csv report generation and download endpoints, together with a alert trend generation script for generate weekly trend of alerts base on severity.
Motivation and Context
While Prisma Cloud provides point of time report or alerts summary in period of time, there are use cases that customer would like to generate alert trends across pass weeks.
How Has This Been Tested?
A default start time 1/1/2022 and 30 weeks trend report are used for testing the trending report.
+-------------+------------+--------+----------+-------+---------------+
| | critical | high | medium | low | information |
|-------------+------------+--------+----------+-------+---------------|
| 0 Week ago | 4 | 344 | 132 | 60 | 0 |
| 1 Week ago | 4 | 343 | 131 | 60 | 0 |
| 2 Week ago | 4 | 343 | 128 | 60 | 0 |
| 3 Week ago | 4 | 341 | 127 | 60 | 0 |
| 4 Week ago | 4 | 340 | 125 | 59 | 0 |
| 5 Week ago | 4 | 333 | 114 | 59 | 0 |
| 6 Week ago | 1 | 125 | 110 | 58 | 0 |
| 7 Week ago | 1 | 108 | 104 | 58 | 0 |
| 8 Week ago | 1 | 107 | 101 | 57 | 0 |
| 9 Week ago | 1 | 105 | 84 | 54 | 0 |
| 10 Week ago | 1 | 105 | 84 | 53 | 0 |
| 11 Week ago | 1 | 95 | 78 | 53 | 0 |
| 12 Week ago | 1 | 95 | 78 | 53 | 0 |
| 13 Week ago | 1 | 94 | 54 | 28 | 0 |
| 14 Week ago | 1 | 87 | 51 | 28 | 0 |
| 15 Week ago | 1 | 70 | 46 | 28 | 0 |
| 16 Week ago | 0 | 61 | 41 | 28 | 0 |
| 17 Week ago | 0 | 58 | 38 | 28 | 0 |
| 18 Week ago | 0 | 32 | 22 | 28 | 0 |
| 19 Week ago | 0 | 32 | 22 | 28 | 0 |
| 20 Week ago | 0 | 32 | 22 | 28 | 0 |
| 21 Week ago | 0 | 32 | 22 | 28 | 0 |
| 22 Week ago | 0 | 32 | 22 | 28 | 0 |
| 23 Week ago | 0 | 29 | 20 | 21 | 0 |
| 24 Week ago | 0 | 17 | 16 | 21 | 0 |
| 25 Week ago | 0 | 17 | 16 | 21 | 0 |
| 26 Week ago | 0 | 17 | 16 | 21 | 0 |
| 27 Week ago | 0 | 17 | 16 | 21 | 0 |
| 28 Week ago | 0 | 17 | 16 | 21 | 0 |
| 29 Week ago | 0 | 17 | 16 | 21 | 0 |
+-------------+------------+--------+----------+-------+---------------+
Types of changes
change in cspm endpoint.py
adding a new sample script under scripts folder
Checklist