Search code examples
zabbixesxi

Zabbix get the result of running a command on the ESXi server


On the ESXi server (I connect via SSH), I execute the command to view the SMART disk:

esxcli storage core device smart get -d=t10.ATA_INTEL_SSDSC2BB080G4__PHSL4

How can I pass the received data to Zabbix?

I'm trying to create an Item with type "script". I create this Item in a template. The template already connects to ESXi using macros, Zabbix receives data. But in the script field of the Item, you simply cannot insert this command, you just need to write the script.


Solution

  • In Zabbix a Script is a command you can execute using Host the context menù, or a command you can execute as an Action, when a Problem is triggered.

    An item to perform a command via SSH, should use the "SSH agent" item type.

    You cannot perform an esxcli command through the vSphere HTTPS SDK with Zabbix.

    See

    Example:

    ssh command as an item