Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add process.pgid field for processes group id #311

Merged
merged 5 commits into from
May 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1518,6 +1518,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 @@ -2125,7 +2125,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 @@ -2135,7 +2135,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 @@ -2150,6 +2150,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 @@ -2173,7 +2181,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 @@ -2182,7 +2190,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 @@ -2194,7 +2202,7 @@ process.title:
ignore_above: 1024
level: extended
name: title
order: 5
order: 6
short: Process title.
type: keyword
process.working_directory:
Expand All @@ -2204,7 +2212,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 @@ -2435,7 +2435,7 @@ process:
ignore_above: 1024
level: extended
name: args
order: 3
order: 4
short: Array of process arguments.
type: keyword
executable:
Expand All @@ -2445,7 +2445,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 @@ -2460,6 +2460,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 @@ -2483,7 +2491,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 @@ -2492,7 +2500,7 @@ process:
flat_name: process.thread.id
level: extended
name: thread.id
order: 6
order: 7
short: Thread ID.
type: long
title:
Expand All @@ -2504,7 +2512,7 @@ process:
ignore_above: 1024
level: extended
name: title
order: 5
order: 6
short: Process title.
type: keyword
working_directory:
Expand All @@ -2514,7 +2522,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