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
90909ae7
Commit
90909ae7
authored
7 years ago
by
Daniel Nelson
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix build on Windows (#2972)
parent
d40e4412
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/inputs/system/linux_sysctl_fs.go
+11
-1
11 additions, 1 deletion
plugins/inputs/system/linux_sysctl_fs.go
plugins/inputs/system/processes.go
+0
-9
0 additions, 9 deletions
plugins/inputs/system/processes.go
with
11 additions
and
10 deletions
plugins/inputs/system/linux_sysctl_fs.go
+
11
−
1
View file @
90909ae7
...
...
@@ -3,11 +3,13 @@ package system
import
(
"bytes"
"io/ioutil"
"os"
"strconv"
"path"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/inputs"
"path"
)
// https://www.kernel.org/doc/Documentation/sysctl/fs.txt
...
...
@@ -80,6 +82,14 @@ func (sfs *SysctlFS) Gather(acc telegraf.Accumulator) error {
return
nil
}
func
GetHostProc
()
string
{
procPath
:=
"/proc"
if
os
.
Getenv
(
"HOST_PROC"
)
!=
""
{
procPath
=
os
.
Getenv
(
"HOST_PROC"
)
}
return
procPath
}
func
init
()
{
inputs
.
Add
(
"linux_sysctl_fs"
,
func
()
telegraf
.
Input
{
...
...
This diff is collapsed.
Click to expand it.
plugins/inputs/system/processes.go
+
0
−
9
View file @
90909ae7
...
...
@@ -20,7 +20,6 @@ import (
type
Processes
struct
{
execPS
func
()
([]
byte
,
error
)
getHostProc
func
()
string
readProcFile
func
(
filename
string
)
([]
byte
,
error
)
forcePS
bool
...
...
@@ -63,14 +62,6 @@ func (p *Processes) Gather(acc telegraf.Accumulator) error {
return
nil
}
func
GetHostProc
()
string
{
procPath
:=
"/proc"
if
os
.
Getenv
(
"HOST_PROC"
)
!=
""
{
procPath
=
os
.
Getenv
(
"HOST_PROC"
)
}
return
procPath
}
// Gets empty fields of metrics based on the OS
func
getEmptyFields
()
map
[
string
]
interface
{}
{
fields
:=
map
[
string
]
interface
{}{
...
...
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