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.
- Skaffold
- Helm
- (optional) Private Image repo
- 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
create secret generic wp-log-shipper --from-literal logs=<YOUR LOGS PATH> --from-literal login=<LOGIN> --from-literal port=<PORT> -nmonitoring
create secret generic ssh-private-key --from-file id_rsa=<YOUR SSH PRIVATE KEY FILE> -nmonitoring
skaffold dev