i picked up the library from here -https://beats-nightlies.s3.amazonaws.com/index.html?prefix=jenkins/filebeat/715-32446edc97bbfe933b1539a473e82a8b4a3a6942/
while running the svcadm i see the following exceptions in the SMF logs -
goroutine 11 [running]:
panic(0xa2cec0, 0xc820010090)
/home/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/1.6/src/runtime/panic.go:464 +0x3ef
github.com/elastic/beats/libbeat/outputs/logstash.(*logstash).Close(0xc8201a66a0, 0x0, 0x0)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/outputs/logstash/logstash.go:158 +0x3f
github.com/elastic/beats/libbeat/publisher.(*outputWorker).onStop(0xc82007d4f0)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/publisher/output.go:60 +0x48
github.com/elastic/beats/libbeat/publisher.(*messageWorker).shutdown(0xc82007d4f0)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/publisher/worker.go:75 +0x3a
panic(0xa2cec0, 0xc820010090)
/home/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/1.6/src/runtime/panic.go:426 +0x4f2
github.com/elastic/beats/libbeat/outputs/logstash.(*logstash).BulkPublish(0xc8201a66a0, 0xfffffd7ffee908c0, 0xc820502588, 0x1, 0xc82022e000, 0x7e8, 0x800, 0x0, 0x0)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/outputs/logstash/logstash.go:179 +0x8d
github.com/elastic/beats/libbeat/publisher.(*outputWorker).sendBulk(0xc82007d4f0, 0xc820058d28, 0xc82022e000, 0x7e8, 0x800)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/publisher/output.go:111 +0x190
github.com/elastic/beats/libbeat/publisher.(*outputWorker).onBulk(0xc82007d4f0, 0xc820058d28, 0xc82022e000, 0x7e8, 0x800)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/publisher/output.go:87 +0x39f
github.com/elastic/beats/libbeat/publisher.(*outputWorker).onMessage(0xc82007d4f0, 0xc8202dc1c0, 0x101, 0xfffffd7ffee908c0, 0xc820502588, 0x0, 0xc82022e000, 0x7e8, 0x800)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/publisher/output.go:70 +0x85
github.com/elastic/beats/libbeat/publisher.(*messageWorker).onEvent(0xc82007d4f0, 0xc8202dc1c0, 0x101, 0xfffffd7ffee908c0, 0xc820502588, 0x0, 0xc82022e000, 0x7e8, 0x800)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/publisher/worker.go:83 +0x62
github.com/elastic/beats/libbeat/publisher.(*messageWorker).run(0xc82007d4f0)
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/publisher/worker.go:69 +0x1e2
created by github.com/elastic/beats/libbeat/publisher.(*messageWorker).init
/home/jenkins/workspace/Filebeat/src/github.com/elastic/beats/libbeat/publisher/worker.go:57 +0x11e
[ Aug 11 05:59:17 Stopping because service exited with an error. ]
[ Aug 11 05:59:17 Executing start method ("/opt/gl-filebeat/bin/filebeat-solaris-amd64 -c /opt/gl-filebeat/bin/filebeat.yml"). ]
config test looks good -
opt/gl-filebeat/bin/filebeat-solaris-amd64 -c /opt/gl-filebeat/bin/filebeat.yml -e -configtest
2016/08/11 05:49:13.300095 beat.go:263: INFO Home path: [/opt/gl-filebeat/bin] Config path: [/opt/gl-filebeat/bin] Data path: [/opt/gl-filebeat/bin/data] Logs path: [/opt/gl-filebeat/bin/logs]
2016/08/11 05:49:13.300161 logp.go:210: INFO Metrics logging every 30s
2016/08/11 05:49:13.300255 beat.go:174: INFO Setup Beat: filebeat; Version: 5.0.0-alpha5-git32446ed
2016/08/11 05:49:13.300400 logstash.go:96: INFO Max Retries set to: 3
2016/08/11 05:49:13.300457 outputs.go:87: INFO Activated logstash as output plugin.
2016/08/11 05:49:13.300667 publish.go:301: INFO Publisher name: app1.stg0
2016/08/11 05:49:13.300704 async.go:63: INFO Flush Interval set to: 1s
2016/08/11 05:49:13.300720 async.go:64: INFO Max Bulk Size set to: 2048
Config OK
my configuration file -
filebeat:
registry_file: /opt/gl-filebeat/.gl-filebeat-registry
spool_size: 2048
prospectors:
-
paths:
- /var/svc/log/application.log
input_type: log
ignore_older: 1h
max_bytes: 2097152
fields:
ENV:_ENV_
PLATFORM: _PLATFORM_
ASSEMBLY: ${hostname}
IPv4: __IP__
fields_under_root: false
# Setting tail_files to true means filebeat starts readding new files at the end
# instead of the beginning. If this is used in combination with log rotation
# this can mean that the first entries of a new file are skipped.
tail_files: true
multiline:
pattern: "^[[:space:]]+(at|...)|^Caused by:"
negate: false
match: after
output:
logstash:
hosts: [_SERVER_HOST]
# worker: 2
# max_retries: -1
# bulk_max_size: 2048
logging:
level: info
to_files: true
to_syslog: false
files:
path: /var/log/filebeat
name: filebeat.log
keepfiles: 7