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
811567a2
Commit
811567a2
authored
8 years ago
by
Cameron Sparr
Browse files
Options
Downloads
Patches
Plain Diff
Update go version to 1.7, fix vet errors
closes #1728
parent
ca8fb440
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
circle.yml
+3
-3
3 additions, 3 deletions
circle.yml
plugins/inputs/couchbase/couchbase_test.go
+6
-9
6 additions, 9 deletions
plugins/inputs/couchbase/couchbase_test.go
plugins/inputs/mongodb/mongodb_server.go
+22
-3
22 additions, 3 deletions
plugins/inputs/mongodb/mongodb_server.go
with
31 additions
and
15 deletions
circle.yml
+
3
−
3
View file @
811567a2
...
...
@@ -4,9 +4,9 @@ machine:
post
:
-
sudo service zookeeper stop
-
go version
-
go version | grep 1.
6.2
|| sudo rm -rf /usr/local/go
-
wget https://storage.googleapis.com/golang/go1.
6.2
.linux-amd64.tar.gz
-
sudo tar -C /usr/local -xzf go1.
6.2
.linux-amd64.tar.gz
-
go version | grep 1.
7.1
|| sudo rm -rf /usr/local/go
-
wget https://storage.googleapis.com/golang/go1.
7.1
.linux-amd64.tar.gz
-
sudo tar -C /usr/local -xzf go1.
7.1
.linux-amd64.tar.gz
-
go version
dependencies
:
...
...
This diff is collapsed.
Click to expand it.
plugins/inputs/couchbase/couchbase_test.go
+
6
−
9
View file @
811567a2
This diff is collapsed.
Click to expand it.
plugins/inputs/mongodb/mongodb_server.go
+
22
−
3
View file @
811567a2
...
...
@@ -26,12 +26,26 @@ func (s *Server) gatherData(acc telegraf.Accumulator, gatherDbStats bool) error
s
.
Session
.
SetMode
(
mgo
.
Eventual
,
true
)
s
.
Session
.
SetSocketTimeout
(
0
)
result_server
:=
&
ServerStatus
{}
err
:=
s
.
Session
.
DB
(
"admin"
)
.
Run
(
bson
.
D
{{
"serverStatus"
,
1
},
{
"recordStats"
,
0
}},
result_server
)
err
:=
s
.
Session
.
DB
(
"admin"
)
.
Run
(
bson
.
D
{
{
Name
:
"serverStatus"
,
Value
:
1
,
},
{
Name
:
"recordStats"
,
Value
:
0
,
},
},
result_server
)
if
err
!=
nil
{
return
err
}
result_repl
:=
&
ReplSetStatus
{}
err
=
s
.
Session
.
DB
(
"admin"
)
.
Run
(
bson
.
D
{{
"replSetGetStatus"
,
1
}},
result_repl
)
err
=
s
.
Session
.
DB
(
"admin"
)
.
Run
(
bson
.
D
{
{
Name
:
"replSetGetStatus"
,
Value
:
1
,
},
},
result_repl
)
if
err
!=
nil
{
log
.
Println
(
"Not gathering replica set status, member not in replica set ("
+
err
.
Error
()
+
")"
)
}
...
...
@@ -52,7 +66,12 @@ func (s *Server) gatherData(acc telegraf.Accumulator, gatherDbStats bool) error
}
for
_
,
db_name
:=
range
names
{
db_stat_line
:=
&
DbStatsData
{}
err
=
s
.
Session
.
DB
(
db_name
)
.
Run
(
bson
.
D
{{
"dbStats"
,
1
}},
db_stat_line
)
err
=
s
.
Session
.
DB
(
db_name
)
.
Run
(
bson
.
D
{
{
Name
:
"dbStats"
,
Value
:
1
,
},
},
db_stat_line
)
if
err
!=
nil
{
log
.
Println
(
"Error getting db stats from "
+
db_name
+
"("
+
err
.
Error
()
+
")"
)
}
...
...
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