Skip to content

amr-cloudforce/k8s-ssh-log-shipper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo creates a HELM package for shpping logs from a remote ssh-server. The logs will become the logs of the Kubernetes container running the shipper. Hence,the logs of the remote server can be viewed with any generic Kubernetes log shipper like fluentd.

The shipper is basically an ssh-client which tails the requested logs from the remote server.

Note: This shipper is a based on a pull approach and does not track the position of the last shipping in the file. If the pod becomes unavailable, the logs will be lost!

Here is how it could look like in an ELK stack in Kibana, as part of the generic shipping of all log files to Elasticsearch.

image

Prerequisites

  • Skaffold
  • Helm
  • (optional) Private Image repo

Quickstart

  • LOGIN username@host
  • YOUR LOGS PATH Path to your log files to be shipped. Can include wildcards
  • PORT SSH PORT
  • SSH KEY Your ssh private key file
  1. create secret generic wp-log-shipper --from-literal logs=<YOUR LOGS PATH> --from-literal login=<LOGIN> --from-literal port=<PORT> -nmonitoring
  2. create secret generic ssh-private-key --from-file id_rsa=<YOUR SSH PRIVATE KEY FILE> -nmonitoring
  3. skaffold dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published