기타 조회 API

가상호스트 목록조회

가상호스트 목록을 조회한다.

GET /monitoring/vhostslist

Response code

설명

200

성공

500

실패

결과는 JSON형식으로 제공된다.

{
    "version": "2.0.0",
    "method": "vhostslist",
    "status": "OK",
    "result": [ "www.example.com","www.winesoft.com", "site1.com" ]
}

캐싱정보

캐싱하고 있는 파일상태를 모니터링한다. 일반적으로 파일은 URL로 구분되지만 같은 URL에 다른 옵션(i.e. Accept-Encoding 헤더등)이 존재하는 경우 여러 개의 파일이 존재할 수 있다.

GET /monitoring/fileinfo

Query Parameter

설명

url

조회할 URL

GET /monitoring/fileinfo?url=example.com/sample.dat

Response code

설명

200

성공

400

실패. 잘못된 쿼리스트링

404

실패. URL을 찾을 수 없음

500

실패. RT 미구동

결과는 JSON형식으로 제공된다. 다음은 응답 Body 예제이다.

{
    "version": "2.0.0",
    "method": "fileinfo",
    "status": "OK",
    "result":
    [
        {
            "URI": "/sample.dat",
            "Accept-Encoding": "N",
            "UseOriginEncoding": "N",
            "RefCount": 0,
            "Size": 2100267,
            "CachedSize": 2100267,
            "Disk-Index": 0,
            "FID": 24267,
            "LocalPath": "/cache1/example.com/000i/q3.bin",
            "File-Opened ": "N",
            "File-Updating": "-",
            "Downloader-Count": "0",
            "LastAccess": "[ 2012.09.03 14:29:50, -2 ]",
            "CreatedTime": "[ 2012.09.03 13:53:43, -2169 ]",
            "UpdateTime": "[ 2012.09.03 13:53:43, -2169 ]",
            "TTL-Left": "[ 2012.10.03 13:53:43, 2589831 ]",
            "ResponseCode": 200,
            "ContentType": "text/plain",
            "LastModifiedTime": "[ 2010.11.22 20:31:47, -56224685 ]",
            "ExpireTime": "[ 0, 0 ]",
            "CacheControl": "not-specified",
            "ETag": "502dd614:200c2b",
            "NoMoreExist": "N",
            "LocalFileExist": "Y",
            "SmallFile": "N",
            "State": "Cached",
            "Phantom": "N",
            "Remove": "N",
            "Deleted": "N",
            "AddedSize": "Y",
            "TransferEncoding": "N",
            "Compression": "-",
            "Purge": "N",
            "HardPurge": "N",
            "Ignore-IMS ": "N",
            "Fragmented": "N",
            "Redirect-Location ": "-",
            "Content-Disposition ": "-",
            "NoCache": "N",
            "CorrectedInitAge": "0",
            "OriginalHeaders": "-",
            "HashKey": "20424837394",
            "VHost": "foo.com"
        }
    ]
}
  • URI 파일 URI

  • Accept-Encoding (“Y” or “N”) Accept-Encoding을 지원한다면 “Y”

  • UseOriginEncoding (“Y” or “N”) 원본 캐싱시 compression .useOriginEncoding 설정이 활성화상태였다면 “Y”

  • RefCount 파일참조 카운트

  • Size (Bytes) 파일크기 (= Content-Length )

  • CachedSize (Bytes) 캐싱된 용량

  • Disk-Index (0부터 시작) 저장된 디스크 인덱스

  • FID 파일 ID

  • LocalPath 로컬 경로

  • File-Opened (“Y” or “N”) 로컬파일을 열고 있다면 “Y”

  • File-Updating 파일을 갱신 중이라면 갱신하는 객체의 포인터가 명시

  • Downloader-Count 원본서버에서 이 파일을 다운로드 받는 현재 세션의 개수

  • LastAccess (마지막 접근시간, 마지막 접근시간-현재시간) [ 2012.09.03 14:29:50, -2 ]의 의미는 2012.09.03 14:29:50에 접근됐으며 현재로부터 2초 전에 접근됐다는 의미이다.

  • CreatedTime 객체 생성시간

  • UpdateTime (갱신시간, 갱신시간-현재시간) 파일이 마지막으로 갱신된 시간. 304 Not Modified 에도 시간은 갱신된다.

  • TTL-Left (만료시간, 만료시간-현재시간) 컨텐츠 만료 예정시간. TTL이 남았다면 양수로, 만료됐다면 음수로 표기된다.

  • ResponseCode 원본서버 응답코드

  • ContentType MIME Type

  • LastModifiedTime 원본서버가 보낸 Last Modified Time. 원본서버가 이 값을 보내지 않았다면 0으로 표시된다.

  • ExpireTime 원본서버가 보낸 Expire Time. 원본서버가 이 값을 보내지 않았다면 0으로 표시된다.

  • CacheControl (“no-cache” or “not-specified” or (정수)) 원본서버가 보낸 Cache-Contorl 값

  • ETag M2가 생성한 ETag

  • NoMoreExist (“Y” or “N”) 파일을 파기예약되어 있다면 “Y”

  • LocalFileExist (“Y” or “N”) 로컬에 파일이 존재하면 “Y” (200 OK가 아닌 파일들은 항상 “Y”)

  • SmallFile (“Y” or “N”) 파일을 작은파일로 판단한다면 “Y” (개발적인 이유)

  • State (“Not Init” or “Cached” or “Error”) 파일 상태

  • Phantom (“Y” or “N”) 객체가 phantom 상태라면 “Y”

  • Remove (“Y” or “N”) FID에 해당하는 로컬파일이 삭제되었다면 “Y” (개발적인 이유)

  • Deleted (“Y” or “N”) 객체가 삭제되었다면 “Y” (개발적인 이유)

  • AddedSize (“Y” or “N”) 크기가 통계에 반영되었다면 “Y” (개발적인 이유)

  • TransferEncoding (“Y” or “N”) Transfer-Encoding을 지원한다면 “Y”

  • Compression 압축방식

  • Purge (“Y” or “N”) Purge 됐다면 “Y”

  • HardPurge (“Y” or “N”) HardPurge 됐다면 “Y”

  • Ignore-IMS (“Y” or “N”) 갱신할 때 If-Modified-Since헤더를 보내지 않도록 설정되었다면 “Y”

  • Fragmented (“Y” or “N”) limitMaxRange 설정에 의해 분할 다운로드/저장된다면 “Y”

  • Redirect-Location Location 헤더 값

  • Content-Disposition Content-Disposition 헤더 값

  • NoCache (“Y” or “N”) 원본서버에서 no-cache응답을 줬다면 “Y”

  • OriginalHeaders cacheOriginal 설정이 활성화된 상태에서 캐싱된 원본 비표준 헤더리스트

  • HashKey 캐싱객체의 고유 해쉬키

  • VHost 가상호스트 이름

