hariom282538 / graylog-content-pack-haproxy-json

A Content Pack for Graylog2/Graylog3 which supports HTTP Real-Time logging and Monitoring from HAProxy[1.5/1.8].
MIT License
24 stars 15 forks source link

custom index mappings and Elastic 7.x #6

Closed xekhz closed 1 year ago

xekhz commented 2 years ago

With Elastic version 7.x this command

$ curl -X PUT -d @'graylog-custom-mapping.json' -H 'Content-Type: application/json' 'http://localhost:9200/_template/graylog-custom-mapping?pretty' Dosent work anymore for the graylog-custom-mapping.json

{ "template": "graylog_*", "mappings" : { "message" : { "properties" : { "haproxy_Tc" : { "type" : "long" }, "haproxy_Tt" : { "type" : "long" }, "haproxy_Tw" : { "type" : "long" }, "haproxy_bytesRead" : { "type" : "long" } } } } }

It is necessary to remove this line "message" : { And to remove the corresponding curly bracket }

The working graylog-custom-mapping.json is the following

{ "template": "graylog_*", "mappings" : {

        "properties" : {
            "haproxy_Tc" : {
                "type" : "long"
            },
            "haproxy_Tt" : {
                "type" : "long"
            },
            "haproxy_Tw" : {
                "type" : "long"
            },
            "haproxy_bytesRead" : {
                "type" : "long"
            }
        }

}

}

Thanks for your work :)

Info: https://xyzcoder.github.io/elasticsearch/nest/2019/04/12/es-70-and-nest-mapping-error.html

hariom282538 commented 1 year ago

added this info in the readme. Thanks.