Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inputs.opcua does not work properly #11758

Closed
huang-zero opened this issue Sep 4, 2022 · 3 comments
Closed

inputs.opcua does not work properly #11758

huang-zero opened this issue Sep 4, 2022 · 3 comments
Labels
support Telegraf questions, may be directed to community site or slack

Comments

@huang-zero
Copy link

Relevant telegraf.conf

[root@localhost telegraf]# cat opcua.conf
[[inputs.opcua]]
        name = "opcua"
    endpoint = "opc.tcp://192.168.2.207:49320"
    connect_timeout = "10s"
    request_timeout = "5s"
    security_policy = "None"
    security_mode = "None"
    auth_method = "Anonymous"
    nodes = [
    {name="temp", namespace="2", identifier_type="i", identifier="test"},
    ]
[[outputs.file]]
    files = ["stdout", "/tmp/metrics.out"]

Logs from Telegraf

[root@localhost telegraf]# ./telegraf --config opcua.conf
2022-09-04T08:22:54Z I! Starting Telegraf 1.23.3
2022-09-04T08:22:54Z I! Loaded inputs: opcua
2022-09-04T08:22:54Z I! Loaded aggregators:
2022-09-04T08:22:54Z I! Loaded processors:
2022-09-04T08:22:54Z I! Loaded outputs: file
2022-09-04T08:22:54Z I! Tags enabled: host=localhost.localdomain
2022-09-04T08:22:54Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"localhost.localdomain", Flush Interval:10s
2022-09-04T08:22:54Z W! [inputs.opcua] Failed to load certificate: open /etc/telegraf/cert.pem: no such file or directory
2022-09-04T08:23:00Z E! [inputs.opcua] Error in plugin: error in Client Connection: opcua: invalid channel config: Security policy 'http://opcfoundation.org/UA/SecurityPolicy#Basic256' requires a private key

System info

Linux localhost.localdomain 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Docker

No response

Steps to reproduce

Please include the Telegraf logs, ideally with --debug used.

Expected behavior

Please include the Telegraf logs, ideally with --debug used.

Actual behavior

Please include the Telegraf logs, ideally with --debug used.

Additional info

Please include the Telegraf logs, ideally with --debug used.

@huang-zero huang-zero added the bug unexpected problem or unintended behavior label Sep 4, 2022
@reimda
Copy link
Contributor

reimda commented Sep 20, 2022

It looks like you're trying to connect with opcua but the endpoint is not allowing the connection. I would guess that you need to set a security policy and other authentication settings in a way supported by the endpoint.

Please fill out the issue form in the future. The "expected behavior" and "actual behavior" really help us understand what you're trying to do and what you think is wrong. It's hard to help you without this information.

@MyaLongmire MyaLongmire added support Telegraf questions, may be directed to community site or slack and removed bug unexpected problem or unintended behavior labels Sep 20, 2022
@telegraf-tiger
Copy link
Contributor

Hello! I recommend posting this question in our Community Slack or Community Page, we have a lot of talented community members there who could help answer your question more quickly. You can also learn more about Telegraf by enrolling at InfluxDB University for free!

Heads up, this issue will be automatically closed after 7 days of inactivity. Thank you!

@reimda
Copy link
Contributor

reimda commented Sep 20, 2022

This doesn't seem like a problem that requires a change to telegraf so I'm going to close the issue.

@reimda reimda closed this as completed Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Telegraf questions, may be directed to community site or slack
Projects
None yet
Development

No branches or pull requests

3 participants