Skip to content

Commit

Permalink
document process.num_threads field
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonQ committed Sep 26, 2023
1 parent 7062e30 commit 44aea18
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]

*Metricbeat*

- System module now collects the total thread count per process.
The elastic-agent-system-metrics was updated to v0.5.0 as the total thread count
- System module now collects the number of threads per process.
The elastic-agent-system-metrics was updated to v0.5.0 as the number of threads
is collected by it.

*Osquerybeat*
Expand Down
5 changes: 3 additions & 2 deletions libbeat/generator/fields/module_fields_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package fields

import (
"io/ioutil"
"os"
"path/filepath"
)

Expand All @@ -30,9 +31,9 @@ var indentByModule = map[string]int{
"protos": 8,
}

// GetModules returns a the list of modules for the given modules directory
// GetModules returns a list of modules for the given modules directory
func GetModules(modulesDir string) ([]string, error) {
moduleInfos, err := ioutil.ReadDir(modulesDir)
moduleInfos, err := os.ReadDir(modulesDir)
if err != nil {
return nil, err
}
Expand Down
12 changes: 12 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -60655,6 +60655,18 @@ format: percent

--

*`process.num_threads`*::
+
--
The number of threads in the process.


type: integer

format: number

--

[float]
=== system

Expand Down
5 changes: 5 additions & 0 deletions metricbeat/module/system/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
format: percent
description: >
The percentage of memory the process occupied in main memory (RAM).
- name: num_threads
type: integer
format: number
description: >
The number of threads in the process.
- name: system
type: group
description: >
Expand Down

0 comments on commit 44aea18

Please sign in to comment.