Installation¶
This guide provides the necessary steps to install and configure the Zabbix Agent 2 plugin for OPC UA.
Repository Setup¶
Ensure the following prerequisite packages are installed:
Next, set the ZABBIX_RELEASE environment variable. This must match the version of your installed Zabbix Agent 2.
Then, configure the package repository:
curl -s https://repo.ravenlayer.com/public.gpg | sudo gpg --dearmor -o /usr/share/keyrings/ravenlayer.gpg
sudo tee /etc/apt/sources.list.d/ravenlayer.list > /dev/null << EOF
deb [signed-by=/usr/share/keyrings/ravenlayer.gpg] https://repo.ravenlayer.com/zabbix/${ZABBIX_RELEASE} stable main
EOF
sudo apt update
curl -s https://repo.ravenlayer.com/RPM-GPG-KEY-RAVENLAYER | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-RAVENLAYER
sudo tee /etc/yum.repos.d/ravenlayer.repo > /dev/null << EOF
[ravenlayer]
name=RavenLayer Official Repository - \$basearch
baseurl=https://repo.ravenlayer.com/zabbix/${ZABBIX_RELEASE}/rhel/\$releasever/\$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RAVENLAYER
EOF
Plugin Installation¶
Once the repository is configured, the plugin can be installed with a single command:
After installation, the Zabbix Agent 2 service must be restarted:
Execute the plugin binary to confirm the installation:
Confirm that the Zabbix Agent 2 has successfully loaded the plugin and can access the metrics:
XML Template Import¶
Download and import the XML template into your Zabbix Server. The version you need depends on your Zabbix Server version:
The XML file contains the following Zabbix template:
Template OPC Unified Architecture by Zabbix agent 2
Zabbix Host Configuration¶
Assign the Template OPC Unified Architecture by Zabbix agent 2 monitoring template to the host and configure the following macros:
| Macro | Description | Default |
|---|---|---|
{$OPCUA.URI} |
OPC UA server endpoint URI or session name | opc.tcp://127.0.0.1:4840 |
{$OPCUA.USER} |
Username for OPC UA authentication | |
{$OPCUA.PASSWORD} |
Password for OPC UA authentication |