404
edits
No edit summary |
No edit summary |
||
Line 23: | Line 23: | ||
Allegro recommends to set up a separate non-admin user with or without the pcap role for the REST API of only statistics shall be gathered. This will prevent to accidentally shut down or change any configuration by calling the REST API. | Allegro recommends to set up a separate non-admin user with or without the pcap role for the REST API of only statistics shall be gathered. This will prevent to accidentally shut down or change any configuration by calling the REST API. | ||
== Useful shell commands and their parameters == | == Useful shell commands and their parameters == | ||
Line 216: | Line 212: | ||
</pre> | </pre> | ||
=== Time interval selection === | |||
Requests can be given a time interval. The following GET parameters are necessary: | Requests can be given a time interval. If present, the '''interval''' counters are adjusted to this interval. The following GET parameters are necessary: | ||
* starttime, endtime: Start and end time of the interval. Format: seconds since 1970/01/01 UTC (Unix time, epoch). | * starttime, endtime: Start and end time of the interval. Format: seconds since 1970/01/01 UTC (Unix time, epoch). You can use <code>date +%s</code> on your machine to adjust to the best interval. Please consult the man page of date for more parameters. | ||
* timespan: Duration of the interval selection in seconds. | * timespan: Duration of the interval selection in seconds. | ||
Line 230: | Line 226: | ||
==== Extract received and transmitted bytes in a time interval (18/06/11 9:00 - 10:00) of a specific IP ==== | ==== Extract received and transmitted bytes in a time interval (18/06/11 9:00 - 10:00) of a specific IP ==== | ||
<code>curl --silent -k -u USER:PASSWORD 'https://allegro-mm | <code>curl --silent -k -u USER:PASSWORD 'https://allegro-mm/API/stats/modules/ip/ips/10.1.2.3?timespan=3600&starttime=1528700400&endtime=1528704000' | jq '.interval[1] + .interval[3]'</code> | ||
=== Accessing parallel pcap analysis === | |||
The Allegro can process in parallel offline traffic like a pcap file or a ring buffer. In case a parallel PCAP analysis is running, the API call must be given the additional header field <code>"X-AllegroPackets-Multimeter-ID: :1"</code> with the PCAP instance ID. | |||
This allows to extract information of automated pcap uploads. | |||
== Examples == | == Examples == |
edits