{"id":26234007,"url":"https://github.com/teragrep/dkr_01","last_synced_at":"2026-05-01T03:31:36.107Z","repository":{"id":157101326,"uuid":"632805465","full_name":"teragrep/dkr_01","owner":"teragrep","description":"Docker RELP Logging Driver","archived":false,"fork":false,"pushed_at":"2024-04-19T13:53:00.000Z","size":139,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-19T19:32:52.806Z","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/teragrep.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2023-04-26T07:04:29.000Z","updated_at":"2023-04-27T07:48:30.000Z","dependencies_parsed_at":"2024-04-19T15:11:37.167Z","dependency_job_id":null,"html_url":"https://github.com/teragrep/dkr_01","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/teragrep%2Fdkr_01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fdkr_01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fdkr_01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fdkr_01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teragrep","download_url":"https://codeload.github.com/teragrep/dkr_01/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243318827,"owners_count":20272159,"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-03-13T01:18:29.692Z","updated_at":"2026-05-01T03:31:31.087Z","avatar_url":"https://github.com/teragrep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"= dkr_01\n\nDocker Logging Driver Plugin. Sends the Docker container's logs to the specified RELP server.\n\n== Logging options\nThese can be modified via the `--log-opt KEY=VALUE` command-line argument when using `docker run`.\n\n|===\n|Log option |Description |Default value| Possible values\n\n|relpHostname\n|Set the RELP server's hostname\n|127.0.0.1\n|any IP address\n\n|relpPort\n|Set the RELP server's port\n|1601\n|any valid port\n\n|relpTls\n|Use TLS connection instead of unencrypted to RELP server\n|false\n|true OR false\n\n|syslogHostname\n|Hostname in syslog message\n|Actual hostname\n|any string\n\n|syslogAppName\n|App name in syslog message\n|teragrep\n|any string\n\n|tags\n|View docker info in \"dkr_01@48577\" structured data\n|off\n|off, minimal OR full\n\n|k8sMetadata\n|Enrich syslog message with dkr_01_k8s@48577 structured data containing kubernetes metadata\n|false\n|true OR false\n\n|kubeletUrl\n|URL used to connect to the kubernetes metadata API\n|`https://minikube:10250`\n|any valid URL\n\n|k8sClientAuthEnabled\n|Authenticate the client for Kubernetes metadata\n|true\n|true OR false\n\n|k8sClientAuthCertPath\n|Path for the client.crt file for kubernetes metadata, must be accessible\n from the mount specified in `./plugin/config.json`\n|`/var/lib/minikube/certs/apiserver-kubelet-client.crt`\n|valid path for PEM cert\n\n|k8sClientAuthKeyPath\n|Path for the client.key file for kubernetes metadata, must be accessible\nfrom the mount specified in `./plugin/config.json`\n|`/var/lib/minikube/certs/apiserver-kubelet-client.key`\n|valid path for PEM key\n\n|k8sServerCertValidationEnabled\n|Validate the server certificate\n|false\n|true OR false\n\n|k8sServerCertPath\n|Path for the server certificate, must be accessible\nfrom the mount specified in `./plugin/config.json`\n|(empty)\n|valid path for cert\n\n|k8sMetadataRefreshInterval\n|Metadata refresh interval in seconds, 0 is always.\n|0\n|valid positive integer (\u003e=0)\n\n|k8sMetadataRefreshEnabled\n|Enable data refresh more than once in the beginning\n|false\n|true OR false\n|===\n\n== Building the plugin\n\nIn git root, run:\n[,bash]\n----\n$ chmod +x build.sh \u0026\u0026 bash build.sh\n----\nWill make the plugin and enable it. You can check if it was successful with the `docker plugin ls` command.\nThe plugin's logs can be accessed from the `/run/docker/plugins/\u003cid\u003e/` folder.\n\n== Running the plugin with a container\n\nTo attach the log driver to a container, run the container with the `--log-driver=teragrep/dkr_01:v1` parameter.\n[,bash]\n----\n$ docker run --log-driver=teragrep/dkr_01:v1 \\\n    --log-opt relpHostname=127.0.0.1 \\\n    --log-opt relpPort=1234 \\\n    --log-opt relpTls=false\n----\n\nIf using the `docker-compose` command, you can customize the `docker-compose.yaml` to contain the\n`options`.\n\n[,yaml]\n----\nx-logging:\n    \u0026default-logging\n    options:\n        relpHostname: \"127.0.0.1\"\n        relpPort: \"1601\"\n    driver: teragrep/dkr_01:v1\nservices:\n    test:\n        build:\n            context: .\n            dockerfile: Dockerfile\n        logging: *default-logging\n----\n\n== Using in Minikube\n\nTo build and use the plugin in Minikube, follow the instructions below.\n\n(Note: In the commands below, `[host]$` means that the command should be run in the\nhost machine's terminal, `[minikube]$` means that it should be run in minikube ssh, and\n`[testserver-pod]$` means that it should be run in the pod's terminal.)\n\n* Start your Minikube environment with\n+\n[,bash]\n----\n[host]$ minikube start\n----\n\n* Eval the docker-env to in your host machine's terminal\n+\n[,bash]\n----\n[host]$ eval $(minikube -p minikube docker-env)\n----\n\n* Build the plugin\n+\n[,bash]\n----\n[host]$ chmod +x build.sh \u0026\u0026 bash build.sh\n----\n\n* If necessary, build the test server\n+\n[,bash]\n----\n[host]$ cd testserver \u0026\u0026 docker build . -t testserver:latest --no-cache\n----\n\n* SSH to the minikube\n+\n[,bash]\n----\n[host]$ minikube ssh\n----\n\n* You need to add the log driver into the dockerd launch command in the `docker.service` file\n+\n[,bash]\n----\n[minikube]$ sudo vi /lib/systemd/system/docker.service\n----\n\nChange the line \"ExecStart=\" to contain the `--log-driver=teragrep/dkr_01:v1` option and any possible\nlog opts.\n\n* Reload the daemon, restart docker service and restart kubelet to save these changes.\n+\n[,bash]\n----\n[minikube]$ sudo systemctl daemon-reload\n[minikube]$ sudo service docker restart\n[minikube]$ sudo systemctl restart kubelet\n----\n\n* You can check if the logging driver is functioning with the command below in minikube ssh terminal:\n+\n[,bash]\n----\n[minikube]$ docker info | grep -i \"logging driver\"\n----\n\nIt should display dkr_01 instead of the default jsonfile logging driver, if the plugin\nhas been loaded correctly.\n\nIf you built the test server, you can run it with (in your host machine terminal):\n\n[,bash]\n----\n[host]$ kubectl run dkrpod --image=testserver:latest --image-pull-policy=Never --restart=Never\n----\n\nTo print logs, you can use the pod's terminal and curl\n\n[,bash]\n----\n[host]$ kubectl exec -i -t dkrpod -- /bin/bash\n----\n\nand enter\n\n[,bash]\n----\n[testserver-pod]$ curl localhost:9003/foobar\n----\n\nto generate log output in the testserver pod.\n\n== Contributing\n \n// Change the repository name in the issues link to match with your project's name\n \nYou can involve yourself with our project by https://github.com/teragrep/dkr_01/issues/new/choose[opening an issue] or submitting a pull request.\n \nContribution requirements:\n \n. *All changes must be accompanied by a new or changed test.* If you think testing is not required in your pull request, include a sufficient explanation as why you think so.\n. Security checks must pass\n. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming.\n. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).\n \nRead more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].\n \n=== Contributor License Agreement\n \nContributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories.\n \nYou need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep's repositories. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fdkr_01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteragrep%2Fdkr_01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fdkr_01/lists"}