{"id":19427628,"url":"https://github.com/solarwinds/rkubelog","last_synced_at":"2025-04-24T17:31:43.505Z","repository":{"id":38840083,"uuid":"239592531","full_name":"solarwinds/rkubelog","owner":"solarwinds","description":"Send k8s Logs to Papertrail and Loggly Without DaemonSets (for Nodeless Clusters)","archived":false,"fork":false,"pushed_at":"2023-08-09T08:39:10.000Z","size":22558,"stargazers_count":23,"open_issues_count":25,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T09:03:22.594Z","etag":null,"topics":["devtools","kubernetes","logging","logs","syslog"],"latest_commit_sha":null,"homepage":"","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/solarwinds.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-10T19:15:39.000Z","updated_at":"2024-08-06T06:33:57.000Z","dependencies_parsed_at":"2024-06-19T00:12:43.455Z","dependency_job_id":"ddec6886-ca35-44a0-8f82-08ca3b5801a2","html_url":"https://github.com/solarwinds/rkubelog","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarwinds%2Frkubelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarwinds%2Frkubelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarwinds%2Frkubelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarwinds%2Frkubelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solarwinds","download_url":"https://codeload.github.com/solarwinds/rkubelog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250674371,"owners_count":21469214,"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":["devtools","kubernetes","logging","logs","syslog"],"created_at":"2024-11-10T14:12:17.497Z","updated_at":"2025-04-24T17:31:40.861Z","avatar_url":"https://github.com/solarwinds.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rkubelog\n\nrkubelog is the easiest way to get logs out of your k8s cluster and into [Papertrail](https://www.papertrail.com/) and [Loggly](https://www.loggly.com/). Because it doesn't require DaemonSets, sidecars, fluentd or persistent claims, it's one of the only solutions for logging in nodeless clusters, such as EKS on Fargate. But it's also perfect for smaller, local dev clusters to setup logging within seconds.\n\n## Usage\n\n\u003e __Info:__ Make sure to always reference rkubelog versions explicitly in the image. Do not use `latest` tags. The current version is `ghcr.io/solarwinds/rkubelog:\u003cgithub_version\u003e`, where `github_version` is the latest revision listed in [Releases](https://github.com/solarwinds/rkubelog/releases), for example `r17`.\n\nBy default, rkubelog runs in the `kube-system` namespace and will observe all logs from all pods in all namespaces except from itself or any other service in `kube-system`.\n\nTo deploy rkubelog:\n\n- Follow the account setup steps in the _How it Works_ section for the logging service of your choice\n- Preview the deployment using `kubectl apply -k . --dry-run -o yaml`\n- If all looks good, apply the deployment using `kubectl apply -k .`\n\n\nIf you run into issues, please read the _Troubleshooting_ section at the end of this document.\n\n### Static Tags\nWe have recently added the ability to set static tags which will get sent with all the logs. \n\nIf you are using several instances of `rKubeLog`, you can use this `TAGS` field to differentiate between the logs from the different environments.\n\nIf you are interested in using this capability, you can set the value for `TAGS` in the `logging-config-patch.yaml` file. The value can be any string.\n\n\n### Using Papertrail\n\nIn order to ship logs to Papertrail, you will need a Papertrail account. If you don't have one already, you can sign up for one [here](https://www.papertrail.com/). After you are logged in, you will need to create a `Log Destination` from under the `Settings` menu. When a log destination is created, you will be given a host:port combo.\n\nThe Papertrail credentials are automatically pulled from a secret named 'logging-secret'. Before deploying rkubelog, you need to [create a kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/) with that name in the `kube-system` namespace with the following fields:\n\n- `PAPERTRAIL_PROTOCOL` - Acceptable values are udp, tcp, tls. This also depends on the choices that are selected under the `Destination Settings`; by default, a new destination accepts TLS and UDP connections.\n- `PAPERTRAIL_HOST` - Log destination host\n- `PAPERTRAIL_PORT` - Log destination port\n- `LOGGLY_TOKEN` set to `` to disable Loggly\n\nFor any help with Papertrail, please check out their help page [here](https://documentation.solarwinds.com/en/Success_Center/papertrail/Content/papertrail_Documentation.htm).\n\n### Using Loggly\n\nIn order to ship logs to Loggly, you will need a Loggly account. If you don't have one already you can sign up for one [here](https://www.loggly.com/). After you are logged in, you will need to create a `Customer Token` from under the `Source Setup` menu item.\n\nThe Loggly credentials are automatically pulled from a secret named 'logging-secret'. Before deploying rkubelog, you need to [create a kubernetes secret](https://kubernetes.io/docs/concepts/configuration/secret/) with that name in the `kube-system` namespace with the following fields:\n\n- `LOGGLY_TOKEN` - customer token from Loggly (__not__ API token)\n\nAlso add these default values to disable Papertrail logging (following are just samples, please use your account specific values):\n\n- `PAPERTRAIL_PROTOCOL=`\n- `PAPERTRAIL_HOST=`\n- `PAPERTRAIL_PORT=`\n\nFor any help with Loggly, please checkout their help page [here](https://documentation.solarwinds.com/en/Success_Center/loggly/).\n\n\n__Please note:__ If you want to send logs to both Loggly and Papertrail, you can configure both Loggly and Papertrail related values above to valid ones. Most will only want to use one or the other.\n\n## Development\n\n\u003e __Info:__ You only need to reference this section if you plan to contribute to the rkubelog development.\n\nYou will need Go (1.11+) installed on your machine. Then, clone this repo to a suitable location on your machine and `cd` into it. For quick command access the project includes a Makefile.\n\nTo build run:\n```\nmake build\n```\n\nTo run the code:\n```\nbin/rkubelog\n```\n\nYou are free to set the described environment variables or pass run time arguments described above and/or follow [kail usage guide](https://github.com/boz/kail/tree/eb6734178238dc794641e82779855fabc2071e23#usage).\n\nTo run all the static checks:\n```\nmake lint\n```\n\nTo run tests:\n```\nmake tests\n```\n\nTo create a Docker image:\n```\nmake docker\n```\n\n# Troubleshooting\n\n### Logs do not appear in Papertrail/Loggly after deploying rkubelog\n\nIf you deploy rkubelog on nodeless clusters, such as EKS on Fargate, you may not see logs flow immediately. Specifically on EKS on Fargate it may take up to 2 minutes for a pod to be fully deployed, as AWS needs to provision Fargate nodes. You can check the progress using:\n\n```bash\nkubectl get pods -o wide -n kube-system | grep rkubelog\n```\n\n- The \"status\" should be \"Runnig\"\n- The \"node\" column should have a proper value (`fargate-ip-192-168-X-X.us-east-2.compute.internal`)\n- The \"nominated node\" column should be empty\n\nIf all looks good and you still don't see logs in PT/LG, please open an issue.\n\n### Logs suddenly stopped flowing\n\nPlease restart the rkubelog deployment:\n\n```bash\nkubectl scale deployment rkubelog --replicas=0 -n kube-system\nkubectl scale deployment rkubelog --replicas=1 -n kube-system\n```\n\nIf the problem persists, please open an issue.\n\n# Feedback\n\nPlease [open an issue](https://github.com/solarwinds/rkubelog/issues/new), we'd love to hear from you. As a SolarWinds Project, it is supported in a best-effort fashion.\n\n# Security\n\nIf you have identified a security vulnerability, please send an email to infosec@solarwinds.com (monitored 24/7). Please do not open a public issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolarwinds%2Frkubelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolarwinds%2Frkubelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolarwinds%2Frkubelog/lists"}