원본상태 모니터링

가상호스트의 원본상태를 모니터링한다.

GET /monitoring/origin

Query Parameter

설명

vhost (optional)

조회할 가상호스트명. 없다면 전체 가상호스트를 대상으로 수행한다.

# 모든 가상호스트 조회
GET /monitoring/origin

# 특정 가상호스트 조회
GET /monitoring/origin?vhost=www.example.com

Response code

설명

200

성공

500

실패. RT 미구동

결과는 JSON형식으로 제공된다.

{
    "origin" :
    [
        {
            "VirtualHost" : "example.com",
            "Address" :
            [
                { "1.1.1.1" : "Active" },
                { "1.1.1.2" : "Active" }
            ],
            "Address2" : [  ],
            "ActiveIP" :
            [
                { "1.1.1.1" : 0 },
                { "1.1.1.2" : 0 }
            ] ,
            "InactiveIP" : [ ]
        },
        {
            "VirtualHost" : "foobar.com",
            "Address" :
            [
                { "origin.foobar.com" : "Active" }
            ],
            "Address2" : [  ],
            "ActiveIP" :
            [
                { "5.5.5.5" : 21 },
                { "5.5.5.6" : 60 },
                { "5.5.5.7" : 37 }
            ],
            "InactiveIP" :
            [
                { "5.5.5.8" : 10 },
                { "5.5.5.9" : 184 }
            ]
        }
    ]
}
  • VirtualHost 가상호스트 이름

  • Address 원본주소. 설정주소가 사용중이라면 Active , (장애발생으로) 사용하고 있지 않다면 Inactive 로 표시된다.

  • Address2 보조 원본주소. 설정주소를 사용중이라면 Active , 사용하고 있지 않다면 Inactive 로 표시된다.

  • ActiveIP 사용 중인 IP목록과 TTL. 원본서버를 IP로 설정하면 Address 와 동일한 IP에 TTL은 0으로 표시된다. Domain으로 설정하면 Resolving결과에 따른다. 다양한 IP와 TTL을 사용한다.

  • InactiveIP 사용하지 않는 IP목록과 TTL. 사용하지 않더라도 복구 중이거나 HealthChecker에 의해 관리될 수 있다. 해당 주소는 TTL 동안 복구되지 않으면 삭제된다.

