zeus package

Submodules

zeus.client module

class zeus.client.ZeusClient(user_token, server)[source]

Zeus Client class, implementing wrapper methods for the Zeus API.

deleteMetric(metric_name)[source]

Delete an entire metric from Zeus.

Parameters:metric_name (string) – Pattern for the metric name.
Return type:boolean
getLog(log_name, attribute_name=None, pattern=None, from_date=None, to_date=None, offset=None, limit=None)[source]

Return array of dict with the logs that match the params.

Parameters:
  • log_name (string) – Name of the log.
  • attribute_name (string) – Name of field to be searched. If omitted,

search all fields. :param string pattern: Pattern to match the logs against. :param string from_date: Unix formatted start date. :param string to_date: Unix formatted end date. :param string offset: Result offset. :param string limit: Max number of results in the return. :rtype: array

getMetric(metric_name, from_date=None, to_date=None, aggregator_function=None, aggregator_column=None, group_interval=None, filter_condition=None, offset=None, limit=None)[source]

Return array of dict with the metrics that match the params.

Parameters:
  • metric_name (string) – Name of the metric.
  • from_date (string) – Unix formatted start date.
  • to_date (string) – Unix formatted end date.
  • aggregator_function (string) – Aggregator function. sum,

count, min, max,... :param string aggregator_column: Column to which aggregator_function is to be applied. :param string group_interval: Intervals in which to group the results. :param string filter_condition: Filters to be applied to metric values. :param string offset: Result offset. :param string limit: Max number of results in the return. :rtype: array

getMetricNames(metric_name=None, limit=None, offset=None)[source]

Return array of string with the metric names that match the params.

Parameters:
  • metric_name (string) – Pattern for the metric name.
  • limit (string) – Max number of results in the return.
  • limit – Starting offset in the resulting list. The default

value is 0 (first result). :rtype: array

sendLog(log_name, logs)[source]

Return dict saying how many logs were successfully inserted with log_name.

Parameters:
  • log_name (string) – String with the name of the log.
  • logs (dict) – array of dict containing the logs to send.
Return type:

dict

sendMetric(metric_name, metrics)[source]

Return dict saying how many metrics were successfully inserted with metric_name.

Parameters:
  • metric_name (string) – String with the name of the metric.
  • metrics (dict) – array of dict containing the metrics to send.
Return type:

dict

exception zeus.client.ZeusException[source]

Bases: exceptions.Exception

Module contents