{"id":23054007,"url":"https://github.com/emcecs/ecs-event-collector","last_synced_at":"2025-04-03T04:40:46.090Z","repository":{"id":145105790,"uuid":"76500577","full_name":"EMCECS/ecs-event-collector","owner":"EMCECS","description":"Script to periodically collect audit events from ECS and publish to a bucket or email","archived":false,"fork":false,"pushed_at":"2016-12-27T21:08:24.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-08T18:45:43.265Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/EMCECS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-12-14T22:00:36.000Z","updated_at":"2016-12-14T22:02:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"007b4ac4-4d7c-43fd-a7f7-b01c3dbcad28","html_url":"https://github.com/EMCECS/ecs-event-collector","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/EMCECS%2Fecs-event-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EMCECS%2Fecs-event-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EMCECS%2Fecs-event-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EMCECS%2Fecs-event-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EMCECS","download_url":"https://codeload.github.com/EMCECS/ecs-event-collector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246939177,"owners_count":20857916,"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-12-16T00:32:27.166Z","updated_at":"2025-04-03T04:40:46.068Z","avatar_url":"https://github.com/EMCECS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\nThis project contains a Python script that will run periodically to fetch ECS audit events and email and/or upload them to S3.  By default it will generate a report at 1:00am every day in the local time zone.  Thus, *it's important that the local linux system be in the timezone you would like to generate the report!*\n\n# Configuration\nThe application reads its configuration information from /etc/ecs-event-collector/config.yaml.  This is a standard YAML formatted file that contains the following properties.\n\n## Required\nThe following properties are required:\n\n* hostname: the IP address or hostname of a ECS node or load balancer to connect to and access the management API\n* username: the username to run the commands as.  Should be a \"System Monitor\" user.\n* password: the password for the user.  On first execution, the password will be obfuscated and written back to the file so it's not in plain text.\n\n## Optional\nThe following properties are optional:\n\n* port: The port to connect to for accessing the management APIs.  Defaults to 4443.\n* starttime: the offset from midnight in the local timezone to run in minutes.  Defaults to 60 (i.e. run at 1:00am local time)\n* period: the period in minutes to generate the report for.  Defaults to 1440 (1 day)\n* startoffset: the report generation time offset from starttime.  Defaults to -60 (i.e. report will generate from midnight yesterday to midnight today).\n* format: The output format: JSON, XML, or HTML.  Defaults to HTML.\n* mailto: If specified, a YAML array of email addresses to send the report to.\n* mailserver: If specified, the mail server to use for sending email.  Defaults to localhost.\n* subject: If specified, the subject of the email.  Defaults to `ECS Audit Event Report for yyyy-MM-dd`.\n* s3bucket: If specified, upload the report to the given S3 bucket.\n* s3endpoint: The S3 endpoint to connect to. \n* s3accesskey: The S3 access key (user)\n* s3secretkey: The S3 secret key.  On first execution, the secret key will be obfuscated and written back to the file so it's not in plain text.\n* s3prefix: If specified, the prefix in the bucket to upload the reports to.\n\n# Building\n\n# Running\nThe preferred method is to execute the application as a docker container.  However, it may also be run locally.\n## Docker\nTo execute the application as a Docker container, first create the config file.  When you launch the container, you will then map the parent directory into the docker container as a virtual volume, e.g.\n\n```\n# vi /root/ecs-event-collector/config.yaml\n# docker run -d emccorp/ecs-event-collector -v /root/ecs-event-collector:/etc/ecs-event-collector:rw \n```\n## Locally\n```\n# mkdir /etc/ecs-event-collector\n# vi /root/ecs-event-collector/config.yaml\n# nohup python main.py \u0026\n```\n\n# Sample configuration\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcecs%2Fecs-event-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femcecs%2Fecs-event-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcecs%2Fecs-event-collector/lists"}