Guest User

Filebeat ConfigTest

a guest
Jul 9th, 2017
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.01 KB | None | 0 0
  1. [root@ip-192-168-1-61 bin]# uname -a
  2. Linux ip-192-168-1-61.ec2.internal 3.10.0-514.21.2.el7.x86_64 #1 SMP Sun May 28 17:08:21 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
  3. [root@ip-192-168-1-61 bin]# sudo filebeat.sh -e -d "*" -configtest
  4. filebeat2017/07/09 10:26:04.378843 beat.go:339: CRIT Exiting: error loading config file: yaml: line 11: found a tab character that violate indentation
  5. Exiting: error loading config file: yaml: line 11: found a tab character that violate indentation
  6. [root@ip-192-168-1-61 bin]# sudo cat /etc/filebeat/filebeat.yml
  7. filebeat:
  8.   prospectors:
  9.     -
  10.       paths:
  11.         - /var/log/*.json
  12.       #  - /var/log/messages
  13.       #  - /var/log/*.log
  14.  
  15.       input_type: log
  16.  
  17.       document_type: syslog
  18.         json.keys_under_root: true
  19.         json.add_error_key: true
  20.  
  21.  
  22.   registry_file: /var/lib/filebeat/registry
  23.  
  24. output:
  25.   logstash:
  26.     hosts: ["192.168.1.61:5044"]
  27.     bulk_max_size: 1024
  28.  
  29.     tls:
  30.       certificate_authorities: ["/etc/pki/tls/certs/logstash-forwarder.crt"]
  31.  
  32. shipper:
  33.  
  34. logging:
  35.   files:
  36.     rotateeverybytes: 10485760 # = 10MB
  37. [root@ip-192-168-1-61 bin]# ps -ef | grep filebeat
  38. root     20029 18810  0 06:26 pts/0    00:00:00 grep --color=auto filebeat
  39. [root@ip-192-168-1-61 bin]# sudo systemctl status filebeat.service
  40. ● filebeat.service - filebeat
  41.    Loaded: loaded (/usr/lib/systemd/system/filebeat.service; enabled; vendor preset: disabled)
  42.    Active: failed (Result: start-limit) since Sun 2017-07-09 06:25:47 EDT; 1min 2s ago
  43.      Docs: https://www.elastic.co/guide/en/beats/filebeat/current/index.html
  44.   Process: 19867 ExecStart=/usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat (code=exited, status=1/FAILURE)
  45.  Main PID: 19867 (code=exited, status=1/FAILURE)
  46.  
  47. Jul 09 06:25:46 ip-192-168-1-61.ec2.internal systemd[1]: filebeat.service: main process exited, code=exited, status=1/FAILURE
  48. Jul 09 06:25:46 ip-192-168-1-61.ec2.internal systemd[1]: Unit filebeat.service entered failed state.
  49. Jul 09 06:25:46 ip-192-168-1-61.ec2.internal systemd[1]: filebeat.service failed.
  50. Jul 09 06:25:47 ip-192-168-1-61.ec2.internal systemd[1]: filebeat.service holdoff time over, scheduling restart.
  51. Jul 09 06:25:47 ip-192-168-1-61.ec2.internal systemd[1]: start request repeated too quickly for filebeat.service
  52. Jul 09 06:25:47 ip-192-168-1-61.ec2.internal systemd[1]: Failed to start filebeat.
  53. Jul 09 06:25:47 ip-192-168-1-61.ec2.internal systemd[1]: Unit filebeat.service entered failed state.
  54. Jul 09 06:25:47 ip-192-168-1-61.ec2.internal systemd[1]: filebeat.service failed.
  55. [root@ip-192-168-1-61 bin]# sudo systemctl stop filebeat.service
  56. [root@ip-192-168-1-61 bin]# sudo rm /var/lib/filebeat/registry
  57. [root@ip-192-168-1-61 bin]# sudo filebeat.sh -e
  58. filebeat2017/07/09 10:27:27.196040 beat.go:339: CRIT Exiting: error loading config file: yaml: line 11: found a tab character that violate indentation
  59. Exiting: error loading config file: yaml: line 11: found a tab character that violate indentation
  60. [root@ip-192-168-1-61 bin]# sudo systemctl start filebeat.service
  61. [root@ip-192-168-1-61 bin]# sudo systemctl status filebeat.service
  62. ● filebeat.service - filebeat
  63.    Loaded: loaded (/usr/lib/systemd/system/filebeat.service; enabled; vendor preset: disabled)
  64.    Active: failed (Result: start-limit) since Sun 2017-07-09 06:27:39 EDT; 4s ago
  65.      Docs: https://www.elastic.co/guide/en/beats/filebeat/current/index.html
  66.   Process: 20220 ExecStart=/usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat (code=exited, status=1/FAILURE)
  67.  Main PID: 20220 (code=exited, status=1/FAILURE)
  68.  
  69. Jul 09 06:27:38 ip-192-168-1-61.ec2.internal systemd[1]: filebeat.service: main process exited, code=exited, status=1/FAILURE
  70. Jul 09 06:27:38 ip-192-168-1-61.ec2.internal systemd[1]: Unit filebeat.service entered failed state.
  71. Jul 09 06:27:38 ip-192-168-1-61.ec2.internal systemd[1]: filebeat.service failed.
  72. Jul 09 06:27:39 ip-192-168-1-61.ec2.internal systemd[1]: filebeat.service holdoff time over, scheduling restart.
  73. Jul 09 06:27:39 ip-192-168-1-61.ec2.internal systemd[1]: start request repeated too quickly for filebeat.service
  74. Jul 09 06:27:39 ip-192-168-1-61.ec2.internal systemd[1]: Failed to start filebeat.
  75. Jul 09 06:27:39 ip-192-168-1-61.ec2.internal systemd[1]: Unit filebeat.service entered failed state.
  76. Jul 09 06:27:39 ip-192-168-1-61.ec2.internal systemd[1]: filebeat.service failed.
  77. [root@ip-192-168-1-61 bin]# tail -100 /var/log/filebeat/filebeat
  78. 2017-07-09T06:22:58-04:00 INFO Setup Beat: filebeat; Version: 5.4.3
  79. 2017-07-09T06:22:58-04:00 INFO Max Retries set to: 3
  80. 2017-07-09T06:22:58-04:00 INFO Activated logstash as output plugin.
  81. 2017-07-09T06:22:58-04:00 INFO Publisher name: ip-192-168-1-61.ec2.internal
  82. 2017-07-09T06:22:58-04:00 INFO Flush Interval set to: 1s
  83. 2017-07-09T06:22:58-04:00 INFO Max Bulk Size set to: 1024
  84. [root@ip-192-168-1-61 bin]#
Add Comment
Please, Sign In to add comment