https://github.com/rhecosystemappeng/ocp_activity_report
This repo was designed to collect the audit logs of an Openshift deployment and collect some statistics about its usage
https://github.com/rhecosystemappeng/ocp_activity_report
Last synced: about 1 year ago
JSON representation
This repo was designed to collect the audit logs of an Openshift deployment and collect some statistics about its usage
- Host: GitHub
- URL: https://github.com/rhecosystemappeng/ocp_activity_report
- Owner: RHEcosystemAppEng
- Created: 2023-01-11T10:47:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-11T14:29:56.000Z (over 3 years ago)
- Last Synced: 2025-02-15T02:15:23.652Z (over 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Audit: auditor.sh
Awesome Lists containing this project
README
# Openshift Container Platform Activity Reporter
This project generates some usage statistics about the usage of an OCP cluster
collecting and analyzing the available audit logs.
It's important to highlight that the scope of the analysis depends of the
amount of logs stored by the cluster based on its logging operator configuration
## Usage
To obtain the result it's important to follow a few steps
Before continue, ensure yourself that your OC CLI is connected properly to the
cluster that you want to analyze.
### Collecting logs
First of all to collect the logs is required. This will speed up the statistics
analysis and also prevents the OCP's API abuse.
```sh
./auditor.sh -c
```
This will store the available logs at: `logs//`
### Analyzing logs
Once the logs are collected, run the following command:
```sh
./auditor.sh -s
```
**NOTE:** This could take some time, depending of the logs size. Be patient.
### Results
The script creates a folder in `stats//` to store the results of
the analysis. The generated stats files are:
1. JSON file containing the stats values
2. A PNG graph generated with gnuplot about how many actions per user are
registered. Image: `stats//-user.png`
3. A PNG graph generated with gnuplot about how many actions per verb are
registered. Image: `stats//-user.png`
### Getting help
```sh
./auditor.sh -h
#> ./auditor.sh
#> -c: Collects every Audit log
#> -s: Process the collected logs and extract the available stats
#> -h: Prints script's usage
```