Skip to content

Commit

Permalink
telegraf=r1 com.webos.service.sdkagent=6
Browse files Browse the repository at this point in the history
:Release Notes:
Add webOS specific data in sdkagent for telegraf

:Detailed Notes:
telegraf
Enable inputs.socket_listener on telegraf
Define default telegraf configuration

com.webos.service.sdkagent: submissions/3..submissions/6
fac2650 Remove dependency of other system service
561a6ab Modify error string
ddf303f Add webOS specific configurations
943dab8 Fix the potential bug
380c452 Implement multi thread

:Testing Performed:
Test complete on raspberrypi4-64, qemux86-64 locally

:QA Notes:
NA

:Issues Addressed:
[WRP-13183] CCC: telegraf=r1 com.webos.service.sdkagent=5
[WRP-11630] Add Upstream-Status to existing .patch files in meta-lg-webos
[WRP-12509] Define and apply default configuration of telegraf for webOS
[WRP-9271] Implement multi thread for interval process
[WRP-9272] Implement multi thread for send to Telegraf

Cherry-picked-from-commit: 1883ce0
Cherry-picked-from-branch:
  • Loading branch information
wonsange authored and jaekyu-lee committed Jun 20, 2023
1 parent 0c4aca6 commit 4694990
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 3 deletions.
2 changes: 1 addition & 1 deletion meta-webos/recipes-devtools/telegraf/files/0001-Modify-the-Makefile-for-v1.21.4.patch
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 96ec915582890d0a26f1474c7eab9f2d84afe4e1 Mon Sep 17 00:00:00 2001
From: "wonsang.ryu" <[email protected]>
Date: Mon, 26 Sep 2022 15:29:03 +0900
Subject: [PATCH 1/2] Modify the Makefile for v1.21.4
Subject: [PATCH] Modify the Makefile for v1.21.4

Modify glibc_version variable
Modify build variables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 69422d2c11190e7a6eb3b28794c7cf3508d0b58b Mon Sep 17 00:00:00 2001
From: "wonsang.ryu" <[email protected]>
Date: Mon, 26 Sep 2022 16:01:32 +0900
Subject: [PATCH 2/2] Remove unused plugins for v1.21.4
Subject: [PATCH] Remove unused plugins for v1.21.4

---
Upstream-Status: Pending
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
From 43c56883871eba1e31ea9d85d87ed77ca746f18b Mon Sep 17 00:00:00 2001
From: "wonsang.ryu" <[email protected]>
Date: Wed, 5 Apr 2023 09:32:51 +0900
Subject: [PATCH] Apply inputs.socket_listener plugin for sdkagent

---
Upstream-Status: Pending

etc/telegraf.conf | 8 ++++----
plugins/inputs/all/all.go | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/etc/telegraf.conf b/etc/telegraf.conf
index 16814c46e..ff23604ad 100644
--- a/etc/telegraf.conf
+++ b/etc/telegraf.conf
@@ -112,11 +112,11 @@
## urls will be written to each interval.
# urls = ["unix:///var/run/influxdb.sock"]
# urls = ["udp://127.0.0.1:8089"]
- # urls = ["http://127.0.0.1:8086"]
+ urls = ["http://127.0.0.1:8086"]

## The target database for metrics; will be created as needed.
## For UDP url endpoint database needs to be configured on server side.
- # database = "telegraf"
+ database = "telegraf"

## The value of this tag will be used to determine the database. If this
## tag is not set the 'database' option is used as the default.
@@ -8664,7 +8664,7 @@


# # Generic socket listener capable of handling multiple socket types.
-# [[inputs.socket_listener]]
+[[inputs.socket_listener]]
# ## URL to listen on
# # service_address = "tcp://:8094"
# # service_address = "tcp://127.0.0.1:http"
@@ -8675,7 +8675,7 @@
# # service_address = "udp4://:8094"
# # service_address = "udp6://:8094"
# # service_address = "unix:///tmp/telegraf.sock"
-# # service_address = "unixgram:///tmp/telegraf.sock"
+ service_address = "unixgram:///tmp/telegraf.sock"
#
# ## Change the file mode bits on unix sockets. These permissions may not be
# ## respected by some platforms, to safely restrict write permissions it is best
diff --git a/plugins/inputs/all/all.go b/plugins/inputs/all/all.go
index 4f20df83b..e4bbaa7f9 100644
--- a/plugins/inputs/all/all.go
+++ b/plugins/inputs/all/all.go
@@ -172,7 +172,7 @@ import (
// _ "github.com/influxdata/telegraf/plugins/inputs/snmp"
// _ "github.com/influxdata/telegraf/plugins/inputs/snmp_legacy"
// _ "github.com/influxdata/telegraf/plugins/inputs/snmp_trap"
-// _ "github.com/influxdata/telegraf/plugins/inputs/socket_listener"
+ _ "github.com/influxdata/telegraf/plugins/inputs/socket_listener"
// _ "github.com/influxdata/telegraf/plugins/inputs/solr"
// _ "github.com/influxdata/telegraf/plugins/inputs/sql"
// _ "github.com/influxdata/telegraf/plugins/inputs/sqlserver"
--
2.25.1

3 changes: 3 additions & 0 deletions meta-webos/recipes-devtools/telegraf/telegraf_1.21.4.bb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ SRCREV = "583ee20a093acaa0781508b7840deb97a0fda622"
SRC_URI = "git://github.com/influxdata/telegraf.git;protocol=https;branch=release-1.21 \
file://0001-Modify-the-Makefile-for-v1.21.4.patch;patchdir=src/${GO_IMPORT} \
file://0002-Remove-unused-plugins-for-v1.21.4.patch;patchdir=src/${GO_IMPORT} \
file://0003-Apply-inputs.socket_listener-plugin-for-sdkagent.patch;patchdir=src/${GO_IMPORT} \
"

PR = "r1"

GO_IMPORT = "import"

S = "${WORKDIR}/git"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = " \
DEPENDS = "glib-2.0 luna-service2 json-c pmloglib libpbnjson"
RDEPENDS:${PN} += "telegraf"

WEBOS_VERSION = "1.0.0-3_9d310af3007d0ac5d9d005709c211611222d9024"
WEBOS_VERSION = "1.0.0-6_269deaf780fc0ab137ec27697ff8e2470fa96a62"
PR = "r0"

inherit systemd
Expand Down

0 comments on commit 4694990

Please sign in to comment.