ShowPolledData API

このAPIでは、期間を指定し、監視や監視グループからポーリング データを取得できます。

XMLでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/xml/ShowPolledData?apikey=[API_KEY]

JSONでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/json/ShowPolledData?apikey=[API_KEY]

リクエスト パラメーター

フィールド説明
resourceid データ取得元のリソースのIDを指定してください。
attributeID ポーリングやアーカイブのデータを取得する際に必要な属性のIDを指定ください。
period
ダウンタイム情報の取得対象とする期間を指定します。
0:当日
3:前日
6:今週
1、-7:最新7日
12:先週
7:今月
2、-30:最新30日
11:今月
9:今四半期
8:今年
5:最新1年
20:ポーリング データすべてを取得
startDateendDate ShowPoleldData APIで上記以外の期間を指定し、期間のカスタマイズをするには、startDateとendDateをご利用ください。値はYYYY-MM-DD HH:MM形式で指定してください。HH部分は24時間制とします。
その際、「period」に4を指定すると、期間のカスタマイズを行うとの指定が可能です。

URLサンプル

全ポーリング データ

XMLでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/xml/showPolledData?apikey=8c8ec3f2cd30722d3a6f980df12c1e5f&resourceid=10000042&period=20&attributeID=310

JSONでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/json/showPolledData?apikey=8c8ec3f2cd30722d3a6f980df12c1e5f&resourceid=10000042&period=20&attributeID=3102

最新7日データ:

XMLでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/xml/showPolledData?apikey=8c8ec3f2cd30722d3a6f980df12c1e5f&resourceid=10000042&period=-7&attributeID=3102

JSONでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/json/showPolledData?apikey=8c8ec3f2cd30722d3a6f980df12c1e5f&resourceid=10000042&period=-7&attributeID=3102

最新30日データ:

XMLでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/xml/showPolledData?apikey=8c8ec3f2cd30722d3a6f980df12c1e5f&resourceid=10000042&period=-30&attributeID=3102

JSONでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/json/showPolledData?apikey=8c8ec3f2cd30722d3a6f980df12c1e5f&resourceid=10000042&period=-30&attributeID=3102

期間のカスタマイズ

XMLでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/xml/ShowPolledData?apikey=3d6d7d7fcabfc818ad28de01aa1c9773&resourceid=10000016&attributeID=1938&period=4&startDate=2017-11-06 11:20&endDate=2017-11-16 11:40

JSONでレスポンスを受けるには

http://[APM Host]:[APM Port]/AppManager/json/ShowPolledData?apikey=3d6d7d7fcabfc818ad28de01aa1c9773&resourceid=10000016&attributeID=1938&period=4&startDate=2017-11-06 11:20&endDate=2017-11-16 11:40

レスポンス詳細

フィールド説明

StartTime

7日データ/30日データ/ポーリング データのレポート作成起動時刻を取得できます(UNIX時間開始からの経過ミリ秒)。

EndTime

7日データ/30日データ/ポーリング データのレポート作成終了時刻を取得できます(UNIX時間開始からの経過ミリ秒)。
StartDateTime 7日データ/30日データ/ポーリング データのレポート作成起動時刻を取得できます(日時形式)。
EndDateTime 7日データ/30日データ/ポーリング データのレポート作成終了時刻を取得できます(日時形式)。
RerouceName データを返した監視の名前を指します。
ResourceType データを返したリソースのタイプを指します。
AttributeName 属性の名前を指します。
Unit 属性の単位を指します。
AttributeID ユーザーのIDを指します。
ReportType API呼び出しが返すデータのタイプを指します(ポーリング データ、7日データ、30日データ)。
BusinessPeriod 営業期間の名前を表します。
resourceid 監視のリソースIDを指します。
AttributeImage データの属性グラフが返ります。
Status ShowPolledData API呼び出しのステータスがわかります。
Period 戻り値のデータ タイプがわかります。20はポーリング データ、-7は1日分アーカイブ、-30は30日分アーカイブであることを示します。
RawData
  • CollectionTime:データ収集時のタイム スタンプを提示します(ミリ秒)。
  • DateTime:データ収集時のタイム スタンプを提示します(日時形式)。
  • Value:属性の値を表します。
ArchiveData
  • ArchivedTime:アーカイブ時刻を示します(ミリ秒)。
  • DateTime:アーカイブ時刻を示します(日時形式)。
  • AvgValue:アーカイブ期間での平均値です。
  • MinValue:アーカイブ期間での最小値です。
  • MaxValue:アーカイブ期間での最大値です。

レスポンス サンプル

入力XML:

http://apm-prod1:9090/AppManager/xml/ShowPolledData?apikey=c4e547c2330e2eb92d3e7af2262da9e9&resourceid=20000039&period=20&attributeID=1957

XMLレスポンス:

<AppManager-response uri="/AppManager/xml/ShowPolledData">
<result>
<response response-code="4000">
<Monitorinfo StartTime="1328775260450" EndDateTime="Mar 29, 2012 3:00 PM" ResourceName="APM-Windows" Unit="ms" EndTime="1333013434474" BusinessPeriod="NA" MonitorType="Response Time" ReportType="Polled data" ResourceId="10001267" AttributeID="4602" AttributeImage="/webclient/temp/images/RSVmYs.jpg" ServerType="GlassFish" Status="SUCCESS" StartDateTime="Feb 9, 2012 1:44 PM" Period="20">
<RawData CollectionTime="1333013434474" Value="1" DateTime="Mar 29, 2012 3:00 PM"/>
<RawData CollectionTime="1333013134022" Value="1" DateTime="Mar 29, 2012 2:55 PM"/>
<RawData CollectionTime="1333012833497" Value="1" DateTime="Mar 29, 2012 2:50 PM"/>
<RawData CollectionTime="1333012532708" Value="1" DateTime="Mar 29, 2012 2:45 PM"/>
<RawData CollectionTime="1333012227193" Value="1" DateTime="Mar 29, 2012 2:40 PM"/>
<RawData CollectionTime="1328775260450" Value="1" DateTime="Feb 9, 2012 1:44 PM"/>
</Monitorinfo>
</response>
</result>
</AppManager-response>

JSONでレスポンスを受けるには

http://apm-prod1:9090/AppManager/json/ShowPolledData?apikey=c4e547c2330e2eb92d3e7af2262da9e9&resourceid=20000039&period=20&attributeID=1957

JSONレスポンスのサンプル

{"response-code":"4000","response":{"uri":"/AppManager/json/ShowPolledData","result":[{"StartTime":"1337928634448","EndDateTime":"May 25, 2012 3:32 PM","ResourceName":"apm-prod1_Windows Vista","Unit":"%","EndTime":"1337940130413","BusinessPeriod":"NA","ReportType":"Polled data","ThresholdDetails":[],"ResourceId":"20000039","AttributeName":"CPU利用率","AttributeID":"1957","AttributeImage":"/webclient/temp/images/fjrEKg.jpg","Status":"SUCCESS","RawData":[{"CollectionTime":"1337940130413","Value":"18","DateTime":"May 25, 2012 3:32 PM"},{"CollectionTime":"1337939525577","Value":"11","DateTime":"May 25, 2012 3:22 PM"},{"CollectionTime":"1337938920641","Value":"5","DateTime":"May 25, 2012 3:12 PM"},{"CollectionTime":"1337938315808","Value":"6","DateTime":"May 25, 2012 3:01 PM"},{"CollectionTime":"1337937710788","Value":"7","DateTime":"May 25, 2012 2:51 PM"},{"CollectionTime":"1337937105838","Value":"7","DateTime":"May 25, 2012 2:41 PM"},{"CollectionTime":"1337936500971","Value":"9","DateTime":"May 25, 2012 2:31 PM"},{"CollectionTime":"1337935895963","Value":"18","DateTime":"May 25, 2012 2:21 PM"},{"CollectionTime":"1337935291160","Value":"7","DateTime":"May 25, 2012 2:11 PM"},{"CollectionTime":"1337934686297","Value":"31","DateTime":"May 25, 2012 2:01 PM"},{"CollectionTime":"1337934079880","Value":"13","DateTime":"May 25, 2012 1:51 PM"},{"CollectionTime":"1337933475084","Value":"16","DateTime":"May 25, 2012 1:41 PM"},{"CollectionTime":"1337932869853","Value":"34","DateTime":"May 25, 2012 1:31 PM"},{"CollectionTime":"1337932263739","Value":"8","DateTime":"May 25, 2012 1:21 PM"},{"CollectionTime":"1337931658583","Value":"7","DateTime":"May 25, 2012 1:10 PM"},{"CollectionTime":"1337931053751","Value":"17","DateTime":"May 25, 2012 1:00 PM"},{"CollectionTime":"1337930448921","Value":"9","DateTime":"May 25, 2012 12:50 PM"},{"CollectionTime":"1337929844110","Value":"6","DateTime":"May 25, 2012 12:40 PM"},{"CollectionTime":"1337929239270","Value":"3","DateTime":"May 25, 2012 12:30 PM"},{"CollectionTime":"1337928634448","Value":"9","DateTime":"May 25, 2012 12:20 PM"}],"ResourceType":"Windows Vista","StartDateTime":"May 25, 2012 12:20 PM","Period":"20"}]}}