Skip to content

Latest commit

 

History

History
66 lines (60 loc) · 1.27 KB

README.md

File metadata and controls

66 lines (60 loc) · 1.27 KB

Golang utility program for connecting via ssh and streaming log file.

Only password authentication can be used for now.

Usage example

According to config.example.yaml

Create config.yaml with server and project configurations:

servers:
  -
    name: "develop"
    host: "111.222.333.444"
    port: "22"
    username: "username"
    password: "password"

Create project config for your target server:

projects: 
  - 
    name: "projectName"
    filePath: "/var/www/projectName/current/storage/logs/laravel.log"
    server: "develop"

Build

go build tailer.go

Read default number of rows

./tailer projectName

Read N number of rows

./tailer projectName 100

Bastion host example

As usual add bastion and target server configs to servers in config.yaml:

servers:
  -
    name: "bastionServer"
    host: "111.222.333.555"
    port: "22"
    username: "bastionUsername"
    password: "bastionPassword"
  -
    name: "target"
    host: "10.1.1.1"
    port: "22"
    username: "username"
    password: "password"

Create project config for your target server:

projects: 
  -
    name: "bastionProject"
    filePath: "/var/www/bastionProject/current/storage/logs/laravel.log"
    server: "target"
    bastionServer: "bastionServer"