Extracting from the frontend

In some situations, it might be a simple need to quickly graph some data together with other data that isn't monitored by Zabbix (yet you plan to add it soon, of course), in which case, a quick hack job of spreadsheet magic might be the solution. The easiest way to get data to be used outside of the frontend is actually from the frontend itself.

Let's find out how we can easily get historical data for some item:

  1. Go to Monitoring | Latest data and select A test host from the Hosts filter field, and then click on Filter.
  2. Click on Graph next to CPU Load. That gives us the standard Zabbix graph. That wasn't what we wanted, now, was it? But this interface allows us to access raw data easily using the drop-down menu in the top-right corner—choose Values in there, as shown in the following screenshot:

If the item has stopped collecting data some time ago and you just want to quickly look at the latest values, choose the 500 latest values instead. It'll get you the data with fewer clicks.

One thing worth paying attention to is the time period controls at the top, which are the same as the ones available for graphs, screens, and everywhere else in Zabbix. Using the new time filter, we can display data for any arbitrary period. In the previous time selector, there was a standard of one hour; in the new time selector, you'll notice that it remembers your last choice. In this case, the time selection of one hour is probably fine. For some items that're polled less frequently, we'll often want to use a much longer period:

While we could copy data out of this table with a browser that supports HTML copying, then paste it into some receiving software that can parse HTML, that isn't always feasible. A quick and easy solution is in the upper-right corner—just click on the As plain text button.

This gives us the very same dataset, just without all of the HTML-ish surroundings, such as the Zabbix frontend parts and the table. We can easily save this representation as a file or copy data from it and reuse it in spreadsheet software or any other application. An additional benefit this data provides is that all entries have the corresponding Unix timestamps listed as well.

Technically, this page is still an HTML page. Zabbix users have asked to be provide with a proper plain-text version instead.
..................Content has been hidden....................

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