Skip to content

Instantly share code, notes, and snippets.

@cyrille-leclerc
Last active November 28, 2020 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyrille-leclerc/81deca4852df7754246b70d4a01bb9b0 to your computer and use it in GitHub Desktop.
Save cyrille-leclerc/81deca4852df7754246b70d4a01bb9b0 to your computer and use it in GitHub Desktop.
ECS RFC Service Environment Field
{
"_index": "apm-7.10.0-transaction-000001",
"_type": "_doc",
"_id": "8tlyD3YBKOouY3Ui1sED",
"_version": 1,
"_score": null,
"_source": {
"parent": {
"id": "50e5b6e4d0c21e1f"
},
"agent": {
"name": "java",
"ephemeral_id": "d51f6df7-d402-4b2b-aaef-a12f8c0d9275",
"version": "1.19.0"
},
"process": {
"pid": 4146,
"title": "/Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Home/bin/java",
"ppid": 3858
},
"source": {
"ip": "127.0.0.1"
},
"processor": {
"name": "transaction",
"event": "transaction"
},
"url": {
"path": "/api/orders",
"scheme": "http",
"port": 8080,
"domain": "localhost",
"full": "http://localhost:8080/api/orders"
},
"labels": {
"shippingCountry": "FR",
"customerId": "customer-44",
"orderPrice": 10,
"orderPriceRange": "medium"
},
"observer": {
"hostname": "cyrillerclaptop.localdomain",
"id": "c6806dda-7615-4d01-bc3f-aeb7ca9aa2f2",
"ephemeral_id": "4ee2dd58-53c8-4cbc-a0d0-adf0cbebeac3",
"type": "apm-server",
"version": "7.10.0",
"version_major": 7
},
"trace": {
"id": "3a459e8ad856bda6a91cfc32a0660755"
},
"@timestamp": "2020-11-28T15:22:23.302Z",
"ecs": {
"version": "1.6.0"
},
"service": {
"node": {
"name": "cyrillerclaptop.localdomain"
},
"environment": "staging",
"framework": {
"name": "Spring Web MVC",
"version": "5.3.1"
},
"name": "frontend",
"runtime": {
"name": "Java",
"version": "15"
},
"language": {
"name": "Java",
"version": "15"
},
"version": "1.0-SNAPSHOT"
},
"host": {
"hostname": "cyrillerclaptop.localdomain",
"os": {
"platform": "Mac OS X"
},
"ip": "127.0.0.1",
"name": "cyrillerclaptop.localdomain",
"architecture": "x86_64"
},
"client": {
"ip": "127.0.0.1"
},
"http": {
"request": {
"headers": {
"Accept": [
"application/json"
],
"User-Agent": [
"Java/15"
],
"Connection": [
"keep-alive"
],
"Host": [
"localhost:8080"
],
"Content-Length": [
"126"
],
"Elastic-Apm-Traceparent": [
"00-3a459e8ad856bda6a91cfc32a0660755-50e5b6e4d0c21e1f-01"
],
"Tracestate": [
"es=s:1.0"
],
"Traceparent": [
"00-3a459e8ad856bda6a91cfc32a0660755-50e5b6e4d0c21e1f-01"
],
"Content-Type": [
"application/json"
]
},
"method": "POST",
"socket": {
"encrypted": false,
"remote_address": "127.0.0.1"
},
"body": {
"original": "[REDACTED]"
}
},
"response": {
"headers": {
"Transfer-Encoding": [
"chunked"
],
"Keep-Alive": [
"timeout=60"
],
"Connection": [
"keep-alive"
],
"Date": [
"Sat, 28 Nov 2020 15:22:23 GMT"
],
"Content-Type": [
"application/json"
],
"Location": [
"http://localhost:8080/orders/2508117"
]
},
"status_code": 201,
"finished": true,
"headers_sent": true
},
"version": "1.1"
},
"event": {
"ingested": "2020-11-28T15:22:32.815675Z",
"outcome": "success"
},
"transaction": {
"duration": {
"us": 137438
},
"result": "HTTP 2xx",
"name": "createOrder",
"id": "f30465df84fbfe0d",
"span_count": {
"dropped": 0,
"started": 4
},
"type": "request",
"sampled": true
},
"user_agent": {
"original": "Java/15",
"name": "Other",
"device": {
"name": "Spider"
}
},
"timestamp": {
"us": 1606576943302021
}
},
"fields": {
"event.ingested": [
"2020-11-28T15:22:32.815Z"
],
"@timestamp": [
"2020-11-28T15:22:23.302Z"
]
},
"highlight": {
"transaction.id": [
"@kibana-highlighted-field@f30465df84fbfe0d@/kibana-highlighted-field@"
],
"trace.id": [
"@kibana-highlighted-field@3a459e8ad856bda6a91cfc32a0660755@/kibana-highlighted-field@"
],
"processor.event": [
"@kibana-highlighted-field@transaction@/kibana-highlighted-field@"
]
},
"sort": [
1606576943302
]
}
{
"_index": "filebeat-7.10.0-2020.11.24-000001",
"_type": "_doc",
"_id": "2duDD3YBKOouY3UiPCLK",
"_version": 1,
"_score": null,
"_source": {
"@timestamp": "2020-11-28T15:40:26.178Z",
"event.dataset": "frontend.log",
"service.name": "frontend",
"trace.id": "080e218993ca8b2916d8cc9bc9b38bc3",
"message": "SUCCESS createOrder([OrderController.OrderForm@55b8d300list[[OrderProductDto@39448661 product = [Product@29587cf7 id = 4, name = 'Icecream', price = 5.0], quantity = 1]]]): price: 5.0, id:2509373",
"input": {
"type": "log"
},
"agent": {
"ephemeral_id": "5ed8bef0-c4fd-45b7-b4f8-7204ebd62673",
"id": "e1d83b8a-38df-4a55-be4c-9dc4dea879cd",
"name": "cyrillerclaptop.localdomain",
"type": "filebeat",
"version": "7.10.0",
"hostname": "cyrillerclaptop.localdomain"
},
"log.logger": "com.mycompany.ecommerce.controller.OrderController",
"host": {
"id": "04A12D9F-C409-5352-B238-99EA58CAC285",
"ip": [
"fe80::aede:48ff:fe00:1122",
"fe80::4ba:20ea:4390:8ff1",
"192.168.1.46",
"fe80::f09a:f4ff:fec1:fc98",
"fe80::f09a:f4ff:fec1:fc98",
"fe80::b1db:f8e1:58f0:708c",
"fe80::7a0c:f971:b7a4:3221"
],
"name": "cyrillerclaptop.localdomain",
"mac": [
"ac:de:48:00:11:22",
"fa:ff:c2:4e:d1:b1",
"f8:ff:c2:4e:d1:b1",
"82:bf:e9:40:48:04",
"82:bf:e9:40:48:01",
"82:bf:e9:40:48:00",
"82:bf:e9:40:48:05",
"82:bf:e9:40:48:01",
"0a:ff:c2:4e:d1:b1",
"f2:9a:f4:c1:fc:98",
"f2:9a:f4:c1:fc:98"
],
"hostname": "cyrillerclaptop.localdomain",
"architecture": "x86_64",
"os": {
"build": "19H15",
"platform": "darwin",
"version": "10.15.7",
"family": "darwin",
"name": "Mac OS X",
"kernel": "19.6.0"
}
},
"log.level": "INFO",
"process.thread.name": "http-nio-8080-exec-3",
"ecs": {
"version": "1.6.0"
},
"log": {
"offset": 723684,
"file": {
"path": "/usr/local/var/log/my-shopping-cart/frontend.log"
}
},
"transaction.id": "35ae1269d6449d2b",
"fields": {
"env": "staging"
}
},
"fields": {
"@timestamp": [
"2020-11-28T15:40:26.178Z"
],
"suricata.eve.timestamp": [
"2020-11-28T15:40:26.178Z"
]
},
"sort": [
1606578026178
]
}
{
"_index": "heartbeat-7.10.0-2020.11.24-000001",
"_type": "_doc",
"_id": "J9uAD3YBKOouY3UiDwhY",
"_version": 1,
"_score": null,
"_source": {
"@timestamp": "2020-11-28T15:36:58.475Z",
"monitor": {
"check_group": "8a44a150-318f-11eb-a924-acde48001122",
"ip": "127.0.0.1",
"status": "up",
"duration": {
"us": 2156
},
"id": "frontend-check",
"name": "Frontend",
"type": "http",
"timespan": {
"gte": "2020-11-28T15:36:58.475Z",
"lt": "2020-11-28T15:37:03.475Z"
}
},
"url": {
"domain": "localhost",
"port": 8080,
"path": "/actuator/health",
"full": "http://localhost:8080/actuator/health",
"scheme": "http"
},
"service": {
"name": "frontend"
},
"summary": {
"up": 1,
"down": 0
},
"tcp": {
"rtt": {
"connect": {
"us": 329
}
}
},
"observer": {
"ip": [
"fe80::aede:48ff:fe00:1122",
"fe80::4ba:20ea:4390:8ff1",
"192.168.1.46",
"fe80::f09a:f4ff:fec1:fc98",
"fe80::f09a:f4ff:fec1:fc98",
"fe80::b1db:f8e1:58f0:708c",
"fe80::7a0c:f971:b7a4:3221"
],
"mac": [
"ac:de:48:00:11:22",
"fa:ff:c2:4e:d1:b1",
"f8:ff:c2:4e:d1:b1",
"82:bf:e9:40:48:04",
"82:bf:e9:40:48:01",
"82:bf:e9:40:48:00",
"82:bf:e9:40:48:05",
"82:bf:e9:40:48:01",
"0a:ff:c2:4e:d1:b1",
"f2:9a:f4:c1:fc:98",
"f2:9a:f4:c1:fc:98"
],
"hostname": "cyrillerclaptop.localdomain"
},
"http": {
"response": {
"status_code": 200,
"body": {
"bytes": 15,
"hash": "647a83cca85203d6d4eb07eea84ef6eb91d5c6482eaff2ac8bb65a342b9f2946"
},
"headers": {
"Content-Type": "application/vnd.spring-boot.actuator.v3+json",
"Date": "Sat, 28 Nov 2020 15:36:57 GMT"
}
},
"rtt": {
"response_header": {
"us": 1085
},
"validate": {
"us": 1193
},
"content": {
"us": 107
},
"total": {
"us": 1575
},
"write_request": {
"us": 29
}
}
},
"event": {
"dataset": "uptime"
},
"fields": {
"env": "staging"
},
"ecs": {
"version": "1.6.0"
},
"agent": {
"id": "0206f8b8-72eb-449f-bf7b-4307158e773a",
"name": "cyrillerclaptop.localdomain",
"type": "heartbeat",
"version": "7.10.0",
"hostname": "cyrillerclaptop.localdomain",
"ephemeral_id": "bde9066e-cb8d-46e3-b5f6-5525e430792e"
},
"resolve": {
"rtt": {
"us": 548
},
"ip": "127.0.0.1"
}
},
"fields": {
"@timestamp": [
"2020-11-28T15:36:58.475Z"
]
},
"sort": [
1606577818475
]
}
{
"_index": "metricbeat-7.10.0-2020.11.24-000001",
"_type": "_doc",
"_id": "vNuID3YBKOouY3UivU-d",
"_version": 1,
"_score": null,
"_source": {
"@timestamp": "2020-11-28T15:46:24.391Z",
"metricset": {
"name": "collector",
"period": 10000
},
"service": {
"address": "http://localhost:8080/actuator/prometheus",
"type": "prometheus"
},
"fields": {
"env": "staging"
},
"agent": {
"type": "metricbeat",
"version": "7.10.0",
"hostname": "cyrillerclaptop.localdomain",
"ephemeral_id": "d4d682a8-6944-42cb-9273-87e07b620643",
"id": "4acf759f-74b0-4198-80e2-94f705511512",
"name": "cyrillerclaptop.localdomain"
},
"ecs": {
"version": "1.6.0"
},
"host": {
"os": {
"kernel": "19.6.0",
"build": "19H15",
"platform": "darwin",
"version": "10.15.7",
"family": "darwin",
"name": "Mac OS X"
},
"id": "04A12D9F-C409-5352-B238-99EA58CAC285",
"ip": [
"fe80::aede:48ff:fe00:1122",
"fe80::4ba:20ea:4390:8ff1",
"192.168.1.46",
"fe80::f09a:f4ff:fec1:fc98",
"fe80::f09a:f4ff:fec1:fc98",
"fe80::b1db:f8e1:58f0:708c",
"fe80::7a0c:f971:b7a4:3221"
],
"mac": [
"ac:de:48:00:11:22",
"fa:ff:c2:4e:d1:b1",
"f8:ff:c2:4e:d1:b1",
"82:bf:e9:40:48:04",
"82:bf:e9:40:48:01",
"82:bf:e9:40:48:00",
"82:bf:e9:40:48:05",
"82:bf:e9:40:48:01",
"0a:ff:c2:4e:d1:b1",
"f2:9a:f4:c1:fc:98",
"f2:9a:f4:c1:fc:98"
],
"hostname": "cyrillerclaptop.localdomain",
"name": "cyrillerclaptop.localdomain",
"architecture": "x86_64"
},
"prometheus": {
"order_per_country": {
"histogram": {
"values": [],
"counts": []
}
},
"labels": {
"quantile": "0.75",
"instance": "localhost:8080",
"job": "prometheus",
"shipping_country": "US"
}
},
"event": {
"dataset": "prometheus.collector",
"module": "prometheus",
"duration": 2966192092
}
},
"fields": {
"@timestamp": [
"2020-11-28T15:46:24.391Z"
]
},
"sort": [
1606578384391
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment