Skip to content

Commit

Permalink
Add process.pgid field for processes group id (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano authored and Mathieu Martin committed May 1, 2019
1 parent 478fa79 commit 8a2bd9d
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 13 deletions.
3 changes: 3 additions & 0 deletions code/go/ecs/process.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions docs/field-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2026,6 +2026,17 @@ type: keyword

example: `ssh`

| extended

// ===============================================================

| process.pgid
| Identifier of the group of processes the process belongs to.

type: long



| extended

// ===============================================================
Expand Down
4 changes: 4 additions & 0 deletions generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,10 @@
Sometimes called program name or similar.'
example: ssh
- name: pgid
level: extended
type: long
description: Identifier of the group of processes the process belongs to.
- name: pid
level: core
type: long
Expand Down
1 change: 1 addition & 0 deletions generated/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ os.version,keyword,extended,10.14.1,1.1.0-dev
process.args,keyword,extended,"['ssh', '-l', 'user', '10.0.0.16']",1.1.0-dev
process.executable,keyword,extended,/usr/bin/ssh,1.1.0-dev
process.name,keyword,extended,ssh,1.1.0-dev
process.pgid,long,extended,,1.1.0-dev
process.pid,long,core,,1.1.0-dev
process.ppid,long,extended,,1.1.0-dev
process.start,date,extended,2016-05-23T08:05:34.853Z,1.1.0-dev
Expand Down
20 changes: 14 additions & 6 deletions generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,7 @@ process.args:
ignore_above: 1024
level: extended
name: args
order: 3
order: 4
short: Array of process arguments.
type: keyword
process.executable:
Expand All @@ -2137,7 +2137,7 @@ process.executable:
ignore_above: 1024
level: extended
name: executable
order: 4
order: 5
short: Absolute path to the process executable.
type: keyword
process.name:
Expand All @@ -2152,6 +2152,14 @@ process.name:
order: 1
short: Process name.
type: keyword
process.pgid:
description: Identifier of the group of processes the process belongs to.
flat_name: process.pgid
level: extended
name: pgid
order: 3
short: Identifier of the group of processes the process belongs to.
type: long
process.pid:
description: Process id.
exmple: ssh
Expand All @@ -2175,7 +2183,7 @@ process.start:
flat_name: process.start
level: extended
name: start
order: 7
order: 8
short: The time the process started.
type: date
process.thread.id:
Expand All @@ -2184,7 +2192,7 @@ process.thread.id:
flat_name: process.thread.id
level: extended
name: thread.id
order: 6
order: 7
short: Thread ID.
type: long
process.title:
Expand All @@ -2196,7 +2204,7 @@ process.title:
ignore_above: 1024
level: extended
name: title
order: 5
order: 6
short: Process title.
type: keyword
process.working_directory:
Expand All @@ -2206,7 +2214,7 @@ process.working_directory:
ignore_above: 1024
level: extended
name: working_directory
order: 8
order: 9
short: The working directory of the process.
type: keyword
related.ip:
Expand Down
20 changes: 14 additions & 6 deletions generated/ecs/ecs_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,7 @@ process:
ignore_above: 1024
level: extended
name: args
order: 3
order: 4
short: Array of process arguments.
type: keyword
executable:
Expand All @@ -2447,7 +2447,7 @@ process:
ignore_above: 1024
level: extended
name: executable
order: 4
order: 5
short: Absolute path to the process executable.
type: keyword
name:
Expand All @@ -2462,6 +2462,14 @@ process:
order: 1
short: Process name.
type: keyword
pgid:
description: Identifier of the group of processes the process belongs to.
flat_name: process.pgid
level: extended
name: pgid
order: 3
short: Identifier of the group of processes the process belongs to.
type: long
pid:
description: Process id.
exmple: ssh
Expand All @@ -2485,7 +2493,7 @@ process:
flat_name: process.start
level: extended
name: start
order: 7
order: 8
short: The time the process started.
type: date
thread.id:
Expand All @@ -2494,7 +2502,7 @@ process:
flat_name: process.thread.id
level: extended
name: thread.id
order: 6
order: 7
short: Thread ID.
type: long
title:
Expand All @@ -2506,7 +2514,7 @@ process:
ignore_above: 1024
level: extended
name: title
order: 5
order: 6
short: Process title.
type: keyword
working_directory:
Expand All @@ -2516,7 +2524,7 @@ process:
ignore_above: 1024
level: extended
name: working_directory
order: 8
order: 9
short: The working directory of the process.
type: keyword
group: 2
Expand Down
3 changes: 3 additions & 0 deletions generated/elasticsearch/6/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,9 @@
"ignore_above": 1024,
"type": "keyword"
},
"pgid": {
"type": "long"
},
"pid": {
"type": "long"
},
Expand Down
3 changes: 3 additions & 0 deletions generated/elasticsearch/7/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,9 @@
"ignore_above": 1024,
"type": "keyword"
},
"pgid": {
"type": "long"
},
"pid": {
"type": "long"
},
Expand Down
3 changes: 3 additions & 0 deletions generated/legacy/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@
"ignore_above": 1024,
"type": "keyword"
},
"pgid": {
"type": "long"
},
"pid": {
"type": "long"
},
Expand Down
10 changes: 10 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,16 @@
"required": false,
"type": "keyword"
},
"process.pgid": {
"description": "Identifier of the group of processes the process belongs to.",
"example": "",
"footnote": "",
"group": 2,
"level": "extended",
"name": "process.pgid",
"required": false,
"type": "long"
},
"process.pid": {
"description": "Process id.",
"example": "",
Expand Down
6 changes: 6 additions & 0 deletions schemas/process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
description: >
Process parent id.
- name: pgid
level: extended
type: long
description: >
Identifier of the group of processes the process belongs to.
- name: args
level: extended
type: keyword
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmd/gocodegen/gocodegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func goDataType(fieldName, elasticsearchDataType string) string {
// abbreviations capitalizes common abbreviations.
func abbreviations(abv string) string {
switch strings.ToLower(abv) {
case "id", "ppid", "pid", "mac", "ip", "iana", "uid", "ecs":
case "id", "ppid", "pid", "pgid", "mac", "ip", "iana", "uid", "ecs":
return strings.ToUpper(abv)
default:
return abv
Expand Down

0 comments on commit 8a2bd9d

Please sign in to comment.