{"id":18291203,"url":"https://github.com/rhecosystemappeng/ocp_activity_report","last_synced_at":"2025-04-09T07:49:45.710Z","repository":{"id":104491866,"uuid":"587687295","full_name":"RHEcosystemAppEng/ocp_activity_report","owner":"RHEcosystemAppEng","description":"This repo was designed to collect the audit logs of an Openshift deployment and collect some statistics about its usage","archived":false,"fork":false,"pushed_at":"2023-01-11T14:29:56.000Z","size":4,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-15T02:15:23.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RHEcosystemAppEng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":"auditor.sh","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-11T10:47:07.000Z","updated_at":"2023-11-07T12:42:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce7e5332-4ed1-4c42-82ec-a454524c5f53","html_url":"https://github.com/RHEcosystemAppEng/ocp_activity_report","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Focp_activity_report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Focp_activity_report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Focp_activity_report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RHEcosystemAppEng%2Focp_activity_report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RHEcosystemAppEng","download_url":"https://codeload.github.com/RHEcosystemAppEng/ocp_activity_report/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999840,"owners_count":21031044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T14:13:30.846Z","updated_at":"2025-04-09T07:49:45.688Z","avatar_url":"https://github.com/RHEcosystemAppEng.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Openshift Container Platform Activity Reporter\n\nThis project generates some usage statistics about the usage of an OCP cluster\ncollecting and analyzing the available audit logs.\n\nIt's important to highlight that the scope of the analysis depends of the\namount of logs stored by the cluster based on its logging operator configuration\n\n## Usage\nTo obtain the result it's important to follow a few steps\n\nBefore continue, ensure yourself that your OC CLI is connected properly to the\ncluster that you want to analyze.\n\n### Collecting logs\nFirst of all to collect the logs is required. This will speed up the statistics\nanalysis and also prevents the OCP's API abuse.\n```sh\n./auditor.sh -c\n```\nThis will store the available logs at: `logs/\u003cCLUSTER_DOMAIN\u003e/`\n\n\n### Analyzing logs\nOnce the logs are collected, run the following command:\n```sh\n./auditor.sh -s\n```\n**NOTE:** This could take some time, depending of the logs size. Be patient.\n\n\n### Results\nThe script creates a folder in `stats/\u003cCLUSTER_DOMAIN\u003e/` to store the results of\nthe analysis. The generated stats files are:\n1. JSON file containing the stats values\n2. A PNG graph generated with gnuplot about how many actions per user are\n   registered. Image: `stats/\u003cCLUSTER_DOMAIN\u003e/\u003cCLUSTER_DOMAIN\u003e-user.png`\n3. A PNG graph generated with gnuplot about how many actions per verb are\n   registered. Image: `stats/\u003cCLUSTER_DOMAIN\u003e/\u003cCLUSTER_DOMAIN\u003e-user.png`\n\n\n### Getting help\n```sh\n./auditor.sh -h\n#\u003e ./auditor.sh\n#\u003e   -c: Collects every Audit log\n#\u003e   -s: Process the collected logs and extract the available stats\n#\u003e   -h: Prints script's usage\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhecosystemappeng%2Focp_activity_report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhecosystemappeng%2Focp_activity_report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhecosystemappeng%2Focp_activity_report/lists"}