Skip to content

Commit a5a98db

Browse files
committed
add heartbeat ds
1 parent 7d585f7 commit a5a98db

File tree

6 files changed

+236
-0
lines changed

6 files changed

+236
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: heartbeat
3+
fields:
4+
base:
5+
fields:
6+
"@timestamp": {}
7+
message: {}
8+
agent:
9+
fields:
10+
id: {}
11+
data_stream:
12+
fields: "*"
13+
event:
14+
fields:
15+
ingested: {}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"description": "Pipeline for setting event.ingested",
3+
"processors": [
4+
{
5+
"set": {
6+
"field": "event.ingested",
7+
"value": "{{ _ingest.timestamp }}",
8+
"ignore_failure": true
9+
}
10+
}
11+
]
12+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
- name: '@timestamp'
2+
level: core
3+
required: true
4+
type: date
5+
description: 'Date/time when the event originated.
6+
7+
This is the date/time extracted from the event, typically representing when the event was generated by the source.
8+
9+
If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline.
10+
11+
Required field for all events.'
12+
example: '2016-05-23T08:05:34.853Z'
13+
default_field: true
14+
- name: message
15+
level: core
16+
type: match_only_text
17+
description: 'For log events the message field contains the log message, optimized for viewing in a log viewer.
18+
19+
For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event.
20+
21+
If multiple messages exist, they can be combined into one message.'
22+
example: Hello World
23+
default_field: true
24+
- name: agent
25+
title: Agent
26+
group: 2
27+
description: 'The agent fields contain the data about the software entity, if any, that collects, detects, or observes events on a host, or takes measurements on a host.
28+
29+
Examples include Beats. Agents may also run on observers. ECS agent.* fields shall be populated with details of the agent running on the host or observer where the event happened or the measurement was taken.'
30+
footnote: 'Examples: In the case of Beats for logs, the agent.name is filebeat. For APM, it is the agent running in the app/service. The agent information does not change if data is sent through queuing systems like Kafka, Redis, or processing systems such as Logstash or APM Server.'
31+
type: group
32+
default_field: true
33+
fields:
34+
- name: id
35+
level: core
36+
type: keyword
37+
ignore_above: 1024
38+
description: 'Unique identifier of this agent (if one exists).
39+
40+
Example: For Beats this would be beat.id.'
41+
example: 8a4f500d
42+
- name: data_stream
43+
title: data_stream
44+
group: 2
45+
description: Fields describing the new indexing strategy <type>-<dataset>-<namespace>
46+
type: group
47+
default_field: true
48+
fields:
49+
- name: dataset
50+
level: custom
51+
type: constant_keyword
52+
description: Data stream dataset name.
53+
example: nginx.access
54+
default_field: false
55+
- name: namespace
56+
level: custom
57+
type: constant_keyword
58+
description: Data stream namespace.
59+
example: production
60+
default_field: false
61+
- name: type
62+
level: custom
63+
type: constant_keyword
64+
description: Data stream type.
65+
example: logs
66+
default_field: false
67+
- name: event
68+
title: Event
69+
group: 2
70+
description: 'The event fields are used for context information about the log or metric event itself.
71+
72+
A log is defined as an event containing details of something that happened. Log events must include the time at which the thing happened. Examples of log events include a process starting on a host, a network packet being sent from a source to a destination, or a network connection between a client and a server being initiated or closed. A metric is defined as an event containing one or more numerical measurements and the time at which the measurement was taken. Examples of metric events include memory pressure measured on a host and device temperature. See the `event.kind` definition in this section for additional details about metric and state events.'
73+
type: group
74+
default_field: true
75+
fields:
76+
- name: ingested
77+
level: core
78+
type: date
79+
description: 'Timestamp when an event arrived in the central data store.
80+
81+
This is different from `@timestamp`, which is when the event originally occurred. It''s also different from `event.created`, which is meant to capture the first time an agent saw the event.
82+
83+
In normal conditions, assuming no tampering, the timestamps should chronologically look like this: `@timestamp` < `event.created` < `event.ingested`.'
84+
example: '2016-05-23T08:05:35.101Z'
85+
default_field: false
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
title: Endpoint Heartbeat
2+
type: logs
3+
dataset: endpoint.heartbeat
4+
elasticsearch:
5+
index_template:
6+
mappings:
7+
dynamic: false
8+
settings:
9+
index:
10+
sort.field:
11+
- event.ingested
12+
sort.order:
13+
- desc
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"@timestamp": "2023-07-18T20:40:09.279939Z",
3+
"agent": {
4+
"id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
5+
},
6+
"data_stream": {
7+
"dataset": "endpoint.heartbeat",
8+
"namespace": "default",
9+
"type": "logs"
10+
},
11+
"message": "Endpoint heartbeat",
12+
"event": {
13+
"ingested": "2023-07-18T20:40:09.279939Z"
14+
}
15+
}

schemas/v1/heartbeat/heartbeat.yaml

Lines changed: 96 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)