varnishcache-friends / varnishstatbeat

Elastic Beat for Varnish Stats
Other
7 stars 3 forks source link

Beat is outputting data that is not indexable in ElasticSearch #2

Closed fozboz closed 6 years ago

fozboz commented 6 years ago

varnishstatbeat will output these "happy" values for some of our caches, which are out of range numbers. ElasticSearch throws an exception when it tries to index these.

"VBE_boot_somesite_on_somehost_happy": 18446744073709551615

Causes:

[2017-11-08T14:23:21,793][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>"3372065347ac40bf187e4cc22ed6043c218e8bce", :_index=>"varnishstatbeat-2017.11.08", :_type=>"stats", :_routing=>nil}, 2017-11-08T19:23:20.728Z myvarnishhost %{message}], :response=>{"index"=>{"_index"=>"varnishstatbeat-2017.11.08", "_type"=>"stats", "_id"=>"3372065347ac40bf187e4cc22ed6043c218e8bce", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse", "caused_by"=>{"type"=>"illegal_state_exception", "reason"=>"No matching token for number_type [BIG_INTEGER]"}}}}}

phenomenes commented 6 years ago

@fozboz thanks for reporting this, I'll commit a fix tomorrow

phenomenes commented 6 years ago

@fozboz since ES doesn't support large numbers I changed the type of VBE_boot_*_happy to string. You'll have to reindex your data. Let me know if you still have problems.