Public | Automated Build

Last pushed: a year ago
Short Description
Push my personal website's logs to Loggly
Full Description

项目目的

将我个人网站运行的全部log通过Logstash推送到Loggly日志服务,监控网站的运行情况。

Logstash配置文件说明

input {
   file {
      path => [ "/var/log/api/*.all.log" ]  // 监控的日志文件
      start_position => beginning
   }
}
filter {
   mutate {
      add_field => [ "timestamp", "%{@timestamp}" ]
   }
}
output {
   loggly {
      key => "d7e5b72a-b68c-4a1b-befc-b703205a8f27"  // Loggly的Customer Token
      tag => "logstash"
      host => "logs-01.loggly.com"
      proto => "https"
   }
}

Loggly的Customer Token可在Loggly "Source Setup"的"Customer Tokens"中找到。

Docker Pull Command
Owner
winkey
Source Repository

Comments (0)