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
3e3b0942
Commit
3e3b0942
authored
8 years ago
by
Eric
Committed by
Cameron Sparr
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Only log warning on type when in debug mode.
closes #1793
parent
1f7a8fce
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
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
plugins/outputs/opentsdb/opentsdb.go
+3
-5
3 additions, 5 deletions
plugins/outputs/opentsdb/opentsdb.go
with
4 additions
and
5 deletions
CHANGELOG.md
+
1
−
0
View file @
3e3b0942
...
@@ -57,6 +57,7 @@ continue sending logs to /var/log/telegraf/telegraf.log.
...
@@ -57,6 +57,7 @@ continue sending logs to /var/log/telegraf/telegraf.log.
-
[
#1835
](
https://github.com/influxdata/telegraf/issues/1835
)
: Fix SNMP emitting empty fields.
-
[
#1835
](
https://github.com/influxdata/telegraf/issues/1835
)
: Fix SNMP emitting empty fields.
-
[
#1854
](
https://github.com/influxdata/telegraf/pull/1853
)
: SQL Server waitstats truncation bug.
-
[
#1854
](
https://github.com/influxdata/telegraf/pull/1853
)
: SQL Server waitstats truncation bug.
-
[
#1810
](
https://github.com/influxdata/telegraf/issues/1810
)
: Fix logparser common log format: numbers in ident.
-
[
#1810
](
https://github.com/influxdata/telegraf/issues/1810
)
: Fix logparser common log format: numbers in ident.
-
[
#1793
](
https://github.com/influxdata/telegraf/pull/1793
)
: Fix JSON Serialization in OpenTSDB output.
## v1.0.1 [2016-09-26]
## v1.0.1 [2016-09-26]
...
...
This diff is collapsed.
Click to expand it.
plugins/outputs/opentsdb/opentsdb.go
+
3
−
5
View file @
3e3b0942
...
@@ -2,6 +2,7 @@ package opentsdb
...
@@ -2,6 +2,7 @@ package opentsdb
import
(
import
(
"fmt"
"fmt"
"log"
"net"
"net"
"net/url"
"net/url"
"sort"
"sort"
...
@@ -114,7 +115,7 @@ func (o *OpenTSDB) WriteHttp(metrics []telegraf.Metric, u *url.URL) error {
...
@@ -114,7 +115,7 @@ func (o *OpenTSDB) WriteHttp(metrics []telegraf.Metric, u *url.URL) error {
case
uint64
:
case
uint64
:
case
float64
:
case
float64
:
default
:
default
:
fmt
.
Printf
(
"OpenTSDB does not support metric value: [%s] of type [%T].
\n
"
,
value
,
value
)
log
.
Printf
(
"
D!
OpenTSDB does not support metric value: [%s] of type [%T].
\n
"
,
value
,
value
)
continue
continue
}
}
...
@@ -156,7 +157,7 @@ func (o *OpenTSDB) WriteTelnet(metrics []telegraf.Metric, u *url.URL) error {
...
@@ -156,7 +157,7 @@ func (o *OpenTSDB) WriteTelnet(metrics []telegraf.Metric, u *url.URL) error {
for
fieldName
,
value
:=
range
m
.
Fields
()
{
for
fieldName
,
value
:=
range
m
.
Fields
()
{
metricValue
,
buildError
:=
buildValue
(
value
)
metricValue
,
buildError
:=
buildValue
(
value
)
if
buildError
!=
nil
{
if
buildError
!=
nil
{
fmt
.
Printf
(
"OpenTSDB: %s
\n
"
,
buildError
.
Error
())
log
.
Printf
(
"
E!
OpenTSDB: %s
\n
"
,
buildError
.
Error
())
continue
continue
}
}
...
@@ -164,9 +165,6 @@ func (o *OpenTSDB) WriteTelnet(metrics []telegraf.Metric, u *url.URL) error {
...
@@ -164,9 +165,6 @@ func (o *OpenTSDB) WriteTelnet(metrics []telegraf.Metric, u *url.URL) error {
sanitizedChars
.
Replace
(
fmt
.
Sprintf
(
"%s%s_%s"
,
o
.
Prefix
,
m
.
Name
(),
fieldName
)),
sanitizedChars
.
Replace
(
fmt
.
Sprintf
(
"%s%s_%s"
,
o
.
Prefix
,
m
.
Name
(),
fieldName
)),
now
,
metricValue
,
tags
)
now
,
metricValue
,
tags
)
if
o
.
Debug
{
fmt
.
Print
(
messageLine
)
}
_
,
err
:=
connection
.
Write
([]
byte
(
messageLine
))
_
,
err
:=
connection
.
Write
([]
byte
(
messageLine
))
if
err
!=
nil
{
if
err
!=
nil
{
return
fmt
.
Errorf
(
"OpenTSDB: Telnet writing error %s"
,
err
.
Error
())
return
fmt
.
Errorf
(
"OpenTSDB: Telnet writing error %s"
,
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