Description Usage Arguments Details Value Author(s) See Also Examples
query_logs_df()
sends a httr POST request via
Datadog-API and returns a data.frame()
.
1 2 | query_logs_df(query, time_from = "now -1h", time_to = "now", ...,
include_meta_data = FALSE)
|
query |
the search query using the Datadog search syntax. |
time_from |
the starting point as ISO-8601 string, Unix timestamp or in relative time eg. |
time_to |
the end point as ISO-8601 string, Unix timestamp or in relative time eg. |
... |
optional parameters. |
include_meta_data |
should Datadog query metadata be included? |
Only the query result will be returned, for metadata and request headers use query_logs_httr
.
More details on all optional parameters can be found at the Datadog API description: Datadog-API
For the request the addresses specified with set_api_top_level_domains
are used.
By default maximum 10 logs will be returned per response, higher numbers can be set via the limit
parameter with
a maximum of limit = 1000
.
In case no results are found or invalid parameters are used for the request, an empty data.frame()
will
be returned.
For more details about the httr response see httr-package.
data.frame()
with the result data or an empty data.frame()
.
Benjamin Holzknecht
query_logs_httr
, set_api_top_level_domains
, send_json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
query_logs_df("POST 200", time_from = "now -1d")
# get all from last hour
query_logs_df("POST 200", time_from = "now -1d", limit = 30)
# with ISO 8601 date-time format
query_logs_df("POST 200", time_from = "2020-01-18T13:00Z", limit = 1)
# limtit = 1000 --> maximum per response
query_logs_df("POST 200", time_from = "now -1d", limit = 1000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.