|
[agent] |
|
interval = "20s" |
|
round_interval = true |
|
metric_batch_size = 1000 |
|
metric_buffer_limit = 10000 |
|
collection_jitter = "0s" |
|
flush_interval = "10s" |
|
flush_jitter = "0s" |
|
precision = "" |
|
debug = true |
|
quiet = false |
|
hostname = "" |
|
omit_hostname = true |
|
|
|
############################################################# |
|
# OUTPUT PLUGINS # |
|
############################################################# |
|
[[secretstores.jose]] |
|
id = "jose_test" |
|
path = "/etc/telegraf/secrets" |
|
password = "tester" # dummy skeleton password for jose |
|
|
|
[[outputs.file]] |
|
data_format = "json" |
|
|
|
[[inputs.opcua]] |
|
## Metric name |
|
name = "ftFabrik" |
|
# |
|
## OPC UA Endpoint URL |
|
endpoint = "opc.tcp://192.168.4.201:4840" |
|
# |
|
## Maximum time allowed to establish a connect to the endpoint. |
|
connect_timeout = "60s" |
|
# |
|
## Maximum time allowed for a request over the established connection. |
|
request_timeout = "60s" |
|
# |
|
## Security policy, one of "None", "Basic128Rsa15", "Basic256", |
|
## "Basic256Sha256", or "auto" |
|
security_policy = "None" |
|
# |
|
## Security mode, one of "None", "Sign", "SignAndEncrypt", or "auto" |
|
security_mode = "None" |
|
# |
|
## Path to cert.pem. Required when security mode or policy isn't "None". |
|
## If cert path is not supplied, self-signed cert and key will be generated. |
|
# certificate = "/etc/telegraf/cert.pem" |
|
# |
|
## Path to private key.pem. Required when security mode or policy isn't "None". |
|
## If key path is not supplied, self-signed cert and key will be generated. |
|
# private_key = "/etc/telegraf/key.pem" |
|
# |
|
## Authentication Method, one of "Certificate", "UserName", or "Anonymous". To |
|
## authenticate using a specific ID, select 'Certificate' or 'UserName' |
|
auth_method = "UserName" |
|
# |
|
## Username. Required for auth_method = "UserName" |
|
username = "OpcUser" |
|
# |
|
## Password. Required for auth_method = "UserName" |
|
password = "@{jose_test:opcua_password}" |
|
# |
|
## Option to select the metric timestamp to use. Valid options are: |
|
## "gather" -- uses the time of receiving the data in telegraf |
|
## "server" -- uses the timestamp provided by the server |
|
## "source" -- uses the timestamp provided by the source |
|
timestamp = "source" |
|
# |
|
## Node ID configuration |
|
## name - field name to use in the output |
|
## namespace - OPC UA namespace of the node (integer value 0 thru 3) |
|
## identifier_type - OPC UA ID type (s=string, i=numeric, g=guid, b=opaque) |
|
## identifier - OPC UA ID (tag as shown in opcua browser) |
|
## tags - extra tags to be added to the output metric (optional); deprecated in 1.25.0; use default_tags |
|
## default_tags - extra tags to be added to the output metric (optional) |
|
## |
|
## Use either the inline notation or the bracketed notation, not both. |
|
# |
|
## Inline notation (default_tags not supported yet) |
|
nodes = [ {name="test", namespace="2", identifier_type="s", identifier="IX_SSC_LightBarrierOutsource_I4"} ] |
|
|
|
data_format = "json" |
|
|
|
|
|
## SAME PLUGIN BUT TAKES PASSWORD VIA ENV VAR TO SEE IF THIS ONE SHOULD WORK! |
|
[[inputs.opcua]] |
|
## Metric name |
|
name = "ftFabrik2" # This is what distinguishes it from the same plugin above |
|
# |
|
## OPC UA Endpoint URL |
|
endpoint = "opc.tcp://192.168.4.201:4840" |
|
# |
|
## Maximum time allowed to establish a connect to the endpoint. |
|
connect_timeout = "60s" |
|
# |
|
## Maximum time allowed for a request over the established connection. |
|
request_timeout = "60s" |
|
# |
|
## Security policy, one of "None", "Basic128Rsa15", "Basic256", |
|
## "Basic256Sha256", or "auto" |
|
security_policy = "None" |
|
# |
|
## Security mode, one of "None", "Sign", "SignAndEncrypt", or "auto" |
|
security_mode = "None" |
|
# |
|
## Path to cert.pem. Required when security mode or policy isn't "None". |
|
## If cert path is not supplied, self-signed cert and key will be generated. |
|
# certificate = "/etc/telegraf/cert.pem" |
|
# |
|
## Path to private key.pem. Required when security mode or policy isn't "None". |
|
## If key path is not supplied, self-signed cert and key will be generated. |
|
# private_key = "/etc/telegraf/key.pem" |
|
# |
|
## Authentication Method, one of "Certificate", "UserName", or "Anonymous". To |
|
## authenticate using a specific ID, select 'Certificate' or 'UserName' |
|
auth_method = "UserName" |
|
# |
|
## Username. Required for auth_method = "UserName" |
|
username = "OpcUser" |
|
# |
|
## Password. Required for auth_method = "UserName" |
|
password = "${OPCUA_PASSWORD}" |
|
# |
|
## Option to select the metric timestamp to use. Valid options are: |
|
## "gather" -- uses the time of receiving the data in telegraf |
|
## "server" -- uses the timestamp provided by the server |
|
## "source" -- uses the timestamp provided by the source |
|
timestamp = "source" |
|
# |
|
## Node ID configuration |
|
## name - field name to use in the output |
|
## namespace - OPC UA namespace of the node (integer value 0 thru 3) |
|
## identifier_type - OPC UA ID type (s=string, i=numeric, g=guid, b=opaque) |
|
## identifier - OPC UA ID (tag as shown in opcua browser) |
|
## tags - extra tags to be added to the output metric (optional); deprecated in 1.25.0; use default_tags |
|
## default_tags - extra tags to be added to the output metric (optional) |
|
## |
|
## Use either the inline notation or the bracketed notation, not both. |
|
# |
|
## Inline notation (default_tags not supported yet) |
|
nodes = [ {name="test", namespace="2", identifier_type="s", identifier="IX_SSC_LightBarrierOutsource_I4"} ] |
|
|
|
data_format = "json" |