datadog.json 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. {
  2. "ddsource": "fastly",
  3. "service": "__service__",
  4. "date": "%{begin:%Y-%m-%dT%H:%M:%S%z}t",
  5. "time_start": "%{begin:%Y-%m-%dT%H:%M:%S%Z}t",
  6. "time_end": "%{end:%Y-%m-%dT%H:%M:%S%Z}t",
  7. "http": {
  8. "request_time_ms": %D,
  9. "method": "%m",
  10. "url": "%{json.escape(req.url)}V",
  11. "useragent": "%{User-Agent}i",
  12. "referer": "%{Referer}i",
  13. "protocol": "%H",
  14. "request_x_forwarded_for": "%{X-Forwarded-For}i",
  15. "status_code": "%s"
  16. },
  17. "network": {
  18. "client": {
  19. "ip": "%h",
  20. "name": "%{client.as.name}V",
  21. "number": "%{client.as.number}V",
  22. "connection_speed": "%{client.geo.conn_speed}V"
  23. },
  24. "destination": {
  25. "ip": "%A"
  26. },
  27. "geoip": {
  28. "geo_city": "%{client.geo.city.utf8}V",
  29. "geo_country_code": "%{client.geo.country_code}V",
  30. "geo_continent_code": "%{client.geo.continent_code}V",
  31. "geo_region": "%{client.geo.region}V"
  32. },
  33. "bytes_written": %B,
  34. "bytes_read": %{req.body_bytes_read}V
  35. },
  36. "host":"%{if(req.http.Fastly-Orig-Host, req.http.Fastly-Orig-Host, req.http.Host)}V",
  37. "origin_host": "%v",
  38. "is_ipv6": %{if(req.is_ipv6, "true", "false")}V,
  39. "is_tls": %{if(req.is_ssl, "true", "false")}V,
  40. "tls_client_protocol": "%{json.escape(tls.client.protocol)}V",
  41. "tls_client_servername": "%{json.escape(tls.client.servername)}V",
  42. "tls_client_cipher": "%{json.escape(tls.client.cipher)}V",
  43. "tls_client_cipher_sha": "%{json.escape(tls.client.ciphers_sha)}V",
  44. "tls_client_tlsexts_sha": "%{json.escape(tls.client.tlsexts_sha)}V",
  45. "tls_client_ja3_md5": "%{tls.client.ja3_md5}V",
  46. "is_h2": %{if(fastly_info.is_h2, "true", "false")}V,
  47. "is_h2_push": %{if(fastly_info.h2.is_push, "true", "false")}V,
  48. "h2_stream_id": "%{fastly_info.h2.stream_id}V",
  49. "request_accept_content": "%{Accept}i",
  50. "request_accept_language": "%{Accept-Language}i",
  51. "request_accept_encoding": "%{Accept-Encoding}i",
  52. "request_accept_charset": "%{Accept-Charset}i",
  53. "request_connection": "%{Connection}i",
  54. "request_dnt": "%{DNT}i",
  55. "request_forwarded": "%{Forwarded}i",
  56. "request_via": "%{Via}i",
  57. "request_cache_control": "%{Cache-Control}i",
  58. "request_x_requested_with": "%{X-Requested-With}i",
  59. "request_x_att_device_id": "%{X-ATT-Device-Id}i",
  60. "content_type": "%{Content-Type}o",
  61. "is_cacheable": %{if(fastly_info.state~"^(HIT|MISS)$", "true","false")}V,
  62. "response_age": "%{Age}o",
  63. "response_cache_control": "%{Cache-Control}o",
  64. "response_expires": "%{Expires}o",
  65. "response_last_modified": "%{Last-Modified}o",
  66. "response_tsv": "%{TSV}o",
  67. "server_datacenter": "%{server.datacenter}V",
  68. "req_header_size": %{req.header_bytes_read}V,
  69. "resp_header_size": %{resp.header_bytes_written}V,
  70. "socket_cwnd": %{client.socket.cwnd}V,
  71. "socket_nexthop": "%{client.socket.nexthop}V",
  72. "socket_tcpi_rcv_mss": %{client.socket.tcpi_rcv_mss}V,
  73. "socket_tcpi_snd_mss": %{client.socket.tcpi_snd_mss}V,
  74. "socket_tcpi_rtt": %{client.socket.tcpi_rtt}V,
  75. "socket_tcpi_rttvar": %{client.socket.tcpi_rttvar}V,
  76. "socket_tcpi_rcv_rtt": %{client.socket.tcpi_rcv_rtt}V,
  77. "socket_tcpi_rcv_space": %{client.socket.tcpi_rcv_space}V,
  78. "socket_tcpi_last_data_sent": %{client.socket.tcpi_last_data_sent}V,
  79. "socket_tcpi_total_retrans": %{client.socket.tcpi_total_retrans}V,
  80. "socket_tcpi_delta_retrans": %{client.socket.tcpi_delta_retrans}V,
  81. "socket_ploss": %{client.socket.ploss}V
  82. }