Stats - Monitoring statistics.
WSDL: https://api.cloudmonit.pl/2.0.0/wsdl/Stats.wsdl
JSON: https://api.cloudmonit.pl/2.0.0/json/Stats.json
This module contains methods to fetch monitoring statistics for your services.
Returns a list of service checks from a chosen period of time.
A single check is identified by the triple service_id
,
location_id
and iteration_id
.
Checks with the same iteration_id
and service_id
are logically connected: they are performed from all locations at the same time,
and whether the service works or not is determined by examining all of the results (the minimum required percentage of locations reporting an error can be set by the error_tolerance
service feature).
Each check represents a single "dot" in the response time plot (see this screenshot).
The parameter plotted is check_time
.
Vertical lines represent checks with the same iteration_id
,
and colorful lines connecting the points connect checks with the same location_id
s (you can get these "official" location colors by using the Read and Find methods from the Location module if you like).
The start of the time interval to fetch the checks from (Unix timestamp).
The service's identifier.
The end of the time interval to fetch the checks from (Unix timestamp).
If omitted,
from + 3600
will be used.
The time interval cannot be longer than one hour,
otherwise most recent checks will be skipped.
An array of objects, each containg the fields:
The service response time in microseconds.
Total time (in ms) spent connecting to the server(s) in all requests, including estabilishing the TCP connection and SSL negotiation (only for FullPage services / scenarios).
Total size of data feched during the check (in bytes).
For FullPage services - the size of the page HTML code (see total_data_size
)
The error description (if there was an error).
Total time (in ms) spent resolving server name (DNS) in all requests (only for FullPage services / scenarios).
True if the check failed (there was an error).
The error type identifier (if there was an error). See methods in the Error module to for a list of errors.
True if the check generated a HAR file (you can fetch the file with the Stats::HARContent method).
True if the check was ignored. This usually means failure of the location to supply the results (for example due to monitoring station breakdown).
The iteration ID.
This value must match the /^\d{6,15}$/
regular expression.
The ID of the location where the check was performed.
The name of the location.
The time of the slowest request (in ms, only for FullPage services / scenarios).
The time of the fastest request (in ms, only for FullPage services / scenarios).
Total time (in ms) spent receiving the responses to all requests (only for FullPage services / scenarios).
Total number of failed HTTP requests performed during the check (only for FullPage services / scenarios).
Total number of successful HTTP requests performed during the check (only for FullPage services / scenarios).
Total number of HTTP requests that were skipped due to global service check timeout (only for FullPage services / scenarios).
Total time (in ms) spent sending the requests (only for FullPage services / scenarios).
The last step of the scenario that was executed (only if the service is a scenario).
The Unix timestamp of the service check.
Total size of data received in all HTTP requests during the check (only for FullPage services / scenarios).
Total time (in ms) spent waiting for the server to respond (to receive the first byte of the HTTP response) in all requests (only for FullPage services / scenarios).
This method can be called by read-only users.
Most recent errors detected for a service.
How many errors to fetch.
Minimum: 0
Maximum: 100
The service's identifier.
An array of objects, each containg the fields:
The error code.
The Unix timestamp of the error detection.
The ID of the location where the error was detected.
The error name.
This method can be called by read-only users.
Returns an encoded HAR file. A single HAR file is identified by the service id, iteration id and location id
The iteration ID, as returned by HARList, ResponseTime or Checks.
This value must match the /^\d{6,15}$/
regular expression.
The location's identifier.
The service's identifier.
The content of the selected HAR file.
This method can be called by read-only users.
Returns a list of HAR file identifiers for a service from a chosen period of time.
The start of the time interval to fetch the HARs from (Unix timestamp).
The service's identifier.
The end of the time interval to fetch the stats from (Unix timestamp).
If omitted,
from + 3600
will be used.
The time interval cannot be longer than one hour,
otherwise most recent HARs will be skipped.
An array of objects, each containg the fields:
The iteration ID.
This value must match the /^\d{6,15}$/
regular expression.
The ID of the location where the check was performed.
The name of the location.
The Unix timestamp of the service check.
This method can be called by read-only users.
Returns the JSON or WSDL specification of the Stats
API module.
This method is meant for internal usage in API clients. Unless you are writing one, you probably do not need it.
The specification format you want to use.
If omitted,
defaults to json
if you call this method using JSON request ot wsdl
if you call this method with SOAP.
Allowed values are: json
,
wsdl
.
The specification of the module.
The specification format used.
Allowed values are: json
,
wsdl
.
This method can be called by read-only users.
Returns number of service checks in a month for each partner's user. Only partners can call this method.
The number of the month, from 1 to 12. If not specified, the current month is used.
Minimum: 1
Maximum: 12
The number of the year. If not specified, the current year is used.
An array of objects, each containg the fields:
The number of service checks in the selected month for this user. FullPage and FullPageHttps services count as 5, sent SMS notifications count as 350.
The user's login.
The user's ID.
This method can be called by read-only users.
Returns number of service checks in a month for each partner user's group. Only partners can call this method.
The number of the month, from 1 to 12. If not specified, the current month is used.
Minimum: 1
Maximum: 12
The number of the year. If not specified, the current year is used.
An array of objects, each containg the fields:
The number of service checks in the selected month for this group. FullPage and FullPageHttps services count as 5, SMS notifications are not included.
The group ID.
The user's login.
The user's ID.
This method can be called by read-only users.
Service response time statistics for a time interval.
The start of the time interval to fetch the stats from (Unix timestamp)
The service's identifier.
The end of the time interval to fetch the stats from (Unix timestamp)
The grouping interval,
NULL if the results are not grouped.
Whether they are grouped or not depends on the length of the requested time interval (end
- start
).
An array of objects, each containg the fields:
Whether the check generated a HAR file (downloadable with the "HARContent" method)
The highest response time in the interval.
The iteration ID, only if interval is NULL.
This value must match the /^\d{6,15}$/
regular expression.
The ID of the location the result comes from. If NULL, the result is the average response time from all locations (the results are divided to locations only for small time intervals).
The location's name.
The lowest response time in the interval.
The response time for the interval or check.
The Unix timestamp of the beginning of the interval.
This method can be called by read-only users.
Returns service level (percentage of time the service worked correctly) for a single service or all services in a chosen time period.
The start of the time interval (Unix timestamp). Will be rounded up to a full hour. If not specified, the service level will be calculated from the whole service's history.
The service's identifier. If omitted, service level for all services will be returned.
The end of the time interval (Unix timestamp). Will be rounded up to a full hour. If not specified, the current time will be used.
An array of objects, each containg the fields:
The service's name.
The service's identifier.
The service level percentage.
This method can be called by read-only users.
Hourly service availability statistics.
The start of the time interval to fetch the stats from (Unix timestamp). It will be rounded down to a full hour.
The service's identifier.
The end of the time interval to fetch the stats from (Unix timestamp). It will be rounded up to a full hour. The length of the interval should not be greater than 30 days, otherwise the oldest results will be skipped.
An array of objects, each containg the fields:
The service availability during this hour (percentage).
The Unix timestamp of the beginning of the hour.
This method can be called by read-only users.
Returns Service Level of all services for the last hour, day and week.
None.
Service Level percentage of all services during the last day.
Service Level percentage of all services during the last hour.
Service Level percentage of all services during the last week.
This method can be called by read-only users.