Creating custom User Commands
User Commands are a convenient way to troubleshoot a device from the user interface and Zenoss Core includes a few such commands by default, such as ping, snmpwalk, and traceroute. By combining shell commands and TALES expressions, we can run commands against our devices from within the Zenoss Core web portal.
The following screenshot shows the defined commands, which you can see by navigating to Advanced | Settings | Commands:
Note
Although the terminology is similar, User Commands are different than Event Commands. We can run user commands against a device. An event command is a shell script that gets executed as a result of an event.
Let's examine the ping
command. The actual command Zenoss Core executes against the device is ping -c2 ${device/manageIp}. The first half of the command construction (ping
-c2
) is a ping command that sends no more than two ping requests. The second half of the command (${device/manageIp}
is a TALES expression that substitutes the...