애플리케이션
Open API Spec
계정 API
프로젝트 목록 조회 등, 프로젝트의 권한 범위를 넘는 Open API의 경우 계정 API 토큰을 사용하여 호출합니다.
Open API 호출 시 헤더에 포함될 내용은 다음과 같습니다.
구분 | 키 | 설정값 | 비고 |
---|---|---|---|
헤더 |
x-whatap-token |
API토큰 |
계정 API토큰: 우상단 프로필 > 계정 정보 관리 > API토큰 |
메타성 정보 조회용 Open API 호출 URL입니다.
구분 | URL |
---|---|
프로젝트 목록 조회 |
https://api.whatap.io/open/api/json/projects |
프로젝트 멤버 목록 조회 |
https://api.whatap.io/open/api/json/project/{pcode}/members |
사용자의 그룹 목록 조회 |
https://api.whatap.io/open/api/v2/json/groups |
그룹 멤버 목록 조회 |
https://api.whatap.io/open/api/json/group/{groupId}/members |
그룹 내 프로젝트 목록 조회 |
https://api.whatap.io/open/api/json/group/{groupId}/projects |
프로젝트 API
프로젝트 권한 범위 내의 Open API의 경우 프로젝트 코드와 함께 프로젝트 API 토큰을 사용하여 호출합니다.
Open API 호출 시 헤더에 포함될 내용은 다음과 같습니다.
구분 | 키 | 설정 값 | 비고 |
---|---|---|---|
헤더 |
x-whatap-token |
API토큰 |
프로젝트 API토큰: 프로젝트 선택 > 관리 > 프로젝트 관리 > API토큰 |
x-whatap-pcode |
프로젝트 코드 |
화면 윈도우 또는 탭 타이틀에서 확인 "[{프로젝트 코드}] Cloud Application Monitoring" |
메타 정보 조회 URL
메타성 정보 조회용 Open API 호출 URL입니다.
구분 | URL |
---|---|
프로젝트 정보 조회 |
https://api.whatap.io/open/api/json/project |
프로젝트 에이전트 상태 및 호스트 조회 |
https://api.whatap.io/open/json/agents |
Spot 정보 조회 URL
Spot 정보 조회용 Open API 호출 URL입니다.
구분 | URL |
---|---|
활성화 상태의 에이전트 수 |
https://api.whatap.io/open/api/act_agent |
비활성화 상태의 에이전트 수 |
https://api.whatap.io/open/api/inact_agent |
호스트 수 |
https://api.whatap.io/open/api/host |
호스트의 CPU 코어 합 |
https://api.whatap.io/open/api/cpucore |
트랜잭션 수 |
https://api.whatap.io/open/api/txcount |
초당 트랜잭션 수 |
https://api.whatap.io/open/api/tps |
5분간 집계된 고유 사용자 수 |
https://api.whatap.io/open/api/user |
액티브 트랜잭션 수 |
https://api.whatap.io/open/api/actx |
평균 응답 시간 |
https://api.whatap.io/open/api/rtime |
CPU 사용률 |
https://api.whatap.io/open/api/cpu |
쓰레드풀 활성 쓰레드 수 |
https://api.whatap.io/open/api/threadpool_active |
쓰레드풀 큐잉 쓰레드 수 |
https://api.whatap.io/open/api/threadpool_queue |
전체 DB Connection 수 |
https://api.whatap.io/open/api/dbconn_total |
활성(Active) DB Connection 수 |
https://api.whatap.io/open/api/dbconn_act |
비활성(Idle) DB Connection 수 |
https://api.whatap.io/open/api/dbconn_idle |
액티브 Method 수 |
https://api.whatap.io/open/api/act_method |
액티브 SQL 수 |
https://api.whatap.io/open/api/act_sql |
액티브 HTTP Call 수 |
https://api.whatap.io/open/api/act_httpc |
액티브 DB Connection 수 |
https://api.whatap.io/open/api/act_dbc |
액티브 Socket 수 |
https://api.whatap.io/open/api/act_socket |
통계 정보 조회 URL
통계 정보 조회용 Open API는 시간 범위를 지정하여 호출하며, URL에 다음 항목이 포함된 경우 각 항목의 동작 방식은 다음과 같습니다.
-
시간 범위 미지정 시 최근 5분간의 정보를 조회
-
stime: 조회 시작 시간 (UNIX epoch time, millisecond)
-
etime: 조회 종료 시간 (UNIX epoch time, millisecond)
etime은 stime을 기준으로 1일을 초과할 수 없음 |
-
oids: agent 식별 ID (콤마 구분자로 복수 지정 가능)
-
URL에 "/avg"가 포함된 경우 에이전트 단위의 평균치 도출을 의미함
통계 정보 조회용 Open API 호출 URL입니다.
구분 | 내역 |
---|---|
Exception 발생 |
https://api.whatap.io/open/api/json/exception/{stime}/{etime} |
HTTP 외부 호출 |
https://api.whatap.io/open/api/json/httpc/{stime}/{etime} https://api.whatap.io/open/api/json/httpc/{stime}/{etime}/filter/{filterkey}/{filterval}/port/{port} |
filterkey: 조회 조건 키 (host, url) |
|
Client IP |
https://api.whatap.io/open/api/json/remote/{stime}/{etime} |
SQL 발행 |
https://api.whatap.io/open/api/json/sql/{stime}/{etime} |
트랜잭션 |
https://api.whatap.io/open/api/json/transaction/{stime}/{etime} |
Thread 수 |
https://api.whatap.io/open/api/json/thread_count/{stime}/{etime} https://api.whatap.io/open/api/json/thread_count/{stime}/{etime}/{oids} https://api.whatap.io/open/api/json/thread_count/{stime}/{etime}/avg https://api.whatap.io/open/api/json/thread_count/{stime}/{etime}/avg/{oids} |
Thread Daemon 수 |
https://api.whatap.io/open/api/json/thread_daemon/{stime}/{etime} https://api.whatap.io/open/api/json/thread_daemon/{stime}/{etime}/{oids} https://api.whatap.io/open/api/json/thread_daemon/{stime}/{etime}/avg https://api.whatap.io/open/api/json/thread_daemon/{stime}/{etime}/avg/{oids} |
Thread Peak 수 |
https://api.whatap.io/open/api/json/thread_peak_count/{stime}/{etime} https://api.whatap.io/open/api/json/thread_peak_count/{stime}/{etime}/{oids} https://api.whatap.io/open/api/json/thread_peak_count/{stime}/{etime}/avg https://api.whatap.io/open/api/json/thread_peak_count/{stime}/{etime}/avg/{oids} |
Thread Pool 수 |
https://api.whatap.io/open/api/json/threadpool_active/{stime}/{etime} https://api.whatap.io/open/api/json/threadpool_active/{stime}/{etime}/{oids} https://api.whatap.io/open/api/json/threadpool_active/{stime}/{etime}/avg https://api.whatap.io/open/api/json/threadpool_active/{stime}/{etime}/avg/{oids} |
Thread Pool Queue 수 |
https://api.whatap.io/open/api/json/threadpool_queue/{stime}/{etime} https://api.whatap.io/open/api/json/threadpool_queue/{stime}/{etime}/{oids} https://api.whatap.io/open/api/json/threadpool_queue/{stime}/{etime}/avg https://api.whatap.io/open/api/json/threadpool_queue/{stime}/{etime}/avg/{oids} |
프로젝트 간 트랜잭션 호출 통계 |
https://api.whatap.io/open/api/json/tx_caller/{stime}/{etime} https://api.whatap.io/open/api/json/tx_caller/{stime}/{etime}/{oids} https://api.whatap.io/open/api/json/tx_caller/{stime}/{etime}/filter/{filterkey}/{filterval} https://api.whatap.io/open/api/json/tx_caller/{stime}/{etime}/{oids}/filter/{filterkey}/{filterval} |
filterkey: 조회 조건 키 (caller_pcode, caller_spec (버전), caller_url, spec (버전), url) |
|
도메인 호출 통계 |
https://api.whatap.io/open/api/json/tx_domain/{stime}/{etime} https://api.whatap.io/open/api/json/tx_domain/{stime}/{etime}/{oids} https://api.whatap.io/open/api/json/tx_domain/{stime}/{etime}/filter/{filterkey}/{filterval} https://api.whatap.io/open/api/json/tx_domain/{stime}/{etime}/{oids}/filter/{filterkey}/{filterval} |
filterkey: 조회 조건 키 (domain, url) |
|
액티브 사용자 (5분 단위) |
https://api.whatap.io/open/api/json/visitor_5m/{stime}/{etime} |
5분간 집계된 고유 사용자 |
|
액티브 사용자 (1시간 단위) |
https://api.whatap.io/open/api/json/visitor_h/{stime}/{etime} |
1시간 동안 집계된 고유 사용자 통계 |
프로젝트 통계 조회 URL
프로젝트 통계 조회용 Open API의 경우 하나의 프로젝트에서 여러 에이전트를 통해 수집되는 데이터를 병합하여 조회합니다. 시간 범위를 지정하여 호출할 수 있으며, 시간을 주어주지 않는 경우 가장 최근의 데이터를 조회합니다.
etime값만 주어진 경우 etime시간 기준 5초 전의 데이터를 조회합니다.
stime 과 etime을 설정했을 때 timeMerge(시간 병합 전략)를 선택할 수 있습니다. 병합 전략을 주지 않는 경우 기본 병합 전략은 평균입니다.
-
stime: 조회 시작 시간 (UNIX epoch time, millisecond)
-
etime: 조회 종료 시간 (UNIX epoch time, millisecond)
-
timeMerge: 조회 시작 & 종료 시간 지정 시 시간 데이터 병합 전략 (평균 : avg, 최댓값 : max, 최솟값 : min)
etime은 stime을 기준으로 1일을 초과할 수 없음 |
구분 | URL |
---|---|
프로젝트 내 tps |
https://api.whatap.io/open/api/raw/tag/app_counter/tps?stime={stime}&etime={etime}&timeMerge={timeMerge} |
프로젝트 내 평균 응답 시간 |
https://api.whatap.io/open/api/raw/tag/app_counter/resp_time?stime={stime}&etime={etime}&timeMerge={timeMerge} |
프로젝트 내 평균 cpu 사용률 |
https://api.whatap.io/open/api/raw/tag/app_host_resource/cpu?stime={stime}&etime={etime}&timeMerge={timeMerge} |
프로젝트 내 데이터 소스별 DB Connection 수 |
https://api.whatap.io/open/api/tag/db_pool_detail/dbconn?stime={stime}&etime={etime}&timeMerge={timeMerge} |
장기 통계 조회 URL
장기 통계 조회용 Open API의 경우 유형에 따른 시간 지정 범위를 가집니다. 시간 범위를 지정하여 호출하며, URL에 다음 항목이 포함된 경우 각 항목의 동작 방식은 다음과 같습니다.
-
stime: 조회 시작 시간 (UNIX epoch time, millisecond)
-
etime: 조회 종료 시간 (UNIX epoch time, millisecond)
구분 | 내역 |
---|---|
액티브 사용자 (1일 단위) |
https://api.whatap.io/open/api/json/visitor_d/{stime}/{etime} |
1일간 집계된 고유 사용자 통계, etime은 stime을 기준으로 31일을 초과할 수 없음 |
|
액티브 사용자 (1개월 단위) |
https://api.whatap.io/open/api/json/visitor_m/{stime}/{etime} |
1개월간 집계된 고유 사용자 통계, etime은 stime을 기준으로 365일을 초과할 수 없음 |
로그 조회 URL
로그 조회용 Open API를 제공합니다. 시간 범위를 지정하여 호출하며, URL에 다음 항목이 포함된 경우 각 항목의 동작 방식은 다음과 같습니다.
-
시간 범위 미지정 시 최근 5분간의 정보를 조회
-
stime: 조회 시작 시간 (UNIX epoch time, millisecond)
-
etime: 조회 종료 시간 (UNIX epoch time, millisecond)
etime은 stime을 기준으로 1일을 초과할 수 없음 |
구분 | URL |
---|---|
Full GC 로그 |
https://api.whatap.io/open/api/json/fullgclog/{stime}/{etime} |
Open API 호출
Open API 호출 시에는 계정 API 토큰 또는 프로젝트 코드와 프로젝트 API 토큰을 헤더로 전송합니다. 본 문서에서는 curl을 통한 호출 예시를 제시합니다.
프로젝트 목록 조회
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" "https://api.whatap.io/open/api/json/projects"
- response
{
"data": [ {
"groupName": "",
"projectCode": 35,
"projectName": "APM_TEST2",
"createTime": "2018-10-19 07:17:03.774",
"status": "subscribe",
"productType": "APM",
"platform": "JAVA",
"gatewayName": "LOCAL",
"apiToken": "5**********************R"
}, {
}, (중략)
],
"accountEmail": "xxx@whatap.io",
"total": 6
}
프로젝트 정보 조회
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/json/project"
- response
{
"platform": "JAVA",
"createTime": "Tue Sep 18 08:34:27 GMT 2018", "gatewayName": "Office-OTE",
"projectCode": 1**1,
"status": "Subscribe",
"lastUpdatedTime": "Tue Sep 18 08:34:34 GMT 2018", "name": "SEO_APM",
"productType": "APM"
}
프로젝트 에이전트 상태 및 호스트 조회
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/json/agents"
- response
{
"data":[
{
"host_ip":"127.0.0.1",
"oname":"TC-29-96-8082",
"active":true
}, {
} (중략)
]
}
프로젝트 멤버 목록 조회
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" "https://api.whatap.io/open/api/json/project/1**1/members"
- response
{
"data": [ {
"email": "honggildong@whatap.io",
"name": "홍길동",
"typeKey": "super_admin",
"typeName": "Super Admin"
}, {
}, (중략)
],
"total": 6
}
그룹 목록 조회
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" "https://api.whatap.io/open/api/v2/json/groups"
- response
{
"data": [ {
"groupName": "WHATAP APM",
"groupId": "grp****ab123kskd*****q",
"description": "APM Group"
}, {
}, (중략)
],
"total": 3
}
그룹 멤버 목록 조회
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" "https://api.whatap.io/open/api/json/group/grp****ab123kskd*****q/members"
- response
{
"data": [ {
"email": "honggildong@whatap.io",
"name": "홍길동",
"typeKey": "super_admin",
"typeName": "Super Admin"
}, {
}, (중략)
],
"total": 1
}
그룹 내 프로젝트 목록 조회
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" "https://api.whatap.io/open/api/json/group/grp****ab123kskd*****q/projects"
- response
{
"data": [ {
"projectCode":35,
"name":"APM_TEST2",
"status":"Subscribe",
"productType":"APM",
"platform":"JAVA",
"gatewayName":"LOCAL"
}, {
}, (중략)
]
}
Spot 정보 조회
모든 정보 조회
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/json/spot"
- response
{
"pcode": 8,
"act_agent": "6",
"inact_agent": "6",
"host": "1",
"cpucore": "2",
"txcount": "459",
"tps": "93.07",
"user": "1007",
"actx": "149",
"rtime": "1873",
"cpu": "29.35",
"threadpool_active": "0",
"threadpool_queue": "0",
"dbconn_total": "600.0",
"dbconn_act": "239.0",
"dbconn_idle": "361.0",
"act_method": "51",
"act_sql": "24",
"act_httpc": "64",
"act_dbc": "10",
"act_socket": "0"
}
Response Field | Field Type | 설명 |
---|---|---|
pcode |
number |
조회한 프로젝트 코드 |
act_agent |
string |
활성화 상태의 에이전트 수 |
inact_agent |
string |
비활성화 상태의 에이전트 수 |
host |
string |
호스트(HOST) 수 |
cpucore |
string |
호스트의 CPU 코어 합 |
txcount |
string |
트랜잭션 개수 |
tps |
string |
TPS |
user |
string |
액티브 사용자(5분) |
actx |
string |
액티브 트랜잭션 |
rtime |
string |
평균 응답시간 |
cpu |
string |
평균 CPU 사용률 |
threadpool_active |
string |
쓰레드풀 활성 쓰레드 수 |
threadpool_queue |
string |
쓰레드풀 큐잉 쓰레드 수 |
dbconn_total |
string |
전체 DB Connection 수 |
dbconn_act |
string |
활성(Active) DB Connection 수 |
dbconn_idle |
string |
비활성(Idle) DB Connection 수 |
act_method |
string |
액티브 Method 수 |
act_sql |
string |
액티브 SQL 수 |
act_httpc |
string |
액티브 HTTP Call 수 |
act_dbc |
string |
액티브 DB Connection 수 |
act_socket |
string |
액티브 Socket 수 |
Active Agent
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/act_agent"
- response
5
Inactive Agent
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/inact_agent"
- response
1
Host
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/host"
- response
2
CPU Core
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/cpucore"
- response
16
트랜잭션 수
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/txcount"
- response
469
TPS
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/tps"
- response
92.03
액티브 사용자(5분)
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/user"
- response
1007
액티브 트랜잭션
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/actx"
- response
171
통계 데이터 조회
Exception
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "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 외부 호출
- command
curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "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
}
- command
curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "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
- command
curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "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
}
Client IP
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "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
}
트랜잭션
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/json/transaction/1535554800000/1535641200000"
- response
{
"records": [
{
"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
}
Thread Count / Thread Daemon Count / Thread Peak Count / Thread Pool Count / Thread Pool Queue Count
에이전트 개별 데이터 조회 예시
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "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 간격 "
data": [
{
"oname": "8080",
"oid": -1234257485,
"data": [
[
1536050100000, <= 시계열 timestamp
95.2
],
[
1536050400000,
85.3
],
[
1536050700000,
91.43
]
]
},
(중략)
{
"oname": "TC-29-96-8082",
"oid": 1482741919,
"data": [
[
1536050100000,
98.11
],
[
1536050400000,
81.44
],
[
1536050700000,
90.05
]
]
}
]
}
에이전트 평균 데이터 조회 예시
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "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 간격
"op": "avg",
"data": [
[
1536050100000, <= 시계열 timestamp
122.86 <= 전체 에이전트의 평균 데이터
],
[
1536050400000,
99.26
],
[
1536050700000,
109.68
]
]
}
에이전트 지정 데이터 조회 예시
- command
$ curl -L -w "\n" -H "x-whatap-token: HN8ZCGB72CK1RQOI8PQBHKIC" -H "x-whatap-pcode: 1234570141" "http://apmote.whatap.io:8080/open/api/json/thread_count/1536050100000/1536050700000/-1050048219,- 1459620666"
- response
{
"pcode": 1234570141,
"type": "thread_count",
"stime": 1536050100000,
"etime": 1536050700000,
"interval": 300,
"data": [
{
"oname": "8081",
"oid": -1050048219, <= 지정한 에이전트의 정보가 조회됨
"data": [
[
1536050100000,
97.75
],
[
1536050400000,
98
]
]
},
{
"oname": "8073",
"oid": -1459620666, <= 지정한 에이전트의 정보가 조회됨
"data": [
[
1536050100000,
137.23
],
[
1536050400000
102.53
],
[
1536050700000,
120.2
]
]
}
]
}
에이전트 지정 평균 데이터 조회 예시
- command
$ curl -L -w "\n" -H "x-whatap-token: HN8ZCGB72CK1RQOI8PQBHKIC" -H "x-whatap-pcode: 1234570141" "http://apmote.whatap.io:8080/open/api/json/thread_count/1536050100000/1536050700000/avg/- 1050048219,-1459620666"
- response
{
"pcode": 1234570141,
"type": "thread_count",
"stime": 1536050100000,
"etime": 1536050700000,
"interval": 300,
"op": "avg",
"data": [
[
1536050100000,
117.49 <= 지정한 에이전트들의 평균 지표가 조회됨
],
[
1536050400000,
100.26
],
[
1536050700000,
120.2
]
]
}
액티브 사용자 (5분 단위)
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/json/visitor_5m/1554444000000/1554076800000"
- response
{
"data": [
[
1554444005000, <== 1시간 단위 (5*60*1000)
12
],
[
1554444010000,
12
],
(중략)
],
"pcode": 3000000079,
"stime": 1554444000000,
"etime": 1554444300000,
"total": 59
}
액티브 사용자 (1시간 단위)
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/json/visitor_h/1554444000000/1554454800000"
- response
{
"data": [
[
1554444000000, <== 1시간 단위 (60*60*1000)
18
],
[
1554447600000,
16
],
(중략)
],
"pcode": 3000000079,
"stime": 1554444000000,
"etime": 1554454800000,
"total": 3
}
프로젝트 통계 조회 URL
프로젝트 내 tps
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/raw/tag/app_counter/tps?stime=1554163200000&etime=1554422400000&timeMerge=avg"
- response
66.0
프로젝트 내 평균 응답 시간
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/raw/tag/app_counter/resp_time?stime=1554163200000&etime=1554422400000&timeMerge=avg"
- response
1640
프로젝트 내 평균 cpu 사용률
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/raw/tag/app_host_resource/cpu?stime=1554163200000&etime=1554422400000&timeMerge=avg"
- response
11.05
프로젝트 내 데이터 소스별 DB Connection 수
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/tag/db_pool_detail/dbconn?stime=1554163200000&etime=1554422400000&timeMerge=avg"
- response
{
"pcode":35,
"time":1554163200000,
"dbc_total":[
{
"oid":-963710734,
"oname":"TC-29-96-8082",
"jdbc:db:virtual":"jdbc:db:virtual",
"active":49,
"idle":51,
"total":100
},
]
}
장기 통계 조회
액티브 사용자 (1일 단위)
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/json/visitor_d/1554163200000/1554422400000"
- response
{
"data": [
[
1554163200000, <== 1일 단위 (24*60*60*1000)
1007
],
[
1554249600000,
1007
],
[
1554336000000,
1007
]
],
"pcode": 3000000079,
"stime": 1554163200000,
"etime": 1554422400000,
"total": 3
}
액티브 사용자 (1개월 단위)
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/json/visitor_m/1551398400000/1554076800000"
- response
{
"data": [
{
"stime": 1535760000000, <== 월 1일 시각 (24*60*60*1000)
"etime": 1538352000000,
"sdate": "Sat Sep 01 00:00:00 GMT 2018",
"edate": "Mon Oct 01 00:00:00 GMT 2018",
"mau": 1007
},
{
"stime": 1538352000000,
"etime": 1541030400000,
"sdate": "Mon Oct 01 00:00:00 GMT 2018",
"edate": "Thu Nov 01 00:00:00 GMT 2018",
"mau": 1007
}
],
"pcode": 1234570141,
"stime": 1535760000000,
"etime": 1541030400000,
"sdate": "Sat Sep 01 00:00:00 GMT 2018",
"edate": "Thu Nov 01 00:00:00 GMT 2018",
"total": 2
}
로그 데이터 조회
Full GC Log
- command
$ curl -L -w "\n" -H "x-whatap-token: J************************A" -H "x-whatap-pcode: 1**1" "https://api.whatap.io/open/api/json/fullgclog/1538983800000/1539104400000"
- response
{
"pcode": 1,
"stime": 1538983800000,
"etime": 1539070200000,
"data": [
{
"oid": 832254513,
"oname": "SEO2",
"count": [
[
1538983800000,
1
]
], "logs": [
"2018-10-08T16:33:09.001-0900: 79.812: [Full GC (System.gc()) 47269K->14801K(448000K), 0.0537298 secs]"
] },
{
"oid": -1453518268,
"oname": "0-1-9780-seo",
"count": [
[
1538983800000,
2
]
],
"logs": [
"2018-10-08T16:32:57.009-0900: 32.382: [Full GC (System.gc()) 26874K->14816K(94720K), 0.0463841 secs]",
"2018-10-08T16:33:02.435-0900: 37.807: [Full GC (System.gc()) 15040K->13556K(94720K), 0.0557387 secs]"
]
}
]
}