zabgrab.model.series

Fetched data.

zabgrab.model.series.FORMAT_VERSION

The version of the layout of .h5 and .mat files (and of the metadata in every format). Increase it whenever the layout changes in a way that older versions of zabgrab, or zabgrab_load.m, would misread.

Type:

int

Classes

FetchResult([series, skipped, failed])

Everything a fetch produced.

Series(server, item, resolution, columns[, ...])

The data fetched for one item, as named columns of equal length.

Skipped(server, item, reason)

An item that wasn't fetched, and why.

class zabgrab.model.series.Series(server, item, resolution, columns, requests=())[source]

Bases: object

The data fetched for one item, as named columns of equal length.

Parameters:
server

The server the data came from.

Type:

Server

item

The item, as it was when fetched.

Type:

Item

resolution

Raw history or hourly trends.

Type:

Resolution

columns

The data. The first column is always time (POSIX seconds). Raw data then has value (plus log_time, source, severity and event_id for log items); hourly trends have the selected statistics (min, avg, max, count).

Type:

dict of str to list

requests

Labels of the requests (the template, or __custom for items given on the command line) that matched the item.

Type:

tuple of str

property points: int

The number of data points.

class zabgrab.model.series.Skipped(server, item, reason)[source]

Bases: object

An item that wasn’t fetched, and why.

Parameters:
server

The item’s server.

Type:

Server

item

The item.

Type:

Item

reason

Why it wasn’t fetched, as a sentence fragment for messages.

Type:

str

class zabgrab.model.series.FetchResult(series=<factory>, skipped=<factory>, failed=<factory>)[source]

Bases: object

Everything a fetch produced.

Parameters:
series

The data, one series per item.

Type:

list of Series

skipped

Items that weren’t fetched because they can’t be (e.g. log items as hourly trends).

Type:

list of Skipped

failed

Items whose download failed, with the error.

Type:

list of Skipped

property points: int

The total number of data points.