{"id":27998084,"url":"https://github.com/alphagov/paas-auditor","last_synced_at":"2025-05-08T22:47:47.313Z","repository":{"id":40385834,"uuid":"184569476","full_name":"alphagov/paas-auditor","owner":"alphagov","description":"Stores Cloud Foundry audit events in a Postgres database","archived":false,"fork":false,"pushed_at":"2025-05-07T09:58:37.000Z","size":20479,"stargazers_count":1,"open_issues_count":8,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-08T22:47:16.758Z","etag":null,"topics":["cloud-foundry","paas","reliability-engineering","security"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alphagov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-05-02T11:30:18.000Z","updated_at":"2025-05-07T09:58:38.000Z","dependencies_parsed_at":"2024-03-11T11:53:08.575Z","dependency_job_id":"46585123-6984-4881-b7da-3e8005bc5485","html_url":"https://github.com/alphagov/paas-auditor","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fpaas-auditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fpaas-auditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fpaas-auditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphagov%2Fpaas-auditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alphagov","download_url":"https://codeload.github.com/alphagov/paas-auditor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253160828,"owners_count":21863624,"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":["cloud-foundry","paas","reliability-engineering","security"],"created_at":"2025-05-08T22:47:42.063Z","updated_at":"2025-05-08T22:47:47.307Z","avatar_url":"https://github.com/alphagov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# paas-auditor\n\n🎵 [`paas-billing` 2: Auditor Boogaloo](https://www.youtube.com/watch?v=4Oy7krobW78) 🎵\n\n## Overview\n\nA Golang application that scrapes Cloud Controller's `/v2/events` endpoint for Audit Events and stores them in a Postgres database.\n\n**To understand how to run this and solve issues, see the [RUNBOOK](RUNBOOK.md).**\n\n## Installation\n\nYou will need:\n\n* `Go v1.20`\n\nTo build the application run the default make target:\n\n```\nmake\n```\n\nYou should then get a binary in `bin/paas-auditor`.\n\n## Configuration\n\n`paas-auditor` takes the following environment variables:\n\n| Variable name | Type | Required | Default | Description |\n|---|---|---|---|---|\n|`APP_ROOT`|string|no|`$PWD`|absolute path to the application source to discover assets at runtime|\n|`DATABASE_URL`|string|yes||Postgres connection string|\n|`CF_API_ADDRESS`|string|yes||Cloud Foundry API endpoint|\n|`CF_CLIENT_ID`|string|yes|| Cloud Foundry client id|\n|`CF_CLIENT_SECRET`|string|yes||Cloud Foundry client secret|\n|`SPLUNK_API_KEY`|string|no||Optional API key for Splunk, if provided it will send events to Splunk HEC|\n|`SPLUNK_HEC_ENDPOINT_URL`|string|no||Optional URL for Splunk, if provided it will send events to Splunk HEC|\n|`DEPLOY_ENV`|string|no||populates the `source` field in Splunk|\n|`PORT_ENV`|string|no||port on which to listen, to serve metrics|\n\n**Note**: in development you can use `CF_USERNAME` and `CF_PASSWORD` instead of `CF_CLIENT_ID` `CF_CLIENT_SECRET` to allow it to log into Cloud Foundry\n\n## Metrics\n\n`paas-auditor` exposes the following metrics via `/metrics`:\n\n| Metric | Description |\n|---|---|\n|`cf_audit_event_collector_collect_duration_total`| Number of seconds spent collecting events by CF Audit Event Collector |\n|`cf_audit_event_collector_errors_total`| Number of errors encountered by CF Audit Event Collector |\n|`cf_audit_event_collector_events_collected_total`| Number of events collected and saved to the DB by CF Audit Event Collector |\n|`cf_audit_events_to_splunk_shipper_errors_total`| Number of errors encountered by CF Audit Events to Splunk shipper |\n|`cf_audit_events_to_splunk_shipper_events_shipped_total`| Number of CF audit events shipped to Splunk by CF Audit Events to Splunk shipper |\n|`cf_audit_events_to_splunk_shipper_latest_event_timestamp`| Unix epoch seconds of most recent event shipped to Splunk |\n|`cf_audit_events_to_splunk_shipper_ship_duration_total`| Number of seconds spent shipping events by CF Audit Events to Splunk Shipper |\n|`informer_cf_audit_events_total`| Number of CF audit events in the database (This number is approximate, and depends on Postgres `reltuples`) |\n|`informer_latest_cf_audit_event_timestamp`| Unix epoch seconds of most recent event in the database |\n\nThe default Go and Prometheus metrics are also exposed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphagov%2Fpaas-auditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphagov%2Fpaas-auditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphagov%2Fpaas-auditor/lists"}