Network Traffic Monitoring 개요
    • PDF

    Network Traffic Monitoring 개요

    • PDF

    Article Summary

    개요

    Network Traffic Monitoring API 를 사용하면 네이버 클라우드 플랫폼에서 발생하는 트래픽을 분석 및 모니터링할 수 있습니다. HTTP 방식의 GET/POST/PUT/DELETE 메서드 매출을 통해서 이뤄집니다.

    공통설정

    API URL

    https://vpc-ntm.apigw.ntruss.com
    

    요청 헤더

    헤더 명설명
    x-ncp-apigw-timestamp1970년 1월 1일 00:00:00 협정 세계시(UTC)부터의 경과 시간을 밀리초(millisecond)로 나타낸 것
    APIGW 서버와 시간차가 5분 이상 나는 경우 유효하지 않은 요청으로 간주
    x-ncp-iam-access-key네이버 클라우드 플랫폼에서 발급받은 API Key 또는 Sub Account에서 발급받은 AccessKey
    x-ncp-apigw-signature-v2위 예제의 Body를 AccessKey와 맵핑되는 SecretKey로 암호화한 서명
    HMAC 암호화 알고리즘은 HmacSHA256 사용
    x-ncp-dmn_cd네이버 클라우드 플랫폼에서는 PUB 사용 (default : PUB)

    다음은 Java에서 'x-ncp-apigw-signature-v2'를 생성하는 예제입니다.자세한 사항은 API Gateway 문서를 참조해주시기 바랍니다.

    public String makeSignature() {
        String space = " ";                    // one space
        String newLine = "\n";                    // new line
        String method = "GET";                    // method
        String url = "/photos/puppy.jpg?query1=&query2";    // url (include query string)
        String timestamp = "{timestamp}";            // current timestamp (epoch)
        String accessKey = "{accessKey}"            // access key id (from portal or sub account)
        String secretKey = "{secretKey}";
    
        String message = new StringBuilder()
            .append(method)
            .append(space)
            .append(url)
            .append(newLine)
            .append(timestamp)
            .append(newLine)
            .append(accessKey)
            .toString();
    
        SecretKeySpec signingKey = new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA256");
        Mac mac = Mac.getInstance("HmacSHA256");
        mac.init(signingKey);
    
        byte[] rawHmac = mac.doFinal(message.getBytes("UTF-8"));
        String encodeBase64String = org.apache.commons.codec.binary.Base64.encodeBase64String(rawHmac);
    
      return encodeBase64String;
    }
    

    기본정보

    Network Traffic Monitoring API를 사용하기 전에 몇 가지 기본정보를 알려드리겠습니다.

    Metric과 Dimension

    • Metric은 사용자가 취급하려는 숫자 형태의 값을 의미합니다.
    • Dimension은 특정 데이터의 속성으로서, 어떤 서버에 속하는지, 어떤 곳에 위치하는지, 무엇의 값인지 등을 의미합니다.

    집계(Aggregation)

    • Traffic 은 1분 간격으로 성능 데이터를 수집하며, 필요에 따라 1분보다 자주 혹은 드물게 수집하기도 합니다.
    • near real time 으로 4분정도 딜레이가 있을 수 있습니다.

    집계 주기(interval)

    • 집계는 현재 1분, 15분, 30분, 1시간, 1일을 간격으로 실행됩니다. 예를 들어 5분 집계는 10시 0분 0초 ~ 10시 4분 59초, 10시 5분 0초 ~ 10시 9분 59초, ...에 수집된 값을 이용하여 집계합니다.
    • 집계된 결과로는 매 1분, 15분, 30분, 1시간, 1일마다 AVG, MAX 값이 생성됩니다.

    오퍼레이션

    Meta 관련 API

    Chart 관련 API


    이 문서가 도움이 되었습니까?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.