Skip to content

Commit

Permalink
Merge pull request #2 from tkishel/sheets
Browse files Browse the repository at this point in the history
Sheets
  • Loading branch information
tkishel authored Feb 19, 2021
2 parents 99cb8d1 + 8229cda commit fd6e2c2
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 1,641 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

*.conf
*.csv
*.xls
*.tab
*.txt

Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@

The `pcs-inspect.py` script queries the Prisma Cloud API for all enabled Policies
and for all Alerts within a Relative Time Range (with a default of one month),
and outputs results to tab-delimited CSV files, including:
and outputs results to an Excel spreadsheet, including:

* Utilization Summary
* Alerts By Compliance Standard
* Alerts By Policy
* Alert Totals
* Alert Summary

### Requirements

* (Developed and tested on) Python 3.x with the `requests` library.
* (Developed and tested on) Python 3.x with the `pandas` and `requests` libraries.
* Prisma Cloud Access Key with `ACCOUNT GROUP READ ONLY` or `SYSTEM ADMIN` privileges.

### Usage

* Download this repository.
* If necessary, install the `requests` library.
* Execute `pcs-inspect.py` to collect and process the data.
* Import the data into Google Sheets, and/or Google Slides (for example: [PCS Inspect Report](https://docs.google.com/presentation/d/10x_PGAu0ZPUGZMc4Tfevf9gpXvhIUOwGrBuRBkI6Jjc/edit?usp=sharing))
* Import the results into Google Sheets, and/or Google Slides (for example: [PCS Inspect Report](https://docs.google.com/presentation/d/10x_PGAu0ZPUGZMc4Tfevf9gpXvhIUOwGrBuRBkI6Jjc/edit?usp=sharing))
* Profit!

(You can independently execute the collect and process steps of the script by specifying `--mode collect` or `--mode process`)
Expand All @@ -39,5 +40,3 @@ chmod +x pcs-inspect.py
pip3 install -r requirements.txt
./pcs-inspect.py --customer_name example -u "https://api.prismacloud.io" -a "aaaaaaaa-1111-aaaa-1111-aaaaaaaa1111" -s "ssss1111ssss1111ssss1111="
```

See [example.tab](example.tab) for example output.
Loading

0 comments on commit fd6e2c2

Please sign in to comment.