CentOS 6.5下安装配置ELK及收集Nginx日志(3)

[root@localhost conf]# cat logstash_server.conf
input {
    redis {
        port => "6379"
        host => "192.168.50.120"
        data_type => "list"
        key => "logstash-redis"
        type => "redis-input"
  }
}
output {
    elasticsearch {
        hosts => "192.168.50.119"
        index => "logstash-%{+YYYY.MM.dd}"
  }
}

9.在Kibanda上创建nginx日志监控视图

CentOS 6.5下安装配置ELK及收集Nginx日志

CentOS 6.5下安装配置ELK及收集Nginx日志

CentOS 6.5下安装配置ELK及收集Nginx日志

es常规操作

es 健康状态
[root@localhost ~]# curl  :9200/_cat/health?v
epoch      timestamp cluster      status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1480345315 23:01:55  elasticsearch yellow          1        1      6  6    0    0        6            0                  -                50.0%
health 的状态包括:green, yellow, red.
列出节点
[root@localhost ~]# curl  :9200/_cat/nodes?v
host          ip            heap.percent ram.percent load node.role master name         
192.168.50.119 192.168.50.119            8          99 0.00 d        *      Blood Brothers
列出索引
[root@localhost ~]# curl  :9200/_cat/indices?v
health status index              pri rep docs.count docs.deleted store.size pri.store.size
yellow open  .kibana              1  1          2            0      5.6kb          5.6kb
yellow open  logstash-2016.11.28  5  1          1            0      4.9kb          4.9kb

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/27f39ec3f354b022dcac1d8aaae51ea6.html