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
d935dfa9
Commit
d935dfa9
authored
7 years ago
by
Ildar Svetlov
Committed by
Daniel Nelson
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't add system input uptime_format as a counter (#3578)
parent
8785c7d7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/inputs/system/SYSTEM_README.md
+2
-1
2 additions, 1 deletion
plugins/inputs/system/SYSTEM_README.md
plugins/inputs/system/system.go
+3
-1
3 additions, 1 deletion
plugins/inputs/system/system.go
with
5 additions
and
2 deletions
plugins/inputs/system/SYSTEM_README.md
+
2
−
1
View file @
d935dfa9
...
...
@@ -34,5 +34,6 @@ $ telegraf --config ~/ws/telegraf.conf --input-filter system --test
* Plugin: system, Collection 1
* Plugin: inputs.system, Collection 1
> system,host=tyrion load1=3.72,load5=2.4,load15=2.1,n_users=3i,n_cpus=4i 1483964144000000000
> system,host=tyrion uptime=1249632i,uptime_format="14 days, 11:07" 1483964144000000000
> system,host=tyrion uptime=1249632i 1483964144000000000
> system,host=tyrion uptime_format="14 days, 11:07" 1483964144000000000
```
This diff is collapsed.
Click to expand it.
plugins/inputs/system/system.go
+
3
−
1
View file @
d935dfa9
...
...
@@ -46,7 +46,9 @@ func (_ *SystemStats) Gather(acc telegraf.Accumulator) error {
"n_cpus"
:
runtime
.
NumCPU
(),
},
nil
)
acc
.
AddCounter
(
"system"
,
map
[
string
]
interface
{}{
"uptime"
:
hostinfo
.
Uptime
,
"uptime"
:
hostinfo
.
Uptime
,
},
nil
)
acc
.
AddFields
(
"system"
,
map
[
string
]
interface
{}{
"uptime_format"
:
format_uptime
(
hostinfo
.
Uptime
),
},
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