diff --git a/providers/opcua/config/config.go b/providers/opcua/config/config.go index 6b7206ee1d..3823058f97 100644 --- a/providers/opcua/config/config.go +++ b/providers/opcua/config/config.go @@ -15,16 +15,22 @@ var Config = plugin.Provider{ ConnectionTypes: []string{provider.ConnectionType}, Connectors: []plugin.Connector{ { - Name: "opcua", - Use: "opcua", - Short: "OPC UA", + Name: "opcua", + Use: "opcua [--endpoint ]", + Short: "OPC UA", + Long: `opcua is designed for querying resources on an OPC UA (Open Platform +Communications Unified Architecture) server, a protocol facilitating machine-to-machine communications within +the realm of industrial automation. +`, + Discovery: []string{}, Flags: []plugin.Flag{ { Long: "endpoint", Type: plugin.FlagType_String, Default: "", - Desc: "OPC UA service endpoint", + Desc: "OPC UA endpoint URL of the OPC UA server in the format opc.tcp://:", + Option: plugin.FlagOption_Required, }, }, }, diff --git a/providers/opcua/main.go b/providers/opcua/main.go index b9a75a5831..7d4b4316f8 100644 --- a/providers/opcua/main.go +++ b/providers/opcua/main.go @@ -10,6 +10,13 @@ import ( "go.mondoo.com/cnquery/providers/opcua/provider" ) +// This is the entry point for the OPCUA provider. +// +// To test the provider, start the simulator: +// docker run --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest --pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --gn=5 --ut --dca +// +// Once the simulator is running, you can query it: +// cnquery shell opcua --endpoint opc.tcp://localhost:50000 func main() { plugin.Start(os.Args, provider.Init()) }