Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding alert csv generation capability and weekly trend report #163

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

billhoph
Copy link
Contributor

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

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@SimOnPanw SimOnPanw merged commit bbfa400 into PaloAltoNetworks:main Jan 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants