Skip to content
Snippets Groups Projects
Commit 2bc962b8 authored by Jan Mach's avatar Jan Mach
Browse files

Updated documentation of Hawat`s Timeline pluggable module.

(Redmine issue: #3361)
parent 70d8641c
No related branches found
No related tags found
No related merge requests found
...@@ -97,8 +97,8 @@ API endpoint: **search** ...@@ -97,8 +97,8 @@ API endpoint: **search**
The URL for web API interface is available as normal endpoint to the user of the web The URL for web API interface is available as normal endpoint to the user of the web
interface. This fact can be used to debug the queries interactively and then simply interface. This fact can be used to debug the queries interactively and then simply
copy them to another application. One might for example start with filling in the copy them to another application. One might for example start with filling in the
search form in the ``/events/search`` endpoint. Once you are satisfied with the search form in the ``/timeline/search`` endpoint. Once you are satisfied with the
result, you can simply switch the base URL to the ``/api/events/search`` endpoint result, you can simply switch the base URL to the ``/api/timeline/search`` endpoint
and you are all set. and you are all set.
...@@ -263,6 +263,30 @@ Following parameters may be specified as standard HTTP query parameters: ...@@ -263,6 +263,30 @@ Following parameters may be specified as standard HTTP query parameters:
* *Description:* Invert class selection * *Description:* Invert class selection
* *Datatype:* ``boolean`` * *Datatype:* ``boolean``
``aggregations``
* *Description:* List of statistical aggregations to perform, default is empty and will perform all
* *Datatype:* ``list of strings ['categories','']``
* *Default:* ``[]``
(mentat.stats.idea.ST_SKEY_CATEGORIES, {}, {"aggr_set": "category"}),
(mentat.stats.idea.ST_SKEY_IPS, {}, {"aggr_set": "source_ip"}),
#('', {"aggr_set": "target_ip"}),
(mentat.stats.idea.ST_SKEY_SRCPORTS, {}, {"aggr_set": "source_port"}),
(mentat.stats.idea.ST_SKEY_TGTPORTS, {}, {"aggr_set": "target_port"}),
(mentat.stats.idea.ST_SKEY_SRCTYPES, {}, {"aggr_set": "source_type"}),
(mentat.stats.idea.ST_SKEY_TGTTYPES, {}, {"aggr_set": "target_type"}),
(mentat.stats.idea.ST_SKEY_PROTOCOLS, {}, {"aggr_set": "protocol"}),
(mentat.stats.idea.ST_SKEY_DETECTORS, {}, {"aggr_set": "node_name"}),
(mentat.stats.idea.ST_SKEY_DETECTORTPS, {}, {"aggr_set": "node_type"}),
(mentat.stats.idea.ST_SKEY_ABUSES, {}, {"aggr_set": "cesnet_resolvedabuses"}),
(mentat.stats.idea.ST_SKEY_CLASSES, {}, {"aggr_set": "cesnet_eventclass"}),
(mentat.stats.idea.ST_SKEY_SEVERITIES, {}, {"aggr_set": "cesnet_eventseverity"}),
``limit``
* *Description:* Perform toplisting for address and port statistics
* *Datatype:* ``integer [1..1000]``
* *Default:* ``100``
*Common query parameters* *Common query parameters*
``submit`` ``submit``
...@@ -289,6 +313,12 @@ Parameters ``page``, ``limit`` and ``sortby`` are not supported. ...@@ -289,6 +313,12 @@ Parameters ``page``, ``limit`` and ``sortby`` are not supported.
JSON document, that will be received as a response for the search, can contain JSON document, that will be received as a response for the search, can contain
following keys: following keys:
``aggregations``
* *Description:* This subkey is present in case search was successfull. It contains
list of all aggregations that were actually performed.
* *Datatype:* ``list``
* *Default: ``["categories", "ips", "source_ports", "target_ports", "source_types", "target_types", "protocols", "detectors", "detector_types", "abuses", "classes", "severities"]``
``form_data`` ``form_data``
* *Description:* This subkey is present in case search operation was triggered. * *Description:* This subkey is present in case search operation was triggered.
It contains a dictionary with all query parameters described above and their It contains a dictionary with all query parameters described above and their
...@@ -313,21 +343,17 @@ following keys: ...@@ -313,21 +343,17 @@ following keys:
* ``count`` - Number of statistical datasets used to calculate this result dataset * ``count`` - Number of statistical datasets used to calculate this result dataset
* ``dt_from`` - Lower time boundary of the result dataset * ``dt_from`` - Lower time boundary of the result dataset
* ``dt_to`` - Upper time boundary of the result dataset * ``dt_to`` - Upper time boundary of the result dataset
* ``stats_external`` - Separate statistics calculated for events from external networks
* ``stats_internal`` - Separate statistics calculated for events from internal networks
* ``stats_overall`` - Overall statistics
* ``timeline_cfg`` - Pre-calculated optimized timeline configurations * ``timeline_cfg`` - Pre-calculated optimized timeline configurations
Each of the ``stats_*`` subkeys may in turn contain following subkeys: ``abuses``, Additionally there are following subkeys: ``abuses``, ``categories``, ``classes``,
``analyzers``, ``asns``, ``categories``, ``category_sets``, ``classes``, ``countries``, ``detectors``, ``detector_types``, ``ips``, ``protocols``, ``severities``,
``detectors``, ``detectorsws``, ``ips``, ``severities``. Each of these subkeys ``source_ports``, ``source_types``, ``target_ports``, ``target_types``.
represents aggregation of events by particular attribute. Additionally there Each of these subkeys represents aggregation of events by particular attribute.
are following counters: ``cnt_alerts`` and ``cnt_events`` (synonyms, total number Additionally there is a counter ``cnt_events`` (total number of original events),
of original events), ``cnt_recurring`` (number of recurring events) and ``cnt_unique`` which is an integer. Finally there is a ``timeline`` subkey, which contains
(number of new unique events). Finally there is a ``timeline`` subkey, which contains
eveything that was described so far, but rendered to the timeline. eveything that was described so far, but rendered to the timeline.
* *Datatype:* ``list of dictionaries`` * *Datatype:* ``dictionary``
``items_count`` ``items_count``
* *Description:* This subkey is present in case search operation was triggered. * *Description:* This subkey is present in case search operation was triggered.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment