目的:将脚本运行时的日志打印到ES,通过kibana展示,特别是后台运行时,可知道脚本运行状态。

0.安装logstash并配置

input {
    tcp {
        port => 5044
        codec => "json"
    }
}

output {
  elasticsearch { 
       hosts => ["10.39.40.2:9200","10.39.40.5:9200","10.39.40.6:9200"]
       manage_template => false
       index => "djangologs_%{+YYYY.MM.dd}"
    }
  stdout { codec => rubydebug }
}
python-logstash.conf

相关文章:

  • 2022-01-01
  • 2021-11-24
  • 2021-12-13
  • 2021-06-15
  • 2022-02-16
  • 2021-10-19
猜你喜欢
  • 2021-11-24
  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案