{"id":24452615,"url":"https://github.com/hyperonecom/h1-docker-journal-plugin","last_synced_at":"2025-03-14T06:25:31.849Z","repository":{"id":42102483,"uuid":"207348818","full_name":"hyperonecom/h1-docker-journal-plugin","owner":"hyperonecom","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-24T00:38:59.000Z","size":381,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-21T01:16:05.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/hyperonecom.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}},"created_at":"2019-09-09T16:01:40.000Z","updated_at":"2020-03-24T16:51:25.000Z","dependencies_parsed_at":"2023-01-24T10:30:23.671Z","dependency_job_id":null,"html_url":"https://github.com/hyperonecom/h1-docker-journal-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperonecom%2Fh1-docker-journal-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperonecom%2Fh1-docker-journal-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperonecom%2Fh1-docker-journal-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperonecom%2Fh1-docker-journal-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperonecom","download_url":"https://codeload.github.com/hyperonecom/h1-docker-journal-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243534094,"owners_count":20306460,"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":"2025-01-21T01:16:10.280Z","updated_at":"2025-03-14T06:25:31.828Z","avatar_url":"https://github.com/hyperonecom.png","language":"JavaScript","readme":"# h1-docker-journal-plugin\n\n[![Build Status](https://travis-ci.com/hyperonecom/h1-docker-journal-plugin.svg?branch=master)](https://travis-ci.com/hyperonecom/h1-docker-journal-plugin)\n\nThis Docker plugin extends and expands Docker's logging capabilities so that customers can push their Docker and container logs to [HyperOne Journal](http://www.hyperone.com/services/storage/journal) service.\n\n## Prerequisites\n\n* HyperOne Journal [created in accordance with the documentation](http://www.hyperone.com/services/storage/journal/guides/creating.html),\n* password for the HyperOne resource indicated in the previous item\n\n## Install Docker logging plugin from ```Registry```\n\n1. Download plugin\n\n```bash\ndocker plugin install h1cr.io/h1-docker-logging-plugin\n```\n\n2. Enable plugin\n\n```bash\ndocker plugin enable h1cr.io/h1-docker-logging-plugin\n```\n\n## Install Docker logging plugin from source\n\n1. Clone the repository and check out release branch:\n\n```bash\ncd h1-docker-journal-plugin\ngit checkout release\n```\n\n2. Build the plugin:\n\n```\n$ make build\n```\n\n3. Enable the plugin:\n\n```.env\n$ make install enable\n```\n\n## Usage\n\nConfigure the plugin separately for each container when using the docker run command. For example:\n\n```bash\ndocker run --rm --label x \\\n    --log-driver 'h1cr.io/h1-docker-logging-plugin:latest' \\\n    --log-opt journal-fqdn=5d78e1427fd7e0228fe18f46.journal.pl-waw-1.hyperone.cloud \\\n    --log-opt journal-token=test \\\n    -it alpine id\n```\n\nNow that the plugin is installed and configured, it will send logs while the container is running.\n\n## Tags\n\nEach message has the following tags assigned by default. The user has the ability to define your own tags through optional variables and they take precedence.\n\n### Required variables\n\n* ```journal-fqdn``` – Journal FQDN that will receive logs\n* ```journal-token``` – Credential (password) to journal indicated in the parameter ```journal-fqdn```\n\n### Optional variables\n\n* ```labels``` – comma-separated list of keys of labels used for tagging of logs. Disabled by default.\n* ```env``` – comma-separated list of keys of labels used for tagging of logs.  Disabled by default.\n* ```env-regex``` – A regular expression to match logging-related environment variables. Used for advanced log tag options. If there is collision between the label and env keys, env wins. Disabled by default.\n* ```flush-buffer-size``` –  How many pending messages can be collected before sending to journal immediately. Default: 500\n* ```flush-interval``` –  How long (in miliseconds) the buffer keeps messages before flushing them. Default: 15000\n\n## Development\n\n1. Customize config.json for logging plugin stdout\n\n```.env\n  \"entrypoint\": [\"sh\",\"-c\",\"node /src/index.js \u0026\u003e logs.txt\"],\n```\n\n2. Run following command to access logs:\n\n```bash\nsudo bash -c 'tail -f -n 1000 /var/lib/docker/plugins/*/rootfs/src/logs.txt'\n```\n\n## Release Notes\n\n* 1.0.0 - First version.\n\n## Read also\n\n* https://docs.docker.com/engine/extend/plugins_logging/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperonecom%2Fh1-docker-journal-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperonecom%2Fh1-docker-journal-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperonecom%2Fh1-docker-journal-plugin/lists"}