metric#

Autogenerated API

argus_api.lib.metrics.v1.metric.metric.aggregate_metrics(descriptor: str, descriptorDomain: str = None, customer: str = None, customerDomain: str = None, keys: dict = None, keyIntervals: dict = None, subCriteria: dict = None, startTimestamp: str = None, endTimestamp: int = None, resolution: int = None, resolutionUnit: str = None, groupBy: dict = None, calendarInterval: str = None, values: dict = None, sortBy: str = None, groupByCustomer: bool = None, includeOthers: bool = True, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict#

Fetch metrics that matches given aggregation criteria (PUBLIC)

Parameters
  • descriptor (str) – Shortname or ID of descriptor

  • descriptorDomain (str) – Domain which is used if short name is specified for ‘descriptor’ parameter. Defaults to current user domain.

  • customer (list) – Restrict result set to records bound to specified customers. The list accepts both ID or shortname for the customers. For global metrics, this field should not be set.

  • customerDomain (str) – Restrict result set to records with customers from the specific domain. The field accepts ID or shortname for the domain.

  • keys (dict) – Restrict result set to records with these key names and key values. Must match the keys given in the descriptor, but IP type allows using IP ranges, such as 192.168.0.0/16 for IPv4 or 2001:db8::/48 for IPv6. Deprecated, use keyIntervals instead.

  • keyIntervals (list) – List of key intervals, to filter the aggregation on. (default null)

  • subCriteria (list) – Set additional criterias to be applied as specified in the subcriteria object(s) (AND, AND NOT, OR). (default OR)

  • startTimestamp (str) – Restrict result set to records submitted after this time.Allows unix timestamp (milliseconds), ISO timestamp, or relative time specifies.

  • endTimestamp (int) – Restrict result set to records submitted before this time. Allows unix timestamp (milliseconds), ISO timestamp, or relative time specifies. (default now)

  • resolution (int) – Aggregation resolution period in units specified by ‘resolutionUnit’ property. If 0 the resolution is the entire time span given by the start and end timestamps. If the expected combination of timestamps, resolution, and resolution unit would result in more buckets than ElasticSearch permits, which is 10000, then the request will be denied. Note that the initial calculation on this is rough, and that ES might still deny the request. In which case lower the resolution.

  • resolutionUnit (str) – Units for aggregation resolution. (default millisecond)

  • groupBy (list) – List of descriptor’s key names for aggregating the result. The result will be grouped into key buckets up to the limit given.The buckets themselves will be ordered in a descending order based on the values aggregated.

  • calendarInterval (str) – States the calendar interval the aggregation results should be sorted by, such as month or year.It only allows for a resolution of 1, and overrides the resolution unit such that if calendar interval is week, then the result will be in intervals of 1 whole week, expanding backwards in time for start and forwards for end. It is by defaults not used and set to null. (default null)

  • values (list) – Descriptor’s values included in aggregation result.

  • sortBy (list) – Fields to sort result by. The results are sortable by any of the keys or values in the resulting aggregation. Note: you have to provide the exact names of the fields you need the sorting done on. So if the resulting field name is ‘value1_sum’ this is what has to be provided. The sorting is prioritized based on the order given, and in the case of key and value having the same name, then the value is used, while the key is ignored. Note: use ‘-’ to sort in desc order. By default the results are not sorted. To sort by customer use option field name ‘customerID’.

  • groupByCustomer (bool) – States whether Metric records will be aggregated by customers. It defaults to false. (default false)

  • includeOthers (bool) – States whether the aggregation results will contain buckets for the data not included in the keys given by the groupBy field.Is not used if the groupBy field is empty. It defaults to true. (default true)

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.Response object will be returned.

  • verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.

  • apiKey – Argus API key.

  • authentication – authentication override

  • server_url – API base URL override

  • body – body of the request. other parameters will override keys defined in the body.

  • api_session – session to use for this request. If not set, the global session will be used.

Raises
Returns

dictionary translated from JSON

argus_api.lib.metrics.v1.metric.metric.search_metrics(descriptor: str, descriptorDomain: str = None, customer: str = None, customerDomain: str = None, keys: dict = None, keyIntervals: dict = None, subCriteria: dict = None, startTimestamp: str = None, endTimestamp: int = None, offset: int = None, sortBy: str = None, limit: int = 25, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict#

Search the submitted metrics for a specific descriptor. (PUBLIC)

Parameters
  • descriptor (str) – Shortname or ID of descriptor

  • descriptorDomain (str) – Domain which is used if short name is specified for ‘descriptor’ parameter. Defaults to current user domain.

  • customer (list) – Restrict result set to records bound to specified customers. The list accepts both ID or shortname for the customers. For global metrics, this field should not be set.

  • customerDomain (str) – Restrict result set to records with customers from the specific domain. The field accepts ID or shortname for the domain.

  • keys (dict) – Restrict result set to records with these key names and key values. Must match the keys given in the descriptor, but IP type allows using IP ranges, such as 192.168.0.0/16 for IPv4 or 2001:db8::/48 for IPv6. Deprecated, use keyIntervals instead.

  • keyIntervals (list) – List of key intervals, to filter the aggregation on. (default null)

  • subCriteria (list) – Set additional criterias to be applied as specified in the subcriteria object(s) (AND, AND NOT, OR). (default OR)

  • startTimestamp (str) – Restrict result set to records submitted after this time.Allows unix timestamp (milliseconds), ISO timestamp, or relative time specifies.

  • endTimestamp (int) – Restrict result set to records submitted before this time. Allows unix timestamp (milliseconds), ISO timestamp, or relative time specifies. (default now)

  • offset (int) – Set this value to skip the first (offset) objects. By default, return result from first object.Cannot, in combination with the limit, exceed 10000, as this will exceed the Elasticsearch search window.

  • sortBy (list) – Fields to sort result by. The results are sortable by any of the keys or values in the descriptor,e.g. ‘suricata_detections’ is sortable by ‘host, interface, alerts, rules_loaded’.The sorting is prioritized based on the order given, and in the case of both key and value having the same name,then the value is used, while the key is ignored.Note: use ‘-’ to sort in desc order. By default the results are sorted by timestamp.

  • limit (int) – Set this value to set max number of results. Cannot exceed 10000 which is the Elasticsearch search window. (default 25)

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.Response object will be returned.

  • verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.

  • apiKey – Argus API key.

  • authentication – authentication override

  • server_url – API base URL override

  • body – body of the request. other parameters will override keys defined in the body.

  • api_session – session to use for this request. If not set, the global session will be used.

Raises
Returns

dictionary translated from JSON

argus_api.lib.metrics.v1.metric.metric.submit_metric(descriptor: str, descriptorDomain: str = None, records: dict = None, ignoreOnFailed: bool = None, json: bool = True, verify: Optional[bool] = None, proxies: Optional[dict] = None, apiKey: Optional[str] = None, authentication: Optional[dict] = None, server_url: Optional[str] = None, body: Optional[dict] = None, api_session: Optional[ArgusAPISession] = None) dict#

Submit new metric (PUBLIC)

Parameters
  • descriptor (str) – ID or short name of metric descriptor

  • descriptorDomain (str) – Domain which is used if short name is specified for ‘descriptor’ parameter. Defaults to current user domain.

  • records (list) – Metric records for submission.

  • ignoreOnFailed (bool) – Set this value for successful response even failures occur while submitting. (default false)

  • json – return the response’s body as a dict parsed from json. True by default. If set to false, the raw requests.Response object will be returned.

  • verify – path to a certificate bundle or boolean indicating whether SSL verification should be performed.

  • apiKey – Argus API key.

  • authentication – authentication override

  • server_url – API base URL override

  • body – body of the request. other parameters will override keys defined in the body.

  • api_session – session to use for this request. If not set, the global session will be used.

Raises
Returns

dictionary translated from JSON