Advertisement
Guest User

logstash template

a guest
Nov 29th, 2017
715
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. PUT _template/logstash
  2. {
  3. "logstash": {
  4. "order": 0,
  5. "version": 50001,
  6. "index_patterns": [
  7. "logstash-*"
  8. ],
  9. "settings": {
  10. "index": {
  11. "refresh_interval": "5s"
  12. }
  13. },
  14. "mappings": {
  15. "_default_": {
  16. "_all": {
  17. "enabled": true,
  18. "norms": false
  19. },
  20. "dynamic_templates": [
  21. {
  22. "message_field": {
  23. "path_match": "message",
  24. "match_mapping_type": "string",
  25. "mapping": {
  26. "type": "text",
  27. "norms": false
  28. }
  29. }
  30. },
  31. {
  32. "string_fields": {
  33. "match": "*",
  34. "match_mapping_type": "string",
  35. "mapping": {
  36. "type": "text",
  37. "norms": false,
  38. "fields": {
  39. "keyword": {
  40. "type": "keyword"
  41. }
  42. }
  43. }
  44. }
  45. }
  46. ],
  47. "properties": {
  48. "@timestamp": {
  49. "type": "date",
  50. "include_in_all": false
  51. },
  52. "@version": {
  53. "type": "keyword",
  54. "include_in_all": false
  55. },
  56. "geoip": {
  57. "dynamic": true,
  58. "properties": {
  59. "ip": {
  60. "type": "ip"
  61. },
  62. "location": {
  63. "type": "geo_point"
  64. },
  65. "latitude": {
  66. "type": "half_float"
  67. },
  68. "longitude": {
  69. "type": "half_float"
  70. }
  71. }
  72. }
  73. }
  74. }
  75. },
  76. "aliases": {}
  77. }
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement