NodePing.Results (NodePing Elixir v1.7.1) View Source
Get check results and uptime information
Link to this section Summary
Functions
Retrieves information about current "events" for checks. Events include down events and disabled checks. If you need a list of all checks with their passing/failing state, please use the 'checks' list rather than this 'current' call.
Retrieves information about current "events" for checks. Events include down events and disabled checks. If you need a list of all checks with their passing/failing state, please use the 'checks' list rather than this 'current' call.
Retrieves information about "events" for checks. Events include down events and disabled checks.
Retrieves information about "events" for checks. Events include down events and disabled checks.
Get results for specified check
Get results for specified check
Get uptime information for a check
Get uptime information for a check
Link to this section Functions
Retrieves information about current "events" for checks. Events include down events and disabled checks. If you need a list of all checks with their passing/failing state, please use the 'checks' list rather than this 'current' call.
## Parameters
token
- NodePing API token that was provided with accountcustomerid
- optional ID to access a subaccount
Retrieves information about current "events" for checks. Events include down events and disabled checks. If you need a list of all checks with their passing/failing state, please use the 'checks' list rather than this 'current' call.
Parameters
token
- NodePing API token that was provided with accountcustomerid
- optional ID to access a subaccount
Retrieves information about "events" for checks. Events include down events and disabled checks.
https://nodeping.com/docs-api-results.html#events
Parameters
token
- NodePing API token that was provided with accountid
- Check id of the check you want to get events foropts
- Optional list of tuples to specify returned results
Opts
start
- Start date to retrieve events from a specific range of time.end
- End date to retrieve events from a specific range of time.limit
- limit for the number of records to retrieve.
Examples
iex> token = System.fetch_env!("TOKEN")
iex> checkid = "201205050153W2Q4C-0J2HSIRF"
iex> start = "2020-06"
iex> end = "2020-07"
iex> limit = 10
iex> opts = [{:start, start}, {:end, end}, {:limit, limit}]
iex> {:ok, results} = NodePing.Results.get_events(token, checkid, opts)
Retrieves information about "events" for checks. Events include down events and disabled checks.
https://nodeping.com/docs-api-results.html#events
Parameters
token
- NodePing API token that was provided with accountid
- Check id of the check you want to get events foropts
- Optional list of tuples to specify returned results
Opts
start
- Start date to retrieve events from a specific range of time.end
- End date to retrieve events from a specific range of time.limit
- limit for the number of records to retrieve.
Examples
iex> token = System.fetch_env!("TOKEN")
iex> checkid = "201205050153W2Q4C-0J2HSIRF"
iex> start = "2020-06"
iex> end = "2020-07"
iex> limit = 10
iex> opts = [{:start, start}, {:end, end}, {:limit, limit}]
iex> results = NodePing.Results.get_events!(token, checkid, opts)
Get results for specified check
Parameters
token
- NodePing API token that was provided with accountid
- Check id of the check you want to getopts
- Optional arguments to filter results. Empty list if no opts.customerid
- optional ID to access a subaccount
The list of values for opts
can be found in NodePing's documents here:
https://nodeping.com/docs-api-results.html#get
Opts
span
- number of hours of results to retrieve. If used in combination with limit the narrower range will be used.limit
- optional integer - number of records to retrieve. Defaults to 300 if span is not set.start
- date/time for the start of the results. Timestamps should be milliseconds, or an RFC2822 or ISO 8601 dateend
- date/time for the end of the results.offset
- integer offset to have the system perform uptime calculations for a different time zone.clean
- boolean sets whether to use the older format for the result record that includes a doc object.true
strongly recommended
Examples
iex> opts = [{:span, 48}, {:limit, 10}]
iex> token = System.fetch_env!("TOKEN")
iex> checkid = "201205050153W2Q4C-0J2HSIRF"
iex> {:ok, results} = NodePing.Results.get_results(token, checkid, opts)
Get results for specified check
Parameters
token
- NodePing API token that was provided with accountid
- Check id of the check you want to getopts
- Optional arguments to filter results. Empty list if no opts.customerid
- optional ID to access a subaccount
The list of values for opts
can be found in NodePing's documents here:
https://nodeping.com/docs-api-results.html#get
Opts
span
- number of hours of results to retrieve. If used in combination with limit the narrower range will be used.limit
- optional integer - number of records to retrieve. Defaults to 300 if span is not set.start
- date/time for the start of the results. Timestamps should be milliseconds, or an RFC2822 or ISO 8601 dateend
- date/time for the end of the results.offset
- integer offset to have the system perform uptime calculations for a different time zone.clean
- boolean sets whether to use the older format for the result record that includes a doc object.true
strongly recommended
Examples
iex> opts = [{:span, 48}, {:limit, 10}]
iex> token = System.fetch_env!("TOKEN")
iex> checkid = "201205050153W2Q4C-0J2HSIRF"
iex> results = NodePing.Results.get_results!(token, checkid, opts)
Get uptime information for a check
Parameters
token
- NodePing API token that was provided with accountid
- Check id of the check you want to get uptime information aboutopts
- optional list of args for specifying the range of information to gather. Empty list for no optscustomerid
- optional ID to access a subaccount
Opts
interval
- "days" or "months". "months" is the defaultstart
- date/time for the start of the results. Timestamps should be milliseconds, or an RFC2822 or ISO 8601 dateend
- date/time for the end of the results.
Examples
iex> opts = [{:interval, "days"}, {:start, "2020-02"}, {:end, "2020-05"}]
iex> token = System.fetch_env!("TOKEN")
iex> checkid = "201205050153W2Q4C-0J2HSIRF"
iex> {:ok, results} = NodePing.Results.get_results(token, checkid, opts)
Get uptime information for a check
Parameters
token
- NodePing API token that was provided with accountid
- Check id of the check you want to get uptime information aboutopts
- optional list of args for specifying the range of information to gather. Empty list for no optscustomerid
- optional ID to access a subaccount
Opts
interval
- "days" or "months". "months" is the defaultstart
- date/time for the start of the results. Timestamps should be milliseconds, or an RFC2822 or ISO 8601 dateend
- date/time for the end of the results.
Examples
iex> opts = [{:interval, "days"}, {:start, "2020-02"}, {:end, "2020-05"}]
iex> token = System.fetch_env!("TOKEN")
iex> checkid = "201205050153W2Q4C-0J2HSIRF"
iex> results = NodePing.Results.get_results(token, checkid, opts)