本文へスキップ

統計データの参照

パラメータ設定ガイド

パラメータ説明
stime参照開始時間、UTC(UNIX epoch time、 millisecond)
etime参照終了時間、UTC(UNIX epoch time、 millisecond)
filter基本的にm5で自動設定されます。時間範囲内に5分の統計を取得するためにm5を使用します。
5秒の統計はs5を使用し、1時間の統計はh1を使用します。
oid特定のサーバーのみをモニタリングする場合は、次を追加してください。

Exception

GET https://api.whatap.io/open/api/json/exception/stime/etime

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/exception/1535554800000/1535641200000"
response
{
"records": [
{
"oids": "[-1459620666]",
"time": 1535557500000,
"classHash": -1811136020,
"count": 14,
"service": "/account/delete/dept/daegu",
"class": "java.sql.SQLException(0)",
"serviceHash": 1900616259,
"snapSeq": "6068699991557528332",
"msg": "Sql Exception"
},
(...)
],
"total": 2063
}

HTTP外部呼び出し

GET https://api.whatap.io/open/api/json/httpc/stime/etime

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/httpc/1535554800000/1535641200000"
response
{
"records": [
{
"Sum": 22628,
"Port": 10002,
"Url": "/remote/account/save/employee/kwangju",
"Host": "127.0.0.1",
"Max": 1815,
"Stdev": "247.95",
"Actived": 0,
"Avg": 1131,
"HostHash": -675813464,
"Min": 1002,
"Error": 0,
"Total": 20,
"UrlHash": -243814510
},
(...)
],
"total": 4923
}

ホスト(Host)が127.0.0.1および、ポート(Port)が1007を使用したHTTP外部呼び出しフィルタリング

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/httpc/1543219200000/1543478400000/filter/host/127.0.0.1/port/10007"
response
{
"records": [
{
"Service": "/sales/remove/unit/kwangju",
"Host": "127.0.0.1",
"HostHash": -675813464,
"Avg": 1080,
"Error": 0,
"Sum": 2411644,
"Port": 10007,
"Service_hash": -1003301916,
"Url": "/remote/account/save/employee/seoul",
"Max": 2442,
"Stdev": "159.01",
"UrlHash": 180997672,
"Total": 2233,
"Min": 1001
},
{
"Service": "/product/delete/employee/daejun",
"Host": "127.0.0.1",
"HostHash": -675813464,
"Avg": 1085,
"Error": 0,
"Sum": 2075036,
"Port": 10007,
"Service_hash": 2100205994,
"Url": "/remote/account/save/employee/pusan",
"Max": 2462,
"Stdev": "173.06",
"UrlHash": -924053750,
"Total": 1911,
"Min": 1001
},
(...)
],
"total": 1080
}

SQL

GET https://api.whatap.io/open/api/json/sql/stime/etime

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/sql/1535554800000/1535641200000"
response
{
"records": [
{
"time_max": 4164,
"dbcHash": 450678784,
"db": "jdbc:mysql://localhost:3306,localhost:3310/fake", "time_min": 0,
"fetch_count": 0,
"hash": 796628118,
"fetch_time": 0,
"sql_crud": 0,
"count_total": 5224,
"count_error": 0,
"sql": "update table set x=# where key=#",
"time_sum": 581391,
"time_avg": 111,
"time_std": "240.79",
"count_actived": 0
},
(...)
],
"total": 130
}

クライアントIP

GET https://api.whatap.io/open/api/json/remote/stime/etime

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/remote/1535554800000/1535641200000"
response
{
"records": [
{
"count": 86,
"city": "Winnipeg",
"country": "CA (CANADA)",
"ip": "140.193.83.68"
},
(...)
],
"total": 1000
}
ノート

WhaTapは、クライアントに関する情報をデフォルトで保存します。

トランザクション

GET https://api.whatap.io/open/api/json/transaction/stime/etime

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/transaction/1535554800000/1535641200000"
response
{
"records": [
{
"apdex_tolerated": 98,
"apdex_satisfied": 279,
"apdex": 0.830379746835443,
"time_max": 44735,
"sql_fetch_time": 363,
"sql_time": 2628663,
"count": 10743,
"error": 29,
"sql_count": 22635,
"hash": -1485863373,
"sql_fetch": 6741607,
"httpc_avg": 1084,
"cpu_avg": 0,
"time_sum": 19911778,
"time_avg": 1853,
"httpc_count": 7072,
"service": "/account/save/employee/seoul",
"mem_avg": 0
},
(...)
],
"total": 1080
}

Heap使用量参照

Heap使用量に関する統計を表示できます。

ノート

照会時間('stime'、'etime')は1時間以内に制限され、ms(millisecond)単位です。

統計の平均値を要求

GET https://api.whatap.io/open/api/json/heap_use/stime/etime/avg

command
curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/heap_use/{sitme}/{etime}/avg"

統計の最大値を要求

GET https://api.whatap.io/open/api/json/heap_use/stime/etime/max

