Get Downtime Details API


This API is used to obtain the downtime data use of a monitor or a monitor group requested by the user for a specific period of time.

Syntax

API for XML Response

http://[ APM Host ]:[ APM Port ]/AppManager/xml/GetDowntimeDetails?apikey=[API Key ]&type=[value]&period=[period]&resourceid=[resourceid]&showFullDetails=true

API for JSON Response

http://[ APM Host ]:[ APM Port ]/AppManager/json/GetDowntimeDetails?apikey=[API Key ]&type=[value]&period=[period]&resourceid=[resourceid]&showFullDetails=true

Request Parameters

Field Description
apikey The key generated using the Generate API Key option in the 'Admin' tab.
resourceid The resource id of the monitor, using which you can ping the host corresponding to the monitor. You can get downtime details for multiple resource ids by using comma separated values.
period

The period for which the downtime details have been requested:

Period: 0 ===> Today

Period: 3 ===> Yesterday

Period: 6 ===> This Week

Period: 1 ===> Last 7 days

Period: 12 ===> Last Week

Period: 7 ===> This Month

Period: 2 ===> Last 30 days

Period: 11 ===> Last Month

Period: 9 ===> This Quarter

Period: 8 ===> This Year

Period: 5 ===> Last 1 year

type The Type parameter is used to list all the monitors in a specified monitor type. Possible values can be Linux, Windows XP, MYSQL-DB-server, Apache-server, UrlMonitor, Tomcat-server, etc.
showFullDetails An optional parameter used to specify if user needs downtime details on a daily basis as additional data in response. Values are true or false (false dy default).

Examples

XML Input

http://apm-prod1:9090/AppManager/xml/GetDowntimeDetails?apikey=c4e547c2330e2eb92d3e7af2362da9e9&type=windows&period=6&resourceid=10000135&showFullDetails=true

XML Response

<AppManager-response uri="/AppManager/xml/GetDowntimeDetails"> <result> <response response-code="4000"> <Monitor AvailabilityMessage="-" AvailabilitySeverity="-"DisplayName="app-centos5-64- 2" DownPercent="0.12" Period="20"ResourceId="10000143" SchedulePercent="0.0"TotalDownTimeInSecs="300" UnmanagePercent="0.0" UpPercent="99.88"/> </response> </result> </AppManager-response>

JSON Input

http://apm-prod1:9090/AppManager/xml/GetDowntimeDetails?apikey=c4e547c2330e2eb92d3e7af2362da9e9&type=windows&period=6&resourceid=10000135&showFullDetails=true

JSON Response

{"response":{"result":[{"AvailabilityMessage":"-","SchedulePercent":"0.0","DisplayName":"appcentos5-64-2","ResourceId":"10000143","UnmanagePercent":"0.0",

"AvailabilitySeverity":"-","TotalDownTimeInSecs":"300","DownPercent":"0.12","UpPercent":"99.88","Period":"20"}],"uri":"/AppManager/json/GetDowntimeDetails"},"response-code":"4000"}

Using Multiple Resource Ids

XML Input

http://localhost:9840/AppManager/xml/GetDowntimeDetails?apikey=91f1aa274abdeea8ef8e49a1e37ce1be&period=20&resourceid=10000110,10000171,10000108&showFullDetails=true


XML Response

<AppManager-response uri="/AppManager/xml/GetDowntimeDetails">
<result>
<response response-code="4000">
<Monitor AvailabilityMessage="-" AvailabilitySeverity="-" DisplayName="172.24.116.154_PGSQL"
DownPercent="0.0" Period="20" ResourceId="10000108" SchedulePercent="0.0"
TotalDownTimeInSecs="0" UnmanagePercent="0.0" UpPercent="100.0"/>
<Monitor AvailabilityMessage="-" AvailabilitySeverity="-" DisplayName="AppManager Home Page"
DownPercent="0.0" Period="20" ResourceId="10000110" SchedulePercent="0.0"
TotalDownTimeInSecs="0" UnmanagePercent="0.0" UpPercent="100.0"/>
<Monitor AvailabilityMessage="-" AvailabilitySeverity="-" DisplayName="Localhost"
DownPercent="0.0" Period="20" ResourceId="10000171" SchedulePercent="0.0"
TotalDownTimeInSecs="0" UnmanagePercent="0.0" UpPercent="100.0"/>
</response>
</result>
</AppManager-response>

Response Parameters

Field Description
AvailabilityMessage The current availability RCA message of the resource.
SchedulePercent The total scheduled downtime percentage of the resource.
DisplayName The display name of the resource.
ResourceId The resource id of the monitor, using which you can ping the host corresponding to the monitor.
UnmanagePercent The total unmanaged downtime percentage of the resource.
TotalDownTimeInSecs The total number of Seconds of Downtime.
AvailabilitySeverity The current availability severity of the resource.
DownPercent The total downtime percentage of the resource.
UpPercent The total uptime percentage of the resource.
Period

The period for which the downtime details have been requested:

Period: 0 ===> Today

Period: 3 ===> Yesterday

Period: 6 ===> This Week

Period: 1 ===> Last 7 days

Period: 12 ===> Last Week

Period: 7 ===> This Month

Period: 2 ===> Last 30 days

Period: 11 ===> Last Month

Period: 9 ===> This Quarter

Period: 8 ===> This Year

Period: 5 ===> Last 1 year

Downtimes ( displayed only when requested for FullDetails)
Field Description
Date Represents the date for which the below details are calculated
DownPercent Downtime percentage on above for the above date field
SchedulePercent Scheduled downtime percentage on above for the above date field
UpPercent Availability percentage on above for the above date field
UnmanagePercent Unmanaged percentage on above for the above date field
DowntimeSummary
(Appears only if there is a downtime on that date)
Field Description
DownTimeMillis Total Downtime in Milliseconds
ex: 1342381696674
UpTime Formatted Time at which the resource went up after being down for some period.
ex: 3:28:42 PM
DownTime Formatted Time at which the resource went down.
ex: 1:18:17 AM
TotalDownTime Total downtime in Hrs,mins and sec
ex: 14 Hrs 10 Mins 25 Secs
ReasonID Reason Id for the Below mentioned Downtime Reason. (-1 if no information is available for downtime)
Downtime_Reason Reason for downtime occured.
ex: Outage is due to power supply.

No Information Available. : if no reason is mentioned