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: str = None, timeZone: str = None, resolution: int = None, resolutionUnit: str = None, groupBy: dict = None, calendarInterval: str = None, values: dict = None, sortBy: str = None, skipKeyTranslation: bool = 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)
- param str descriptor
Shortname or ID of descriptor
- param str descriptorDomain
Domain which is used if short name is specified for ‘descriptor’ parameter. Defaults to current user domain.
- param list customer
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.
- param str customerDomain
Restrict result set to records with customers from the specific domain. The field accepts ID or shortname for the domain.
- param dict keys
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.
- param list keyIntervals
List of key intervals, to filter the aggregation on. (default null)
- param list subCriteria
Set additional criterias to be applied as specified in the subcriteria object(s) (AND, AND NOT, OR). (default OR)
- param str startTimestamp
Restrict result set to records submitted after this time.Allows the use of unix timestamp (milliseconds), ISO timestamp, or relative time.
- param str endTimestamp
Restrict result set to records submitted before this time. Allows the use of unix timestamp (milliseconds), ISO timestamp, or relative time. (default now)
- param str timeZone
Settable Timezone. For more information please refer to official java documentation
https://docs.oracle.com/middleware/12211/wcs/tag-ref/MISC/TimeZones.html If not set the data will be localized according to user’s timezone. (default null)
- param int resolution
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.
- param str resolutionUnit
Units for aggregation resolution. (default millisecond)
- param list groupBy
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.
- param str calendarInterval
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)
- param list values
Descriptor’s values included in aggregation result.
- param list sortBy
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’.
- param bool skipKeyTranslation
Whether to skip key translation and return the raw value. (default false)
- param bool groupByCustomer
DEPRECATED: States whether Metric records will be aggregated by customers. Deprecated, use the groupBy field. (default false)
- param bool includeOthers
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)
- param json
return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.- param verify
path to a certificate bundle or boolean indicating whether SSL verification should be performed.
- param apiKey
Argus API key.
- param authentication
authentication override
- param server_url
API base URL override
- param body
body of the request. other parameters will override keys defined in the body.
- param api_session
session to use for this request. If not set, the global session will be used.
- raises AuthenticationFailedException
on 401
- raises AccessDeniedException
on 403
- raises ObjectNotFoundException
on 404
- raises ValidationFailedException
on 412
- raises ArgusException
on other status codes
- 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: str = None, timeZone: str = None, offset: int = None, sortBy: str = None, skipKeyTranslation: bool = 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)
- param str descriptor
Shortname or ID of descriptor
- param str descriptorDomain
Domain which is used if short name is specified for ‘descriptor’ parameter. Defaults to current user domain.
- param list customer
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.
- param str customerDomain
Restrict result set to records with customers from the specific domain. The field accepts ID or shortname for the domain.
- param dict keys
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.
- param list keyIntervals
List of key intervals, to filter the aggregation on. (default null)
- param list subCriteria
Set additional criterias to be applied as specified in the subcriteria object(s) (AND, AND NOT, OR). (default OR)
- param str startTimestamp
Restrict result set to records submitted after this time.Allows the use of unix timestamp (milliseconds), ISO timestamp, or relative time.
- param str endTimestamp
Restrict result set to records submitted before this time. Allows the use of unix timestamp (milliseconds), ISO timestamp, or relative time. (default now)
- param str timeZone
Settable Timezone. For more information please refer to official java documentation
https://docs.oracle.com/middleware/12211/wcs/tag-ref/MISC/TimeZones.html If not set the data will be localized according to user’s timezone. (default null)
- param int offset
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.
- param list sortBy
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.
- param bool skipKeyTranslation
Whether to skip key translation and return the raw value. (default false)
- param int limit
Set this value to set max number of results. Cannot exceed 10000 which is the Elasticsearch search window. (default 25)
- param json
return the response’s body as a
dict
parsed from json.True
by default. If set to false, the rawrequests.Response
object will be returned.- param verify
path to a certificate bundle or boolean indicating whether SSL verification should be performed.
- param apiKey
Argus API key.
- param authentication
authentication override
- param server_url
API base URL override
- param body
body of the request. other parameters will override keys defined in the body.
- param api_session
session to use for this request. If not set, the global session will be used.
- raises AuthenticationFailedException
on 401
- raises AccessDeniedException
on 403
- raises ObjectNotFoundException
on 404
- raises ValidationFailedException
on 412
- raises ArgusException
on other status codes
- 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 rawrequests.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
AuthenticationFailedException – on 401
AccessDeniedException – on 403
ValidationFailedException – on 412
ArgusException – on other status codes
- Returns
dictionary translated from JSON