From ceae37d66ecaf949a5813847ad4b695e2a936c3e Mon Sep 17 00:00:00 2001 From: Sven Rebhan <36194019+srebhan@users.noreply.github.com> Date: Thu, 23 Sep 2021 16:10:44 +0200 Subject: [PATCH] fix: Rename KNXListener to knx_listener (#9741) --- etc/telegraf.conf | 15 +++++++-------- plugins/inputs/knx_listener/README.md | 6 +++--- plugins/inputs/knx_listener/knx_listener.go | 6 ++++-- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/etc/telegraf.conf b/etc/telegraf.conf index 0ed5ba8eb..2892d9914 100644 --- a/etc/telegraf.conf +++ b/etc/telegraf.conf @@ -5546,7 +5546,7 @@ # # timeout = "5ms" -# # A plugin to collect stats from Opensmtpd - a validating, recursive, and caching DNS resolver +# # A plugin to collect stats from Opensmtpd - a validating, recursive, and caching DNS resolver # [[inputs.opensmtpd]] # ## If running as a restricted user you can prepend sudo for additional access: # #use_sudo = false @@ -6802,7 +6802,7 @@ # # Listener capable of handling KNX bus messages provided through a KNX-IP Interface. -# [[inputs.KNXListener]] +# [[inputs.knx_listener]] # ## Type of KNX-IP interface. # ## Can be either "tunnel" or "router". # # service_type = "tunnel" @@ -6811,7 +6811,7 @@ # service_address = "localhost:3671" # # ## Measurement definition(s) -# # [[inputs.KNXListener.measurement]] +# # [[inputs.knx_listener.measurement]] # # ## Name of the measurement # # name = "temperature" # # ## Datapoint-Type (DPT) of the KNX messages @@ -6819,7 +6819,7 @@ # # ## List of Group-Addresses (GAs) assigned to the measurement # # addresses = ["5/5/1"] # -# # [[inputs.KNXListener.measurement]] +# # [[inputs.knx_listener.measurement]] # # name = "illumination" # # dpt = "9.004" # # addresses = ["5/5/3"] @@ -7667,7 +7667,7 @@ # ## This value is propagated to pqos tool. Interval format is defined by pqos itself. # ## If not provided or provided 0, will be set to 10 = 10x100ms = 1s. # # sampling_interval = "10" -# +# # ## Optionally specify the path to pqos executable. # ## If not provided, auto discovery will be performed. # # pqos_path = "/usr/local/bin/pqos" @@ -7675,12 +7675,12 @@ # ## Optionally specify if IPC and LLC_Misses metrics shouldn't be propagated. # ## If not provided, default value is false. # # shortened_metrics = false -# +# # ## Specify the list of groups of CPU core(s) to be provided as pqos input. # ## Mandatory if processes aren't set and forbidden if processes are specified. # ## e.g. ["0-3", "4,5,6"] or ["1-3,4"] # # cores = ["0-3"] -# +# # ## Specify the list of processes for which Metrics will be collected. # ## Mandatory if cores aren't set and forbidden if cores are specified. # ## e.g. ["qemu", "pmd"] @@ -9099,4 +9099,3 @@ # [[inputs.zipkin]] # # path = "/api/v1/spans" # URL path for span data # # port = 9411 # Port on which Telegraf listens - diff --git a/plugins/inputs/knx_listener/README.md b/plugins/inputs/knx_listener/README.md index 7a06462ff..518dd5d7f 100644 --- a/plugins/inputs/knx_listener/README.md +++ b/plugins/inputs/knx_listener/README.md @@ -11,7 +11,7 @@ This is a sample config for the plugin. ```toml # Listener capable of handling KNX bus messages provided through a KNX-IP Interface. -[[inputs.KNXListener]] +[[inputs.knx_listener]] ## Type of KNX-IP interface. ## Can be either "tunnel" or "router". # service_type = "tunnel" @@ -20,7 +20,7 @@ This is a sample config for the plugin. service_address = "localhost:3671" ## Measurement definition(s) - # [[inputs.KNXListener.measurement]] + # [[inputs.knx_listener.measurement]] # ## Name of the measurement # name = "temperature" # ## Datapoint-Type (DPT) of the KNX messages @@ -28,7 +28,7 @@ This is a sample config for the plugin. # ## List of Group-Addresses (GAs) assigned to the measurement # addresses = ["5/5/1"] - # [[inputs.KNXListener.measurement]] + # [[inputs.knx_listener.measurement]] # name = "illumination" # dpt = "9.004" # addresses = ["5/5/3"] diff --git a/plugins/inputs/knx_listener/knx_listener.go b/plugins/inputs/knx_listener/knx_listener.go index 98f19e922..3896d649b 100644 --- a/plugins/inputs/knx_listener/knx_listener.go +++ b/plugins/inputs/knx_listener/knx_listener.go @@ -56,7 +56,7 @@ func (kl *KNXListener) SampleConfig() string { service_address = "localhost:3671" ## Measurement definition(s) - # [[inputs.KNXListener.measurement]] + # [[inputs.knx_listener.measurement]] # ## Name of the measurement # name = "temperature" # ## Datapoint-Type (DPT) of the KNX messages @@ -64,7 +64,7 @@ func (kl *KNXListener) SampleConfig() string { # ## List of Group-Addresses (GAs) assigned to the measurement # addresses = ["5/5/1"] - # [[inputs.KNXListener.measurement]] + # [[inputs.knx_listener.measurement]] # name = "illumination" # dpt = "9.004" # addresses = ["5/5/3"] @@ -195,5 +195,7 @@ func (kl *KNXListener) listen() { } func init() { + inputs.Add("knx_listener", func() telegraf.Input { return &KNXListener{ServiceType: "tunnel"} }) + // Register for backward compatibility inputs.Add("KNXListener", func() telegraf.Input { return &KNXListener{ServiceType: "tunnel"} }) }