All Projects → solarwinds → rkubelog

solarwinds / rkubelog

Licence: Apache-2.0 license
Send k8s Logs to Papertrail and Loggly Without DaemonSets (for Nodeless Clusters)

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to rkubelog

narc
Small utility to watch log files and ship to syslog service.
Stars: ✭ 18 (+20%)
Mutual labels:  devtools, logs, syslog
Go Syslog
Blazing fast syslog parser
Stars: ✭ 370 (+2366.67%)
Mutual labels:  logs, syslog
Logvac
Simple, lightweight, api-driven log aggregation service with realtime push capabilities and historical persistence.
Stars: ✭ 61 (+306.67%)
Mutual labels:  devtools, logs
Ekanite
The Syslog server with built-in search
Stars: ✭ 729 (+4760%)
Mutual labels:  logs, syslog
Kail
kubernetes log viewer
Stars: ✭ 1,259 (+8293.33%)
Mutual labels:  devtools, logs
data-prepper
Data Prepper is a component of the OpenSearch project that accepts, filters, transforms, enriches, and routes data at scale.
Stars: ✭ 102 (+580%)
Mutual labels:  logs
pm2-io-apm
PM2.io APM for Node.JS
Stars: ✭ 131 (+773.33%)
Mutual labels:  logs
mclogs
Paste, share and analyse Minecraft logs
Stars: ✭ 100 (+566.67%)
Mutual labels:  logs
Posh-SYSLOG
Send SYSLOG messages from PowerShell
Stars: ✭ 85 (+466.67%)
Mutual labels:  syslog
ex syslogger
ExSyslogger is an Elixir Logger custom backend to syslog.
Stars: ✭ 13 (-13.33%)
Mutual labels:  syslog
nsyslog-parser
Syslog Parser. Accepts RFC 3164 (BSD) and RFC 5424 formats
Stars: ✭ 14 (-6.67%)
Mutual labels:  syslog
vscode-advanced-new-file
Create files anywhere in your workspace from the keyboard
Stars: ✭ 68 (+353.33%)
Mutual labels:  devtools
Log-mailer
Log mailer is a program I made to email log files.
Stars: ✭ 46 (+206.67%)
Mutual labels:  logs
l
Cross-platform html/io [L]ogger with simple API.
Stars: ✭ 26 (+73.33%)
Mutual labels:  logs
terraform-aws-lb-s3-bucket
Terraform module to provision an S3 bucket with built in IAM policy to allow AWS Load Balancers to ship access logs
Stars: ✭ 29 (+93.33%)
Mutual labels:  logs
addon-log-viewer
Log Viewer - Home Assistant Community Add-ons
Stars: ✭ 37 (+146.67%)
Mutual labels:  logs
wurl
WebSocket curl - The WebSocket CLI for developers
Stars: ✭ 21 (+40%)
Mutual labels:  devtools
linkedin connect
Configurable and easy to use LinkedIn tool to automate connections with personalized messages.
Stars: ✭ 58 (+286.67%)
Mutual labels:  devtools
DynaX
动态的工具集合 For .Net Core
Stars: ✭ 16 (+6.67%)
Mutual labels:  logs
hayabusa
Hayabusa (隼) is a sigma-based threat hunting and fast forensics timeline generator for Windows event logs.
Stars: ✭ 908 (+5953.33%)
Mutual labels:  logs

rkubelog

rkubelog is the easiest way to get logs out of your k8s cluster and into Papertrail and Loggly. 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.

Usage

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:<github_version>, where github_version is the latest revision listed in Releases, for example r17.

By 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.

To deploy rkubelog:

  • Follow the account setup steps in the How it Works section for the logging service of your choice
  • Preview the deployment using kubectl apply -k . --dry-run -o yaml
  • If all looks good, apply the deployment using kubectl apply -k .

If you run into issues, please read the Troubleshooting section at the end of this document.

Static Tags

We have recently added the ability to set static tags which will get sent with all the logs.

If you are using several instances of rKubeLog, you can use this TAGS field to differentiate between the logs from the different environments.

If 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.

Using Papertrail

In 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. 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.

The Papertrail credentials are automatically pulled from a secret named 'logging-secret'. Before deploying rkubelog, you need to create a kubernetes secret with that name in the kube-system namespace with the following fields:

  • 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.
  • PAPERTRAIL_HOST - Log destination host
  • PAPERTRAIL_PORT - Log destination port
  • LOGGLY_TOKEN set to `` to disable Loggly

For any help with Papertrail, please check out their help page here.

Using Loggly

In 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. After you are logged in, you will need to create a Customer Token from under the Source Setup menu item.

The Loggly credentials are automatically pulled from a secret named 'logging-secret'. Before deploying rkubelog, you need to create a kubernetes secret with that name in the kube-system namespace with the following fields:

  • LOGGLY_TOKEN - customer token from Loggly (not API token)

Also add these default values to disable Papertrail logging (following are just samples, please use your account specific values):

  • PAPERTRAIL_PROTOCOL=
  • PAPERTRAIL_HOST=
  • PAPERTRAIL_PORT=

For any help with Loggly, please checkout their help page here.

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.

Development

Info: You only need to reference this section if you plan to contribute to the rkubelog development.

You 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.

To build run:

make build

To run the code:

bin/rkubelog

You are free to set the described environment variables or pass run time arguments described above and/or follow kail usage guide.

To run all the static checks:

make lint

To run tests:

make tests

To create a Docker image:

make docker

Troubleshooting

Logs do not appear in Papertrail/Loggly after deploying rkubelog

If 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:

kubectl get pods -o wide -n kube-system | grep rkubelog
  • The "status" should be "Runnig"
  • The "node" column should have a proper value (fargate-ip-192-168-X-X.us-east-2.compute.internal)
  • The "nominated node" column should be empty

If all looks good and you still don't see logs in PT/LG, please open an issue.

Logs suddenly stopped flowing

Please restart the rkubelog deployment:

kubectl scale deployment rkubelog --replicas=0 -n kube-system
kubectl scale deployment rkubelog --replicas=1 -n kube-system

If the problem persists, please open an issue.

Feedback

Please open an issue, we'd love to hear from you. As a SolarWinds Project, it is supported in a best-effort fashion.

Security

If you have identified a security vulnerability, please send an email to [email protected] (monitored 24/7). Please do not open a public issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].