command
curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/heap_use/{sitme}/{etime}/max"
response
{
"pcode": 5490,
"stime": 1677747600000,
"etime": 1677749594269,
"timeMerge": "avg",
"unit": "byte",
"data": [
{
"oid": -1143239575,
"oname": "demo-8101",
"heap_use": "36121554.72"
},
{
"oid": -857948929,
"oname": "demo-8105",
"heap_use": "37498925.139"
},
(...)
]
}
Response FieldField Type説明
pcodenumber取得したプロジェクトコード
stimenumber統計参照の開始時間
etimenumber統計参照の終了時間
timeMergestring統計参照期間のデータマージ戦略
unitstringHeap使用量の単位
dataarray統計データ
oidnumberエージェントID
onamestringエージェント名
heap_usestringヒープ使用量

エージェントデータ照会

エージェント個別データ照会の例

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/thread_count/1536050100000/1536050700000"
response
{
"pcode": 1234570141,
"type": "thread_count",
"stime": 1536050100000,
"etime": 1536050700000,
"interval": 300, // data point 間隔
"timeMerge": "sum",
"objects": [
{
"oname": "8080",
"oid": -1234257485,
"series": [
[
1536050100000, // 時系列 timestamp
95.2
],
[
1536050400000,
85.3
],
[
1536050700000,
91.43
]
]
},
(...)
{
"oname": "TC-29-96-8082",
"oid": 1482741919,
"series": [
[
1536050100000,
98.11
],
[
1536050400000,
81.44
],
[
1536050700000,
90.05
]
]
}
]
}

エージェント平均データ参照の例

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/thread_count/1536050100000/1536050700000/avg"
response
{
"pcode": 1234570141,
"type": "thread_count",
"stime": 1536050100000,
"etime": 1536050700000,
"interval": 300, // data point 間隔
"timeMerge": "sum",
"objectMerge": "avg",
"series": [
[
1536050100000, // 時系列 timestamp
122.86 // 全体エージェントデータの平均
],
[
1536050400000,
99.26
],
[
1536050700000,
109.68
]
]
}

エージェント指定データ参照の例

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/thread_count/1536050100000/1536050700000/-1050048219,-1459620666"
response
{
"pcode": 1234570141,
"type": "thread_count",
"stime": 1536050100000,
"etime": 1536050700000,
"interval": 300,
"timeMerge": "sum",
"objects": [
{
"oname": "8081",
"oid": -1050048219, // 指定したエージェント情報の参照
"series": [
[
1536050100000,
97.75
],
[
1536050400000,
98
]
]
},
{
"oname": "8073",
"oid": -1459620666, // 指定したエージェント情報の参照
"series": [
[
1536050100000,
137.23
],
[
1536050400000
102.53
],
[
1536050700000,
120.2
]
]
}
]
}

エージェント指定平均データ照会の例

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/thread_count/1536050100000/1536050700000/avg/-1050048219,-1459620666"
response
{
"pcode": 1234570141,
"type": "thread_count",
"stime": 1536050100000,
"etime": 1536050700000,
"interval": 300,
"timeMerge": "sum",
"objectMerge": "avg",
"series": [
[
1536050100000,
117.49 // 指定したエージェント平均指標の参照
],
[
1536050400000,
100.26
],
[
1536050700000,
120.2
]
]
}

アクティブユーザー(5分単位)

GET https://api.whatap.io/open/api/json/visitor_5m/stime/etime

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/visitor_5m/1554444000000/1554076800000"
response
{
"data": [
[
1554444005000, // 一時間単位 (5*60*1000)
12
],
[
1554444010000,
12
],
(...)
],
"pcode": 3000000079,
"stime": 1554444000000,
"etime": 1554444300000,
"total": 59
}
ノート

WhaTapは、直近5分以内にトランザクションを発生させたユーザをカウントして同時接続ユーザを測定します。

アクティブユーザー(1時間単位)

GET https://api.whatap.io/open/api/json/visitor_h/stime/etime

command
$ curl -L -w "\n" -H "x-whatap-token: {{PROJECT API TOKEN}}" -H "x-whatap-pcode: {{projectCode}}" "https://api.whatap.io/open/api/json/visitor_h/1554444000000/1554454800000"
response
{
"data": [
[
1554444000000, // 一時間単位 (60*60*1000)
18
],
[
1554447600000,
16
],
(...)
],
"pcode": 3000000079,
"stime": 1554444000000,
"etime": 1554454800000,
"total": 3
}

プロジェクト間のトランザクション呼び出し統計

ノート
  • filterkey:検索条件キー (caller_pcodecaller_spec (バージョン)、caller_urlspec (バージョン)、 url)
  • filterval:検索条件 (filterkeycaller_urlまたはurlの場合、base64に変換)

ドメイン呼び出し統計

ノート
  • filterkey:検索条件キー (caller_pcodecaller_spec (バージョン)、caller_urlspec (バージョン)、 url)
  • filterval:検索条件 (filterkeycaller_urlまたはurlの場合、base64に変換)