Changelog¶
1.0.0 (2026-10-15)¶
Complete rewrite; not compatible with earlier versions’ command line or configuration. See the documentation at https://seands.github.io/zabgrab/.
Requirements and setup
Requires Python 3.11+ and Zabbix 7.0+. Plotting is an optional extra (
pip install 'zabgrab[plot]').New layered TOML configuration (system, user, project, explicit) with validation errors that point at the offending file and key, and an example configuration (
config.example.toml). Newzabgrab config paths|show|editcommands.Multiple servers can be configured; each fetch uses one, chosen with
--server, the template or[defaults], or at a prompt (custom URLs can be saved to the config).API tokens are read from an environment variable or the system keyring, or pasted at a prompt; username/password login is also supported. New
zabgrab token list|add|delete|resetcommands manage tokens in the keyring.Global options (
-v,-q,--debug,--config,--isolated,--no-input, …) work before or after the command.Anything missing is asked for, and afterwards zabgrab shows the equivalent command for next time. Scripts and scheduled jobs never get a prompt (
--no-input,$ZABGRAB_NO_INPUTor$CI, or no terminal): questions with a safe answer get it, with a warning, and the others stop with instructions. zabgrab exits with status 3 when only some items could be fetched.
Finding items
New
zabgrab hostsandzabgrab itemscommands to find hosts and items, with patterns that work as in the Zabbix API. Items are sorted by item ID, or by any column withitems --sort.
Fetching
New
zabgrab fetchcommand: a template and/or--itemitem specs, parallel downloads with progress bars, raw history or hourly trends, every item value type,--explainand--dry-run.--aggapplies to hourly trends only; with raw data it’s ignored with a warning.Fetches matching more than
max_itemsitems (by default 50) ask before downloading them all (--yesskips the question).fetchandupdatewarn when the requested range starts before an item’s history (or, for hourly trends, trend) storage period, since older data may have been deleted.Times are shown and read in local time, or the
timezonesetting; files store them in UTC.fetch --save-template NAMEsaves a fetch, with any answers to questions, as a template (--save-topicks the config file;--forcereplaces a template).
Saving
MATLAB v7.3 (
.mat), HDF5 (.h5), TSV and CSV output, each with metadata recording exactly what was fetched, and automatic file names (output_dirandoutput_pattern)..matand.h5files hold one group per fetch;fetch --appendadds groups to existing files, and notes when the new data’s range overlaps a group already in the file for the same items.-ocan be given several times tofetch,exportandplot, to save to several files at once, e.g.-o data.h5 -o data.csvor-o plot.png -o plot.pdf.When
fetchasks whether to save the data under its automatic name,olets you type another path instead.Saving many text values to a
.matfile, which stores them inefficiently, warns and offers.h5instead (--allow-large-textaccepts it)..matand.h5files record their layout’s version in each group’s metadata (zabgrab.format_version). zabgrab andzabgrab_load.mrefuse groups written with a newer layout, rather than misread them, and zabgrab won’t append to their files.Fetched files store each item’s Zabbix tags, so
--item 'tag=...'works on them too.
Updating files
New
zabgrab update FILEcommand to add the data since a file’s last fetch, with the same items and settings. It writes through a safety copy (--in-placeskips it),--rematchpicks up items added since, and items deleted from Zabbix are skipped with a warning naming them.
Using files
New
zabgrab info FILEcommand listing a file’s items (or, with--groups, its fetch groups; with--overlaps, how many of each group’s points another group also holds).New
zabgrab plot FILEcommand andfetch --plotoption (with theplotextra) to plot data, merged across groups, showing or saving the figure;--log-yuses log scales.New
zabgrab export FILEcommand to merge a file’s groups into a new file, optionally converting, filtering items and times.plot,exportandinfoselect items with--itemitem specs, asfetchdoes, matching exactly as the Zabbix API would (e.g.--item 'host=lab1,name=*0.3*'), and with--matchfnmatchpatterns (*,?,[seq]) matched against each item’s whole ID, name, key orhost: name. When nothing matches, they suggestzabgrab info.New MATLAB function
matlab/zabgrab_load.mto load a file’s merged data.
Documentation and fixes
New documentation, built with Sphinx, at https://seands.github.io/zabgrab/.
Fixed: the old CSV output’s columns shifted when timeseries had different lengths.
0.1.2 (2023-12-12)¶
Changed CSV output format to display retrieved timeseries in parallel columns instead of sequentially.
Avoid the user’s editor complaining that the config file doesn’t exist.
Added
--no-ssl-verifyflag to switch off SSL certificate verification.
0.1.1 (2023-03-15)¶
First packaged release. No other changes.
0.1.0 (2023-02-08)¶
Initial release.