Inteface conversion in running time error of a custum beat

hi everyone,

I'm working on a beat and I came across an error like this :
2017/08/08 07:46:39.505926 beat.go:267: INFO Home path: [/home/hp/src/] Config path: [/home/hp/src/] Data path: [/home/hp/src/] Logs path: [/home/hp/src/]
2017/08/08 07:46:39.505957 beat.go:177: INFO Setup Beat: hc34; Version: 5.1.3
2017/08/08 07:46:39.506040 logp.go:219: INFO Metrics logging every 30s
2017/08/08 07:46:39.506086 output.go:167: INFO Loading template enabled. Reading template file: /home/hp/src/
2017/08/08 07:46:39.506262 output.go:178: INFO Loading template enabled for Elasticsearch 2.x. Reading template file: /home/hp/src/
2017/08/08 07:46:39.506655 client.go:120: INFO Elasticsearch url: http://localhost:9200
2017/08/08 07:46:39.506691 outputs.go:106: INFO Activated elasticsearch as output plugin.
2017/08/08 07:46:39.506756 publish.go:291: INFO Publisher name: hp-HP-Pavilion-15-Notebook-PC
2017/08/08 07:46:39.507171 async.go:63: INFO Flush Interval set to: 1s
2017/08/08 07:46:39.507188 async.go:64: INFO Max Bulk Size set to: 50
2017/08/08 07:46:39.507793 beat.go:207: INFO hc34 start running.
2017/08/08 07:46:39.507926 hc34.go:98: INFO hc34 is running! Hit CTRL-C to stop it.
2017/08/08 07:46:39.529717 hc34.go:174: INFO Event sent
2017/08/08 07:46:39.529741 hc34.go:107: INFO Event sent
2017/08/08 07:46:40.516641 client.go:652: INFO Connected to Elasticsearch version 5.5.0
2017/08/08 07:46:40.516666 output.go:214: INFO Trying to load template for client: http://localhost:9200
2017/08/08 07:46:40.518197 output.go:235: INFO Template already exists and will not be overwritten.
panic: interface conversion: interface {} is nil, not string

goroutine 39 [running]:, 0xc42018e800, 0x0, 0xc42045ee40, 0x0, 0x0, 0x0)
/home/hp/src/ +0x121, 0xc4201980f8, 0xbfc600, 0xc42018e800, 0x0, 0xc4201a2380, 0x1, 0x32, 0xc42019a2f0, 0x147, ...)
/home/hp/src/ +0xd6*Client).PublishEvents(0xc4201be140, 0xc4201a2380, 0x1, 0x32, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/hp/src/ +0x138*Mode).PublishEvents.func1(0xc4201c6780)
/home/hp/src/ +0x7b*Mode).publish(0xc4201c6780, 0x0, 0x0, 0x7f4e8116de00, 0xc4201afb88, 0xc42046a000, 0x0)
/home/hp/src/ +0x290*Mode).PublishEvents(0xc4201c6780, 0x0, 0x0, 0x0, 0xc4201a2380, 0x1, 0x32, 0x1, 0x1)
/home/hp/src/ +0x7d*elasticsearchOutput).BulkPublish(0xc42019a280, 0x0, 0x0, 0x0, 0xc4201a2380, 0x1, 0x32, 0xc42003ffbe, 0xc42003ff28)
/home/hp/src/ +0x79*outputWorker).sendBulk(0xc4201903c0, 0xc42003fd38, 0xc4201a2380, 0x1, 0x32)
/home/hp/src/ +0x123*outputWorker).onBulk(0xc4201903c0, 0xc42003fd38, 0xc4201a2380, 0x1, 0x32)
/home/hp/src/ +0x281*outputWorker).onMessage(0xc4201903c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4201a2380, 0x1, 0x32)
/home/hp/src/ +0x9a*messageWorker).onEvent(0xc4201903c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4201a2380, 0x1, 0x32)
/home/hp/src/ +0x74*messageWorker).run(0xc4201903c0)
/home/hp/src/ +0x290
created by*messageWorker).init
/home/hp/src/ +0x107

can someone help me please
best regards!

The line reported does not match any lines in 5.5 branch. Which commit ID are you using? Consider updating the vendored beats to most recent 5.5 or 5.6 commit.

The closest possible issue with a potential matching panic is this line (5.4 branch):

This indicates the event["type"] field is missing. With most recent 5.5 branch, this field is not mandatory anymore.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.