Global scripts

Looking at values and graphs on the frontend is nice and useful, but there are cases when extra information might be needed right away, or there might be a need to manually invoke an action, such as starting an upgrade process, rebooting the system, or performing some other administrative task. Zabbix allows us to execute commands directly from the frontend—this feature is called global scripts. Let's see what is available out of the box. Navigate to Monitoring | Problems and click on the hostname in any of the entries:

The second part of this menu has convenience links to various sections in the frontend. The first part, labeled SCRIPTS, is what we are after. Currently, Zabbix ships with three preconfigured scripts—Detect operating system, Ping, and Traceroute. We will discuss them in a bit more detail later, but for now just click on Ping. A pop-up window will open with the output of this script:

Notice the slight delay; the target host was pinged three times, and we had to wait for that to finish to get the output.

Global scripts are available by clicking on the host in several locations in the frontend from such a context menu. These locations are as follows:

  • Monitoring | Dashboard (in the Problems widget)
  • Monitoring | Overview (when hosts are located on the left-hand side)
  • Monitoring | Latest data (when showing data from more than one host)
  • Monitoring | Maps
  • Inventory | Hosts, where clicking on the Host name will open the inventory overview
  • Reports | Triggers top 100

Calling those three scripts while preconfigured hinted at the fact that we can configure our own. Let's do just that. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset