{"id":19096621,"url":"https://github.com/sapcc/hermescli","last_synced_at":"2025-04-30T14:13:33.759Z","repository":{"id":37559849,"uuid":"186646161","full_name":"sapcc/hermescli","owner":"sapcc","description":"command line client for Hermes Openstack Auditing Service","archived":false,"fork":false,"pushed_at":"2024-04-12T13:14:13.000Z","size":5601,"stargazers_count":6,"open_issues_count":6,"forks_count":2,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-04-14T01:07:22.018Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sapcc.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}},"created_at":"2019-05-14T15:04:03.000Z","updated_at":"2024-04-15T15:23:11.474Z","dependencies_parsed_at":"2024-01-18T17:45:02.464Z","dependency_job_id":"3f67830a-a4e2-49ba-b232-4387b0cff259","html_url":"https://github.com/sapcc/hermescli","commit_stats":{"total_commits":52,"total_committers":7,"mean_commits":7.428571428571429,"dds":0.3076923076923077,"last_synced_commit":"758dd0a99a16c5cc37eb2f2cea88f1de31d8caab"},"previous_names":["sapcc/hermes-ctl"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fhermescli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fhermescli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fhermescli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fhermescli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/hermescli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783447,"owners_count":17201900,"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-09T03:37:16.422Z","updated_at":"2025-04-18T15:34:00.059Z","avatar_url":"https://github.com/sapcc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hermescli\n\n[![GitHub Release](https://img.shields.io/github/v/release/sapcc/hermescli)](https://github.com/sapcc/hermescli/releases/latest)\n[![CI](https://github.com/sapcc/hermescli/actions/workflows/ci.yaml/badge.svg)](https://github.com/sapcc/hermescli/actions/workflows/ci.yaml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/sapcc/hermescli)](https://goreportcard.com/report/github.com/sapcc/hermescli)\n\nHermes CLI is a command line interface for interacting with [Hermes](https://github.com/sapcc/hermes), an OpenStack service for storing and retrieving audit events. It allows users to easily retrieve and display audit events from the service, without the need for manual API calls or a separate client library.\n\n## Installation\n\nWe provide pre-compiled binaries for the [latest release](https://github.com/sapcc/hermescli/releases/latest).\n\nAlternatively, you can build with `make` or install with `make install`. The latter\nunderstands the conventional environment variables for choosing install locations:\n`DESTDIR` and `PREFIX`.\n\n## Commands\n\nHermes CLI offers the following commands:\n\n- `list`: Retrieve a list of audit events\n- `show`: Show details for a specific event\n- `attributes`: List attributes related to audit events\n- `export`: Export events to Swift\n\n## Usage\n\n```sh\nList Hermes events\n\nUsage:\n  hermescli list [flags]\n\nFlags:\n      --action string           filter events by an action\n  -A, --all-projects            include all projects and domains (admin only) (alias for --project-id '*')\n  -h, --help                    help for list\n      --initiator-id string     filter events by an initiator ID\n      --initiator-name string   filter events by an initiator name\n  -l, --limit uint              limit an amount of events in output\n      --outcome string          filter events by an outcome\n      --over-10k-fix            workaround to filter out overlapping events for \u003e 10k total events (default true)\n      --project-id string       filter events by the project or domain ID (admin only)\n  -s, --sort strings            supported sort keys include time, observer_type, target_type, target_id, initiator_type, initiator_id, outcome and action\n                                each sort key may also include a direction suffix\n                                supported directions are \":asc\" for ascending and \":desc\" for descending\n                                can be specified multiple times\n      --source string           filter events by a source\n      --search string           filter events by a full event search\n      --target-id string        filter events by a target ID\n      --target-type string      filter events by a target type\n      --time string             filter events by time\n      --time-end string         filter events till time\n      --time-start string       filter events from time\n\nGlobal Flags:\n  -c, --column strings   an event column to print\n  -d, --debug            print out request and response objects\n  -f, --format string    the output format (default \"table\")\n```\n\n### Example\n\n```sh\n$ hermescli list --time 2019-04-23T22:07:16+0000 --sort time:asc\n+--------------------------------------+--------------------------+-----------------+--------+---------+--------------------------------------+-----------+\n|                  ID                  |           TIME           |     SOURCE      | ACTION | OUTCOME |                TARGET                | INITIATOR |\n+--------------------------------------+--------------------------+-----------------+--------+---------+--------------------------------------+-----------+\n| 1878df7c-d3ec-52d0-8b56-11ad68d25102 | 2019-04-23T22:07:16+0000 | service/network | update | success | network/port                         | neutron   |\n|                                      |                          |                 |        |         | 88c4c917-f5de-43e5-a403-b7c023bfc13d |           |\n+--------------------------------------+--------------------------+-----------------+--------+---------+--------------------------------------+-----------+\n```\n\n## Show\n\n### Usage\n\n```sh\nShow Hermes event\n\nUsage:\n  hermescli show \u003cevent-id\u003e [\u003cevent-id\u003e...] [flags]\n\nFlags:\n  -A, --all-projects        include all projects and domains (admin only) (alias for --project-id '*')\n  -h, --help                help for show\n      --project-id string   show event for the project or domain ID (admin only)\n\nGlobal Flags:\n  -c, --column strings   an event column to print\n  -d, --debug            print out request and response objects\n  -f, --format string    the output format (default \"table\")\n```\n\n### Example\n\n```sh\n$ hermescli show 1878df7c-d3ec-52d0-8b56-11ad68d25102\n+-------------------------+--------------------------------------------------+\n|       KEY               |                      VALUE                       |\n+-------------------------+--------------------------------------------------+\n| ID                      | 1878df7c-d3ec-52d0-8b56-11ad68d25102             |\n| Type                    | activity                                         |\n| Time                    | 2019-04-23T22:07:16+0000                         |\n| Observer                | neutron                                          |\n| TypeURI                 | service/network                                  |\n| Action                  | update                                           |\n| Outcome                 | success                                          |\n| Target                  | network/port                                     |\n|                         | 88c4c917-f5de-43e5-a403-b7c023bfc13d             |\n| Initiator               | neutron                                          |\n| InitiatorDomain         | Default                                          |\n| InitiatorAddress        | 100.65.0.80                                      |\n| InitiatorAgent          | python-neutronclient                             |\n| InitiatorAppCredential  | ee1246022693405e81b4e12fac1111cd                 |\n| RequestPath             | /v2.0/ports/88c4c917-f5de-43e5-a403-b7c023bfc13d |\n+-------------------------+--------------------------------------------------+\n```\n\n## Attributes\n\n### Usage\n\n`hermescli` requires the full set of OpenStack auth environment\nvariables. See [documentation for openstackclient](https://docs.openstack.org/python-openstackclient/latest/cli/man/openstack.html) for details.\n\n```sh\nList Hermes attributes\n\nUsage:\n  hermescli attributes observer_type|target_type|target_id|initiator_type|initiator_id|initiator_name|action|outcome [flags]\n\nFlags:\n  -A, --all-projects        include all projects and domains (admin only) (alias for --project-id '*')\n  -h, --help                help for attributes\n  -l, --limit uint          limit an amount of attributes in output\n      --max-depth uint      limit the level of detail of hierarchical values\n      --project-id string   filter attributes by the project or domain ID (admin only)\n\nGlobal Flags:\n  -c, --column strings   an event column to print\n  -d, --debug            print out request and response objects\n  -f, --format string    the output format (default \"table\")\n```\n\n### Example\n\n```sh\n$ hermescli attributes outcome\nsuccess\nfailure\nunknown\n```\n\n## Export\n\n### Usage\n\n```sh\nExport audit events to Swift storage\n\nUsage:\n  hermescli export [flags]\n\nFlags:\n      --container string       Swift container name (required)\n      --format string         Output format (json|csv|yaml) (default \"json\")\n      --filename string       Name of the output file (default \"hermes-export-{timestamp}\")\n  -l, --limit uint           limit number of events to export (default: 10000)\n      --time string          filter events by time\n      --time-start string    filter events from time\n      --time-end string      filter events till time\n      --action string        filter events by action\n      --outcome string       filter events by outcome\n      --target-id string     filter events by a target ID\n      --target-type string   filter events by a target type\n      --initiator-id string  filter events by an initiator ID\n      --initiator-name string filter events by an initiator name\n      --project-id string    filter events by the project or domain ID (admin only)\n  -A, --all-projects         include all projects and domains (admin only)\n\nGlobal Flags:\n  -d, --debug            print out request and response objects\n  -f, --format string    the output format (default \"table\")\n```\n\n### Examples\n\n```sh\n# Export last week's events to JSON\n$ hermescli export --container audit-exports --time-start \"2024-01-07T00:00:00\" --time-end \"2024-01-14T23:59:59\"\nFetching events...\nFound 857 events to export\nConverting to json format...\nUploading 2.3MB to Swift...\n[==================================] 2.3MB/2.3MB\nSuccessfully exported 857 events\n\n# Export specific events as CSV\n$ hermescli export --container audit-exports --format csv --initiator-name admin --action update\nFetching events...\nFound 124 events to export\nConverting to csv format...\nUploading 0.5MB to Swift...\n[==================================] 0.5MB/0.5MB\nSuccessfully exported 124 events\n```\n\nThe `export` command allows you to export audit events to Swift storage for archival or further processing. Events can be exported in JSON, CSV, or YAML formats. The command supports all filtering options available in the `list` command.\n\nBy default, it will export up to 10,000 events. Use the `--limit` flag to adjust this number. Large exports are automatically handled through Swift's segmented upload feature.\n\n\u003e Note: This command requires Swift storage access in addition to the standard OpenStack authentication environment variables.\n\n## Build\n\n```sh\n$ make\n# or within the docker container\n$ make docker\n```\n\n## Contributions\n\nWe welcome contributions to the Hermes CLI in the form of bug reports, feature requests, and pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fhermescli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Fhermescli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fhermescli/lists"}