Collect the results of SSH commands with Zabbix agentless SSH checks.
In environments where Zabbix agent installation is forbidden either by company policies or due to restrictions on the monitored device, we can utilize one of the multiple agentless metric collection methods. One such type of metric collection method is Zabbix SSH checks.
Collect metrics with Zabbix SSH checks:
- SSH checks are completely agentless
- SSH checks can be executed by Zabbix server or Zabbix proxy
- SSH checks support Password or Public key authentication
- Multiple commands can be executed one after another
Check out the video to learn how to collect metrics by using SSH checks.
How to collect metrics by using SSH checks:
- Navigate to Configuration → Hosts and find your host
- Click on the Items button next to the host name
- Press Create item button
- Provide item Name, Key and select the Type of information
- Select the required Authentication method
- Enter the authentication parameters
- Populate the Executed script field with your SSH command
- Click the Add button
- Wait for the data to get collected
- Navigate to Monitoring → Latest data and find your Host and item
- Check if the metric has been collected successfully
Tips and best practices:
- Zabbix preprocessing can be used to transform the collected metrics
- A dedicated OS user can be defined and used for Zabbix SSH checks
- SSHKeyLocation configuration parameter defines the location of the public and private keys for Public key authentication
- It is recommended to use libssh version >= 0.9.5
Tags: metric collection

About Arturs Lontons
Zabbix Certified Expert & Trainer
View all posts by Arturs Lontons