to learn more visit https://github.com/axibase/atsd-docs/tree/master/api
API request attributes could be specified either in constructor or be explicitly setted to object via setters.
Two code blocks are equivalent:
>>> prop = Property(TYPE, ENTITY)
>>> prop.set_tags({TAG: tag_value})
>>> prop.set_key({KEY: KEY_VALUE})
>>> prop = Property(TYPE, ENTITY,
tags={TAG: tag_value}
key={KEY: KEY_VALUE})
Class representing a single query to get series matching provided filters and parameters.
Class representing a single query to get properties matching provided filters and parameters.
Class representing a single query to delete properties matching provided filters and parameters.
Class representing a single query to get all alerts matching provided filters and parameters.
Class representing a single query to get a history for an alert matching provided filters and parameters.
Class representing a single query to get messages matching provided filters and parameters.
Class needed to filter entities during queries. One of the entity fields is required. Entity name pattern may include ? and * wildcards. Field precedence, from high to low: entity, entities, entityGroup. Although multiple fields can be specified in the query object only the field with higher precedence will be applied.
list of entity names or entity name patterns
str entity name or entity name pattern.
str filter entities by name, entity tag, and properties using special syntax
str entity group name. Return records for member entities of the specified group. The result will be empty if the group doesn’t exist or contains no entities.
datetime object | long milliseconds | str ISO 8601 date. End of the selection interval. Matches records timestamped at or after startDate. Examples: 2016-07-18T11:11:02+02:00, previous_day - 1 * HOUR
dict. Duration of the selection interval, specified as count and unit. Example: {“count”: 5, “unit”: “MINUTE”}
datetime object | long milliseconds | str ISO 8601 date. Start of the selection interval. Matches records timestamped at or after startDate. Examples: 2016-07-18T11:11:02Z, current_hour
str metric name
dict
SeriesType type of underlying data: HISTORY, FORECAST, FORECAST_DEVIATION. Default: HISTORY
str unique forecast name. Identifies a custom forecast by name. If forecastName is not set, then the default forecast computed by the database will be returned. forecastName is applicable only when type is set to FORECAST or FORECAST_DEVIATION
str scan order for applying the limit: DESC - descending, ASC - ascending. Default: DESC
int maximum number of time:value samples returned for each series. Default: 0.
str optional identifier used to associate query object in request with series objects in response.
str time format for data array. iso or milliseconds. Default: iso
Class that represents a numeric value observed at some time with additional version information if provided. If multiple samples have the same timestamp and are inserted for the same series, the latest sample prevails, unless the metric is optionally enabled for version tracking.
class:datetime object | long milliseconds | str ISO 8601 date
Class representing a Time Series. Time Series is a time-indexed array of samples (observations), each consisting of a timestamp and a numeric value, for example CPU utilization or body temperature. Each series is uniquely identified by entity name, metric name and optional series tags.
Add all given samples to series
str entity name
Parameters: |
|
---|---|
Returns: | Series with data from pandas time series |
str metric name
Plot series in matplotlib.pyplot
Sort series data in place :param key: :param reverse:
dict of tag_name: tag_value pairs
Valid versions of series times in seconds :return: list of float
Returns: | pandas time series object |
---|
Valid versions of series values :return: list of Number
Class representing a single property. Properties represent metadata describing entities, obtained from configuration files, system command output, etc. Property examples are device model, OS version, and location. Unlike time series, the database stores only cache value for each property and such value is stored as text. Properties are collected at a lower frequency than time series or whenever their values change. Each properties record is uniquely identified by entity name, property type and optional property keys.
datetime object | long milliseconds | str ISO 8601 date, for example 2016-05-25T00:15:00Z. Set to server time at server side if omitted.
str entity name
dict of name: value pairs that uniquely identify the property record
dict of name: value pairs that are not part of the key and contain descriptive information about the property record.
str property type name
Class, representing an single alert. Alert is an event produced by the rule engine by applying pre-defined rules to incoming data. An alert is created when an expression specified in the rule evaluates to true and it is closed, when the expression returns false. The users can set acknowledge/de-acknowledge status for open alerts. The rule expressions can operate on series, message, and property commands.
bool acknowledgement status
str entity
str | datetime | long milliseconds when the last record was received
str metric
str | datetime | long milliseconds when the alert was open
Number first numeric value received.
int number of times when the expression evaluated to true sequentially
str rule
dict
str text value
Number last numeric value received
Class representing history of an alert, including such values as alert duration, alert open date, repeat count, etc.
Number time in milliseconds when alert was in OPEN or REPEAT state
str | datetime | long
datetime object | long milliseconds | str ISO 8601 date
str
str
str | datetime | long
int
str
str
str
str
str alert state when closed: OPEN, CANCEL, REPEAT
Number last numeric value received
int window length
Class representing a Message. Messages are events collected from system logs and messaging systems. Messages are stored in ATSD to support correlation with other data types, for example, to relate log events with resource bottleneck alerts. Each message is related to an entity, has a set of tags and a free-form text message. Messages for the same entity, time and type/source tags are automatically de-duplicated.
datetime | long milliseconds | str ISO 8601 date when the message record was created
str entity name
str
str message source
str message tags
str message type
Class representing a single entitiy. Entities are servers, hosts, frames, virtual machines, sensors, etc. Entities are ingested with attached metrics (time series data) using the csv/nmon parsers, telnet and http/s protocols, and Axibase Collector jobs.
bool enabled status. Incoming data is discarded for disabled entities
datetime object | long milliseconds | str ISO 8601 date. Last time when a value was received by the database for this entity
dict
Class representing a single metric. Metrics are names assigned to numeric measurements, for example, temperature or speed. A time-indexed array of measurements for a given entity and metric is called a time-series (or simply series). Metrics specify how incoming data should be stored (data type), validated and pruned. In addition, metrics can have user-defined tags such as unit of measurement, scale, type or a category that can be used for filtering and grouping.
str metric description
bool
If filter is specified, metric puts that do not match the filter are discarded
str
datetime object | long milliseconds | str ISO 8601 date. Last time a value was received for this metric by any series
Number maximum value for Invalid Action trigger
Number minimum value for Invalid Action trigger
str metric name
bool persistence status. Non-persistent metrics are not stored in the database and are only processed by the rule engine
Number number of days to retain values for this metric in the database
dict
boolean If set to true, enables versioning for the specified metric. When metrics is versioned, the database retains the history of series value changes for the same timestamp along with version_source and version_status
Class representing a single entity group. Entities can be grouped into Entity Groups which can be used for building Portals, Exporting Data, and creating Forecasts. Forecasts can be calculated for all entities present in the group. Data or Forecasts can be exported for all entities present in the group. Portals can be added to all entities present in the Group. This is a useful feature when working with large amounts of entities and big data sets.
str group membership expression. The expression is applied to entities to automatically add/remove members of this group
str entity group name
dict
Class representing aggregate param ‘group’
Class representing aggregate param ‘rate’
Class representing aggregate param ‘aggregate’