Description Usage Arguments Details Value Author(s) See Also Examples
uptimerobots.monitors.responses
return a dataset with general informations
for a set of monitors.
1 2 3 | uptimerobot.monitors(api.key, monitors = NULL, types = NULL,
statuses = NULL, search = NULL, summary = list(), limit = 50,
offset = 0, fields = uptimerobot.fields("monitor")$typical)
|
api.key |
A valid key for connecting to UptimeRobors public API. |
monitors |
vector or comma-delimited string with the IDs of the monitors to get. If not used or set to |
types |
vector or comma-delimited string of monitor types. If not used or set to |
statuses |
vector or comma-delimited string of monitor statuses. If not used or set to |
search |
An optional keyword of to search within monitor URL or friendly name to get filtered results. |
summary |
list of logical values to flag summary indicators to add to the output dataset. |
limit |
An integer value used for pagination. Defines the max number of records to return in each page. Default and max. is 50. |
offset |
An integer value to set the index of the first monitor to get (used for pagination). |
fields |
vector or comma-delimited string with the general informations to include in the output dataset.
You may want to use the helper function |
If a vector of monitor is not given, the function will return data for all the available monitors.
summary
parameter expect a lists of three named logic values that set which columns of additional statistics for each monitor must be added to output dataset for
each available monitor. These are summary values only, as the instances are obtained using a set of dedicated functions.
response.times
set to TRUE
to add a column with the number of pings with response times available for the monitor to the output. These values can be queried using uptimerobot.monitor.responses
function.
log.records
set to TRUE
to add a column with the number of log entries recorded for the monitor to the output. These records can be queried using uptimerobot.monitor.logs
function.
alert.contacts
set to TRUE
to add a column with the number of alert contacts binded to the monitor to the output. Detailed informations about these contacts can be queried using uptimerobot.monitor.contacts
function.
You may just add the elements you want to include into the list, as they default to FALSE
if missing. Set an empty list to exclude all the summary statistics from the output.
The API uses pagination and returns no more than 50 monitors on each page. Use limit
and offset
to set a different number of
monitors to get on each page and to move between pages. Leave default values to get all the data.
A dataset with general informations about the given monitors
Gabriele Baldassarre
uptimerobot.monitor.responses
, uptimerobot.monitor.logs
, uptimerobot.monitor.contacts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# Let's assume the api.key is available into the environment variable KEY
api.key <- Sys.getenv("KEY", "")
# Returns all the monitors with a default set of attributes
monitors.df <- uptimerobot.monitors(api.key)
#' # Returns all the monitors of 'keyword' type
monitors.kwd..df <- uptimerobot.monitors(api.key, type="keyword")
# Returns all the monitors and all the attributes
monitors.full.df <- uptimerobot.monitors(api.key, fields=uptimerobot.fields("monitor")$full))
# Returns only the two monitors with ID: 1234, 5678
monitors.df <- uptimerobot.monitors(api.key, c("1234", "5678"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.