Beats 基础3

2022-02-11 16:32:53 浏览数 (1)

导入索引模板到ES

代码语言:javascript复制
[root@h102 filebeat]# ls
filebeat.template.json  filebeat.yml
[root@h102 filebeat]# curl -XPUT 'http://localhost:9200/_template/filebeat?pretty' -d@/etc/filebeat/filebeat.template.json
{
  "acknowledged" : true
}
[root@h102 filebeat]# echo $?
0
[root@h102 filebeat]# 

运行filebeat

代码语言:javascript复制
[root@h102 filebeat]# /etc/init.d/filebeat start 
Starting filebeat:                                         [  OK  ]
[root@h102 filebeat]# /etc/init.d/filebeat status
filebeat-god (pid  2852) is running...
[root@h102 filebeat]# ps faux | grep filebeat
root      2870  0.0  0.0 103256   828 pts/0    S    21:48   0:00  |       _ grep filebeat
root      2852  0.0  0.0  11388   232 pts/0    Sl   21:47   0:00 filebeat-god -r / -n -p /var/run/filebeat.pid -- /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  0.5  0.6 237664 12920 pts/0    Sl   21:47   0:00  _ /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
[root@h102 filebeat]# 

线程信息

代码语言:javascript复制
[root@h102 filebeat]# ps -Lf 2852
UID        PID  PPID   LWP  C NLWP STIME TTY      STAT   TIME CMD
root      2852     1  2852  0    2 21:47 pts/0    Sl     0:00 filebeat-god -r / -n -p /var/run/filebeat.pid -- /usr/bin/filebeat -c /e
root      2852     1  2854  0    2 21:47 pts/0    Sl     0:00 filebeat-god -r / -n -p /var/run/filebeat.pid -- /usr/bin/filebeat -c /e
[root@h102 filebeat]# ps -Lf 2853
UID        PID  PPID   LWP  C NLWP STIME TTY      STAT   TIME CMD
root      2853  2852  2853  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  2852  2855  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  2852  2856  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  2852  2857  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  2852  2858  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  2852  2859  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  2852  2860  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  2852  2861  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
root      2853  2852  2862  0    9 21:47 pts/0    Sl     0:00 /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
[root@h102 filebeat]# pstree -ap 2852
filebeat-god,2852 -r / -n -p /var/run/filebeat.pid -- /usr/bin/filebeat -c /etc/filebeat/filebeat.yml
  ├─filebeat,2853 -c /etc/filebeat/filebeat.yml
  │   ├─{filebeat},2855
  │   ├─{filebeat},2856
  │   ├─{filebeat},2857
  │   ├─{filebeat},2858
  │   ├─{filebeat},2859
  │   ├─{filebeat},2860
  │   ├─{filebeat},2861
  │   └─{filebeat},2862
  └─{filebeat-god},2854
[root@h102 filebeat]# 

0 人点赞