원본상태 초기화

가상호스트의 원본서버 배제/복구를 초기화한다. 또한 현재 사용 중인 세션을 재사용하지 않고 새롭게 연결을 생성한다.

GET /command/resetorigin

Query Parameter

설명

vhost (optional)

초기화할 가상호스트명. 없다면 전체 가상호스트를 대상으로 수행한다.

# 모든 가상호스트
GET /command/resetorigin

# 특정 가상호스트
GET /command/resetorigin?vhost=www.example.com

Response code

설명

200

성공

404

실패. 가상호스트 없음.

500

실패. RT 미구동

하드웨어 정보

하드웨어 정보를 조회한다.

GET /monitoring/hwinfo

Response code

설명

200

성공

결과는 다음과 같다.

{
  "version": "22.02.0",
  "method": "hwinfo",
  "status": "OK",
  "result": {
    "OS": "Linux version 3.10.0-1062.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Wed Aug 7 18:08:02 UTC 2019",
    "Issue": "",
    "ProductVer": "22.02.0",
    "CPU": {
      "ProcCount": "4",
      "Model": "Intel(R) Xeon(R) Gold 6132 CPU @ 2.60GHz",
      "MHz": "2593.906",
      "Cache": "19712 KB",
      "AES-NI": "Supported"
    },
    "Memory": "32 GB",
    "NIC": [
      {
        "Dev": "ens192",
        "Model": "VMware VMXNET3 Ethernet Controller (rev 01)",
        "IP": "192.168.60.61",
        "MAC": "00:50:56:01:0e:58"
      }
    ],
    "Disk": [
      {
        "Dev": "mapper/centos-root",
        "Model": "",
        "Total": "18461229056",
        "Usage": "6926540800"
      },
      {
        "Dev": "sda",
        "Model": "VMware Virtual disk (scsi)",
        "Total": "995790848",
        "Usage": "158748672"
      }
    ]
  }
}

CipherSuite 조회

CipherSuite 설정결과를 조회한다. CipherSuite표현식은 OpenSSL 1.0.0E 를 준수한다.

GET /monitoring/ssl

Query Parameter

설명

ciphersuite

조회할 CipherSuite

Response code

설명

200

성공

400

실패. 잘못된 CipherSuite

500

실패. RT 미구동

결과는 JSON형식으로 제공된다.

{
    "version": "2.0.0",
    "method": "ssl",
    "status": "OK",
    "result":
    [
        {
            "Name" : "AES128-SHA",
            "Ver" : "SSLv3",
            "Kx" : "RSA",
            "Au" : "RSA",
            "Enc" : "AES(128)",
            "Mac" : "SHA1"
        },
        {
            "Name" : "AES256-SHA",
            "Ver" : "SSLv3",
            "Kx" : "RSA",
            "Au" : "RSA",
            "Enc" : "AES(256)",
            "Mac" : "SHA1"
        }
    ]
}

Geo IP 조회

GeoIP가 설정되어 있다면 파일목록을 조회한다.

GET /monitoring/geoiplist

Response code

설명

200

성공

404

실패. 로컬 GeoIP 미구성

결과는 JSON형식으로 제공된다.

{
     "version": "2.0.0",
     "method": "geoiplist",
     "status": "OK",
     "result":
     {
         "path" : "/usr/m2/geoip/",
         "files" :
         [
             {
                 "file" : "GeoIP.dat",
                 "size" : 766255
             },
             {
                 "file" : "GeoLiteCity.dat",
                 "size" : 12826936
             }
         ]
     }
 }