esql-getting-started-sample-data.asciidoc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // tag::own-deployment[]
  2. First ingest some sample data. In {kib}, open the main menu and select *Dev
  3. Tools*. Run the following two requests:
  4. [source,console]
  5. ----
  6. PUT sample_data
  7. {
  8. "mappings": {
  9. "properties": {
  10. "client_ip": {
  11. "type": "ip"
  12. },
  13. "message": {
  14. "type": "keyword"
  15. }
  16. }
  17. }
  18. }
  19. PUT sample_data/_bulk
  20. {"index": {}}
  21. {"@timestamp": "2023-10-23T12:15:03.360Z", "client_ip": "172.21.2.162", "message": "Connected to 10.1.0.3", "event_duration": 3450233}
  22. {"index": {}}
  23. {"@timestamp": "2023-10-23T12:27:28.948Z", "client_ip": "172.21.2.113", "message": "Connected to 10.1.0.2", "event_duration": 2764889}
  24. {"index": {}}
  25. {"@timestamp": "2023-10-23T13:33:34.937Z", "client_ip": "172.21.0.5", "message": "Disconnected", "event_duration": 1232382}
  26. {"index": {}}
  27. {"@timestamp": "2023-10-23T13:51:54.732Z", "client_ip": "172.21.3.15", "message": "Connection error", "event_duration": 725448}
  28. {"index": {}}
  29. {"@timestamp": "2023-10-23T13:52:55.015Z", "client_ip": "172.21.3.15", "message": "Connection error", "event_duration": 8268153}
  30. {"index": {}}
  31. {"@timestamp": "2023-10-23T13:53:55.832Z", "client_ip": "172.21.3.15", "message": "Connection error", "event_duration": 5033755}
  32. {"index": {}}
  33. {"@timestamp": "2023-10-23T13:55:01.543Z", "client_ip": "172.21.3.15", "message": "Connected to 10.1.0.1", "event_duration": 1756467}
  34. ----
  35. // end::own-deployment[]
  36. // tag::demo-env[]
  37. The data set used in this guide has been preloaded into the Elastic {esql}
  38. public demo environment. Visit
  39. https://ela.st/ql[ela.st/ql] to start using it.
  40. // end::demo-env[]