I am attempting to remake a haproxy filebeat module I did last year manually using the recommended process from https://www.elastic.co/guide/en/beats/devguide/current/filebeat-modules-devguide.html
make create-fileset MODULE={module} FILESET={fileset}
This first step worked fine, but then I tried to use the make create-fields command to generate a fields.yml
make create-fields MODULE={module} FILESET={fileset}
$ make create-fields MODULE=haproxy FILESET=haproxy_log
panic: runtime error: index out of range
goroutine 1 [running]:
main.newField(0xc4200763b1, 0xd, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/z/go/src/github.com/elastic/beats/filebeat/scripts/generator/fields/main.go:80 +0x19a
main.getElementsFromPatterns(0xc420064810, 0x3, 0x3, 0x3, 0xa00005de300, 0x38, 0x38, 0xc420080380)
/home/z/go/src/github.com/elastic/beats/filebeat/scripts/generator/fields/main.go:122 +0xc2
main.(*processors).processFields(0xc420080380, 0x2, 0x4, 0xc420080380, 0x0, 0x0)
/home/z/go/src/github.com/elastic/beats/filebeat/scripts/generator/fields/main.go:175 +0x58
main.(*pipeline).toFieldsYml(0xc4200802c0, 0x0, 0x7ffd11d32291, 0x7, 0x7ffd11d322a3, 0xb, 0xc4200802c0)
/home/z/go/src/github.com/elastic/beats/filebeat/scripts/generator/fields/main.go:282 +0x66
main.main()
/home/z/go/src/github.com/elastic/beats/filebeat/scripts/generator/fields/main.go:327 +0x267
exit status 2
make: *** [create-fields] Error 1
The pipeline.json is pretty straight forward. I am not sure what's going on, it appears to be a []byte array and I think it's related to using the geo_point field type.
Hopefully someone can point me in the right direction.
Thanks
{
"description": "HAProxy Logging",
"on_failure": [
{
"set": {
"field": "haproxy.ingest.error",
"value": "{{ _ingest.on_failure_message }}"
}
}
],
"processors": [
{
"grok": {
"field": "message",
"patterns": [
"%{HAPROXYHTTP}",
"%{HAPROXYTCP}",
"%{SYSLOGTIMESTAMP:syslog_timestamp} %{IPORHOST:syslog_server} %{SYSLOGPROG}: %{IP:client_ip}:%{INT:client_port} \[%{HAPROXYDATE:accept_date}\] %{NOTSPACE:backend_name}/%{NOTSPACE:server_name} %{GREEDYDATA:error}"
]
}
},
{
"geoip": {
"field": "client_ip",
"target_field": "geoip"
}
}
]
}