Installation¶
This guide provides the necessary steps to install and configure the Zabbix Agent 2 plugin for SAP Agent.
Repository Setup¶
Ensure the following prerequisite packages are installed:
sudo apt install -y curl gnupg ca-certificates
sudo yum install -y curl
Next, set the ZABBIX_RELEASE environment variable. This must match the version of your installed Zabbix Agent 2.
export ZABBIX_RELEASE='7.0'
export ZABBIX_RELEASE='7.0'
export ZABBIX_RELEASE='7.0'
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
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}/sles/\$releasever/\$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.ravenlayer.com/RPM-GPG-KEY-RAVENLAYER
EOF
Plugin Installation¶
Once the repository is configured, the plugin can be installed with a single command:
sudo apt install -y zabbix-agent2-plugin-sapagent
sudo yum install -y zabbix-agent2-plugin-sapagent
sudo zypper install -y zabbix-agent2-plugin-sapagent
After installation, the Zabbix Agent 2 service must be restarted:
sudo systemctl restart zabbix-agent2
Execute the plugin binary to confirm the installation:
/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-sapagent -V
Confirm that the Zabbix Agent 2 has successfully loaded the plugin and can access the metrics:
zabbix_agent2 -R metrics 2>&1 | grep sap.agent
XML Template Import¶
Download and import the XML template into your Zabbix Server. The version you need depends on your Zabbix Server version:
- Zabbix 5.0 LTS
- Zabbix 5.2
- Zabbix 5.4
- Zabbix 6.0 LTS
- Zabbix 6.2
- Zabbix 6.4
- Zabbix 7.0 LTS
- Zabbix 7.2
- Zabbix 7.4
The XML file contains the following Zabbix template:
Template SAP Host Agent by Zabbix agent 2
Zabbix Host Configuration¶
Assign the Template SAP Host Agent by Zabbix agent 2 monitoring template to the host and configure the following macros:
| Macro | Description | Default |
|---|---|---|
{$SAP.AGENT.URI} |
Connection URI | http://localhost:1128 |
{$SAP.AGENT.USER} |
Username | sapadm |
{$SAP.AGENT.PASSWORD} |
Password |