Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
telegraf-nftables
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Due to inactivity, this project is scheduled to be deleted on 2035-04-24.
Why is this scheduled?
Show more breadcrumbs
vqgroup
telegraf-nftables
Commits
cd66e203
Commit
cd66e203
authored
9 years ago
by
Thibault Cohen
Committed by
Cameron Sparr
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve procstat
closes #799
parent
240f9947
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
plugins/inputs/procstat/README.md
+4
-0
4 additions, 0 deletions
plugins/inputs/procstat/README.md
plugins/inputs/procstat/spec_processor.go
+10
-0
10 additions, 0 deletions
plugins/inputs/procstat/spec_processor.go
with
15 additions
and
0 deletions
CHANGELOG.md
+
1
−
0
View file @
cd66e203
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
-
[
#788
](
https://github.com/influxdata/telegraf/pull/788
)
: -input-list and -output-list command-line options. Thanks @ebookbug!
-
[
#788
](
https://github.com/influxdata/telegraf/pull/788
)
: -input-list and -output-list command-line options. Thanks @ebookbug!
-
[
#778
](
https://github.com/influxdata/telegraf/pull/778
)
: Adding a TCP input listener.
-
[
#778
](
https://github.com/influxdata/telegraf/pull/778
)
: Adding a TCP input listener.
-
[
#797
](
https://github.com/influxdata/telegraf/issues/797
)
: Provide option for persistent MQTT consumer client sessions.
-
[
#797
](
https://github.com/influxdata/telegraf/issues/797
)
: Provide option for persistent MQTT consumer client sessions.
-
[
#799
](
https://github.com/influxdata/telegraf/pull/799
)
: Add number of threads for procstat input plugin. Thanks @titilambert!
### Bugfixes
### Bugfixes
-
[
#748
](
https://github.com/influxdata/telegraf/issues/748
)
: Fix sensor plugin split on ":"
-
[
#748
](
https://github.com/influxdata/telegraf/issues/748
)
: Fix sensor plugin split on ":"
...
...
This diff is collapsed.
Click to expand it.
plugins/inputs/procstat/README.md
+
4
−
0
View file @
cd66e203
...
@@ -35,6 +35,10 @@ The above configuration would result in output like:
...
@@ -35,6 +35,10 @@ The above configuration would result in output like:
# Measurements
# Measurements
Note: prefix can be set by the user, per process.
Note: prefix can be set by the user, per process.
Threads related measurement names:
-
procstat_[prefix_]num_threads value=5
File descriptor related measurement names:
File descriptor related measurement names:
-
procstat_[prefix_]num_fds value=4
-
procstat_[prefix_]num_fds value=4
...
...
This diff is collapsed.
Click to expand it.
plugins/inputs/procstat/spec_processor.go
+
10
−
0
View file @
cd66e203
...
@@ -52,6 +52,7 @@ func NewSpecProcessor(
...
@@ -52,6 +52,7 @@ func NewSpecProcessor(
}
}
func
(
p
*
SpecProcessor
)
pushMetrics
()
{
func
(
p
*
SpecProcessor
)
pushMetrics
()
{
p
.
pushNThreadsStats
()
p
.
pushFDStats
()
p
.
pushFDStats
()
p
.
pushCtxStats
()
p
.
pushCtxStats
()
p
.
pushIOStats
()
p
.
pushIOStats
()
...
@@ -60,6 +61,15 @@ func (p *SpecProcessor) pushMetrics() {
...
@@ -60,6 +61,15 @@ func (p *SpecProcessor) pushMetrics() {
p
.
flush
()
p
.
flush
()
}
}
func
(
p
*
SpecProcessor
)
pushNThreadsStats
()
error
{
numThreads
,
err
:=
p
.
proc
.
NumThreads
()
if
err
!=
nil
{
return
fmt
.
Errorf
(
"NumThreads error: %s
\n
"
,
err
)
}
p
.
add
(
"num_threads"
,
numThreads
)
return
nil
}
func
(
p
*
SpecProcessor
)
pushFDStats
()
error
{
func
(
p
*
SpecProcessor
)
pushFDStats
()
error
{
fds
,
err
:=
p
.
proc
.
NumFDs
()
fds
,
err
:=
p
.
proc
.
NumFDs
()
if
err
!=
nil
{
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment