fix: Rename KNXListener to knx_listener (#9741)

This commit is contained in:
Sven Rebhan 2021-09-23 16:10:44 +02:00 committed by GitHub
parent 045adcb700
commit ceae37d66e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 13 deletions

View File

@ -6802,7 +6802,7 @@
# # Listener capable of handling KNX bus messages provided through a KNX-IP Interface. # # Listener capable of handling KNX bus messages provided through a KNX-IP Interface.
# [[inputs.KNXListener]] # [[inputs.knx_listener]]
# ## Type of KNX-IP interface. # ## Type of KNX-IP interface.
# ## Can be either "tunnel" or "router". # ## Can be either "tunnel" or "router".
# # service_type = "tunnel" # # service_type = "tunnel"
@ -6811,7 +6811,7 @@
# service_address = "localhost:3671" # service_address = "localhost:3671"
# #
# ## Measurement definition(s) # ## Measurement definition(s)
# # [[inputs.KNXListener.measurement]] # # [[inputs.knx_listener.measurement]]
# # ## Name of the measurement # # ## Name of the measurement
# # name = "temperature" # # name = "temperature"
# # ## Datapoint-Type (DPT) of the KNX messages # # ## Datapoint-Type (DPT) of the KNX messages
@ -6819,7 +6819,7 @@
# # ## List of Group-Addresses (GAs) assigned to the measurement # # ## List of Group-Addresses (GAs) assigned to the measurement
# # addresses = ["5/5/1"] # # addresses = ["5/5/1"]
# #
# # [[inputs.KNXListener.measurement]] # # [[inputs.knx_listener.measurement]]
# # name = "illumination" # # name = "illumination"
# # dpt = "9.004" # # dpt = "9.004"
# # addresses = ["5/5/3"] # # addresses = ["5/5/3"]
@ -9099,4 +9099,3 @@
# [[inputs.zipkin]] # [[inputs.zipkin]]
# # path = "/api/v1/spans" # URL path for span data # # path = "/api/v1/spans" # URL path for span data
# # port = 9411 # Port on which Telegraf listens # # port = 9411 # Port on which Telegraf listens

View File

@ -11,7 +11,7 @@ This is a sample config for the plugin.
```toml ```toml
# Listener capable of handling KNX bus messages provided through a KNX-IP Interface. # Listener capable of handling KNX bus messages provided through a KNX-IP Interface.
[[inputs.KNXListener]] [[inputs.knx_listener]]
## Type of KNX-IP interface. ## Type of KNX-IP interface.
## Can be either "tunnel" or "router". ## Can be either "tunnel" or "router".
# service_type = "tunnel" # service_type = "tunnel"
@ -20,7 +20,7 @@ This is a sample config for the plugin.
service_address = "localhost:3671" service_address = "localhost:3671"
## Measurement definition(s) ## Measurement definition(s)
# [[inputs.KNXListener.measurement]] # [[inputs.knx_listener.measurement]]
# ## Name of the measurement # ## Name of the measurement
# name = "temperature" # name = "temperature"
# ## Datapoint-Type (DPT) of the KNX messages # ## 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 # ## List of Group-Addresses (GAs) assigned to the measurement
# addresses = ["5/5/1"] # addresses = ["5/5/1"]
# [[inputs.KNXListener.measurement]] # [[inputs.knx_listener.measurement]]
# name = "illumination" # name = "illumination"
# dpt = "9.004" # dpt = "9.004"
# addresses = ["5/5/3"] # addresses = ["5/5/3"]

View File

@ -56,7 +56,7 @@ func (kl *KNXListener) SampleConfig() string {
service_address = "localhost:3671" service_address = "localhost:3671"
## Measurement definition(s) ## Measurement definition(s)
# [[inputs.KNXListener.measurement]] # [[inputs.knx_listener.measurement]]
# ## Name of the measurement # ## Name of the measurement
# name = "temperature" # name = "temperature"
# ## Datapoint-Type (DPT) of the KNX messages # ## 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 # ## List of Group-Addresses (GAs) assigned to the measurement
# addresses = ["5/5/1"] # addresses = ["5/5/1"]
# [[inputs.KNXListener.measurement]] # [[inputs.knx_listener.measurement]]
# name = "illumination" # name = "illumination"
# dpt = "9.004" # dpt = "9.004"
# addresses = ["5/5/3"] # addresses = ["5/5/3"]
@ -195,5 +195,7 @@ func (kl *KNXListener) listen() {
} }
func init() { 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"} }) inputs.Add("KNXListener", func() telegraf.Input { return &KNXListener{ServiceType: "tunnel"} })
} }