ADC

メトリックス

メトリックとは、NetScalerによって追跡されるデータの一部です。メトリックは有意義な洞察を提供し、NetScalerおよびNetScalerが処理するアプリケーションの状態を追跡するのに役立ちます。

時系列は、特定の時間間隔で発生する一連の連続したデータポイントです。NetScalerは、メトリックをサービスに送信するための分析時系列プロファイルの構成をサポートしています。

パフォーマンス測定値の設定

NetScalerのメトリックを有効にすると、NetScalerからメトリックを収集してさまざまなエンドポイントにエクスポートできます。メトリクスは、Avro、Prometheus、JSON の形式でエクスポートできます。エクスポートされたメトリックを処理および視覚化して、有意義な洞察を得ることができます。デフォルトでは、メトリックスは 30 秒ごとの時系列分析データのエクスポートをサポートします。ただし、要件に応じて 30 ~ 300 秒の値に設定できます。

NetScaler CLIを使用してメトリックを構成するには、次の操作を行います。

  1. 次のコマンドを使用して、IP アドレス、プロトコル、およびポートを使用してサービスを設定します:

    add service <metrics_service_name> <ip-address> <protocol> <port>
    <!--NeedCopy-->
    

    例:

    add service metrics_service1 192.168.1.1 HTTP 5563
    <!--NeedCopy-->
    
  2. 分析時系列プロファイルを設定して、メトリクスをサービスに送信します。サービス、メトリックをエクスポートする頻度、および出力モードを指定します。

    set analytics profile ns_analytics_time_series_profile -collectors <metrics_service_name> -type timeseries -metrics ENABLED metricsExportFrequency <30-300> -outputMode <avro/prometheus>
    <!--NeedCopy-->
    

    例:

    set analytics profile ns_analytics_time_series_profile -collectors metrics_service1 -type timeseries -metrics Enabled metricsExportFrequency 90 -outputMode prometheus --serveMode PUSH
    <!--NeedCopy-->
    

    注:

    この例では、デフォルトの時系列プロファイルns_analytics_time_series_profileを使用しています 。時系列プロファイルを作成する場合は、 add analytics profile コマンドを使用できます。

    この例では、メトリクスのエクスポート頻度は 90 秒に設定され、エクスポートモードは Prometheus に指定されています。

    show analytics profile <analytics-profile-name>コマンドを使用してメトリクスの設定を確認します:

    show analytics profile ns_analytics_time_series_profile
    
        Name: ns_analytics_time_series_profile
        Collector: metrics_service1
        Profile-type: timeseries
            Output Mode: Prometheus
            Metrics: ENABLED
                Schema File: schema.json
                Metrics Export Frequency: 90
            Events: DISABLED
            Auditlog: DISABLED
            Serve mode: Pull
        Reference Count: 0
    <!--NeedCopy-->
    

メトリックスファイルの生成

metrics_<format>_log.*ファイルは/var/nslog/フォルダーの場所に生成されます。

動的スキーマのサポート

NetScalerリリース13.1ビルド24.38以降、動的スキーマカウンターがサポートされています。動的スキーマカウンターのサポートにより、カウンターのリストを含むスキーマファイルを、必要に応じて実行時に更新できます。デフォルトでは、 /var/metrics_conf/schema.jsonファイルにはカウンタのリストが設定されます。

注:

  • メトリックのデフォルトスキーマファイル/var/metrics_conf/schema.jsonは、installns手順に従ってNetScalerアプライアンスにインストールできます。installns手順については、「 NetScalerアプライアンスのアップグレードとダウングレード」を参照してください。
  • デフォルトのスキーマファイル/var/metrics_conf/schema.jsonは、reference_schema.jsonに含まれていないいくつかのエンティティとカウンタで構成されています。これらのカウンターは、静的スキーマをサポートしていた古いバージョンのメトリックスに含まれていたため、下位互換性の理由からschema.jsonに保持されています。

CLI を使用してカウンタを登録するようにメトリクスを設定する

サービスを設定してメトリクスのエクスポートを開始します。

コマンドプロンプトで入力します:


set analytics profile ns_analytics_time_series_profile -metrics ENABLED -collectors <collector_name> -schemaFile  schema.json -outputMode <avro | prometheus>

<!--NeedCopy-->

注:

schema.json はデフォルトの SchemaFile 構成です。

エクスポートするメトリクスのCLIコマンドを使用して、必要なカウンターのセットを含む新しいスキーマファイルを設定できます。スキーマファイルは/var/metrics_conf/の場所に存在する必要があります。

stats infra でサポートされるカウンタのリスト (reference_schema.json) をすべて含むスキーマファイルが、/var/metrics_conf/の場所に存在します。このファイルは、カウンターのカスタムリストを作成するための参照として使用できます。

CLI を使用してスキーマファイルを設定します

set analytics profile ns_analytics_time_series_profile -metrics ENABLED -collectors <collector name> -schemaFile <schema file_name> -outputMode <avro | prometheus>

<!--NeedCopy-->

前述の CLI コマンドを使用して、必要なカウンターを含む新しいスキーマファイルを追加し、エクスポートするメトリクスを設定できます。

統計インフラでサポートされているすべてのカウンタのリスト (reference_schema.json) を含む参照スキーマファイルが/var/metrics_conf/の場所にあります。このファイルは、カウンターのカスタムリストを作成するための参照として使用できます。

コマンドプロンプトで CLI 設定出力を確認します。


show analytics profile ns_analytics_time_series_profile

    Name: ns_analytics_time_series_profile
    Collector: <collector_name>
    Profile-type: timeseries
    Output Mode: avro
    Metrics: ENABLED
    Schema File: schema.json
    Events: ENABLED
    Auditlog: DISABLED
    Serve mode: Push
    Reference Count: 0

<!--NeedCopy-->

エクスポートされたカウンタのリストを更新する手順

エクスポートされたカウンターのリストを更新するには、次の手順を実行します:

  1. カスタム/新しいスキーマファイルを更新します。
  2. 更新されたスキーマファイルを使用するには、CLI設定に表示されている-metricsオプションを使用してメトリクスを無効または有効にします。

複数の時系列プロファイルのサポート

NetScalerリリース13.1ビルド33.47以降、NetScalerでは最大3つの時系列プロファイル構成がサポートされています。

各時系列には次の項目を設定できます:

  • コレクター。

  • エクスポートに必要なカウンタのセットを含むスキーマファイル。

  • メトリックをエクスポートするデータ形式。

  • メトリクスの監査ログとイベントを有効または無効にするオプション。

複数の時系列プロファイルがサポートされているため、メトリクスは(設定されたスキーマファイルに基づいて)異なるメトリクスのセットを、さまざまな形式(Avro、Prometheus、Influx)のさまざまなコレクターに同時にエクスポートできます。

注:

設定したすべての時系列プロファイルでメトリクスを有効にできますが、イベントと監査ログは 1 つのプロファイルでのみ有効化できます。

CLI を使用して時系列プロファイルを追加する

コマンドプロンプトで入力します:

add analytics profile <profile_name> -type timeseries
<!--NeedCopy-->

CLI を使用して時系列プロファイルを設定する

コマンドプロンプトで入力します:

set analytics profile <profile_name> -metrics <DISABLED|ENABLED> -auditlogs <DISABLED|ENABLED> -events <DISABLED|ENABLED> -collectors <collector_name> -schemaFile schema.json -outputMode <avro | influx | prometheus>

<!--NeedCopy-->

複数の時系列プロファイルをサポートするログファイルの命名規則

  • Avro ログファイルはmetrics_avro_<profile_name>_log.*として生成されます。
  • Prometheus のログファイルは次のように生成されます。metrics_prom_<profile_name>.log

ユースケース固有のメトリックエクスポートの設定

スキーマファイルを作成することで、特定のユースケースに関連するメトリックのみをエクスポートできます。たとえば、TCP トラフィック関連のメトリックのみを表示する場合は、TCPトラフィックに関連するメトリックのみをエクスポートするtcptrafficschema.jsonファイルを作成できます。ユースケース固有のメトリクスをエクスポートすると、必要なメトリクスを簡単に見つけることができます。

NetScalerは、以下のユースケースのメトリックのエクスポートをサポートしています:

  • 仮想サーバー
  • アプリケーションのセキュリティ
  • SSL トラフィック
  • TCP トラフィック
  • HTTP トラフィック
  • システム概要

仮想サーバー

仮想サーバー関連のメトリックのみを表示するには、次の手順を実行します:

  1. NetScaler CLIにログインし、/var/metrics_conf/フォルダーに移動します。
  2. たとえばusecase.jsonなどのスキーマファイルを作成し、次の内容を追加して、変更を保存します:

    {
        "server_svc_cfg":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"},
            {"name":"si_cur_Clients","rate":"False"},
            {"name":"si_cur_Servers","rate":"False"}
        ],
        "server_serviceGroup":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"},
            {"name":"si_cur_Clients","rate":"False"},
            {"name":"si_cur_Servers","rate":"False"}
        ],
        "vserver_authn":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "vserver_cr":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "vserver_cs":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"},
            {"name":"si_cur_Clients","rate":"False"},
            {"name":"si_cur_Servers","rate":"False"}
        ],
        "gslb_server":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "gslb_vserver":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "server_gslb_serviceGroup":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "vserver_lb":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"},
            {"name":"si_cur_Clients","rate":"False"},
            {"name":"si_cur_Servers","rate":"False"}
        ],
        "vserver_vpn":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "vserver_user":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"},
            {"name":"si_cur_Clients","rate":"False"},
            {"name":"si_cur_Servers","rate":"False"}
        ]
    }
    <!--NeedCopy-->
    
  3. スキーマファイルを更新したら、メトリクスを無効にして有効にします。

    set analytics profile <profile_name> metrics DISABLED
    
    set analytics profile <profile_name> metrics ENABLED
    <!--NeedCopy-->
    

アプリケーションのセキュリティ

アプリケーションセキュリティ関連のメトリックのみを表示するには、次の手順を実行します:

  1. NetScaler CLIにログインし、/var/metrics_conf/フォルダーに移動します。
  2. たとえばusecase.jsonなどのスキーマファイルを作成し、次の内容を追加して、変更を保存します:

    {
        "netscaler":
        [
            {"name":"as_viol_starturl","rate":"True"},
            {"name":"as_viol_denyurl","rate":"True"},
            {"name":"as_viol_referer_header","rate":"True"},
            {"name":"as_viol_bufferoverflow","rate":"True"},
            {"name":"as_viol_grpc","rate":"True"},
            {"name":"as_viol_postbodylimit","rate":"True"},
            {"name":"as_viol_cookie","rate":"True"},
            {"name":"as_viol_cookie_hijack","rate":"True"},
            {"name":"as_viol_csrf_tag","rate":"True"},
            {"name":"as_viol_xss","rate":"True"},
            {"name":"as_viol_sql","rate":"True"},
            {"name":"as_viol_fldfmt","rate":"True"},
            {"name":"as_viol_fldconsistency","rate":"True"},
            {"name":"as_viol_fileuploadtypes","rate":"True"},
            {"name":"as_viol_infer_ctype_xml","rate":"True"},
            {"name":"as_viol_safecommerce","rate":"True"},
            {"name":"as_viol_safeobject","rate":"True"},
            {"name":"as_viol_signature","rate":"True"},
            {"name":"as_viol_content_type","rate":"True"},
            {"name":"as_viol_cmd","rate":"True"},
            {"name":"as_viol_json_dos","rate":"True"},
            {"name":"as_viol_json_sql","rate":"True"},
            {"name":"as_viol_json_xss","rate":"True"},
            {"name":"as_viol_json_cmd","rate":"True"},
            {"name":"as_viol_sql_gram","rate":"True"},
            {"name":"as_viol_json_sql_gram","rate":"True"},
            {"name":"as_viol_sql_comb","rate":"True"},
            {"name":"as_viol_xxe_comb","rate":"True"},
            {"name":"as_viol_xss_comb","rate":"True"},
            {"name":"as_viol_owasp_comb","rate":"True"},
            {"name":"as_viol_cmd_gram","rate":"True"},
            {"name":"as_viol_json_cmd_gram","rate":"True"},
            {"name":"as_viol_block_keyword","rate":"True"},
            {"name":"as_viol_json_blockkeyword","rate":"True"},
            {"name":"as_Requests","rate":"False"},
            {"name":"http_tot_Requests","rate":"True"},
            {"name":"http_tot_Requests1_0","rate":"True"},
            {"name":"http_tot_Requests1_1","rate":"True"},
            {"name":"as_sig_num_viols","rate":"True"}
        ],
        "appfw__":
        [
            {"name":"as_viol_starturl_profile","rate":"True"},
            {"name":"as_viol_denyurl_profile","rate":"True"},
            {"name":"as_viol_referer_header_profile","rate":"True"},
            {"name":"as_viol_bufferoverflow_profile","rate":"True"},
            {"name":"as_viol_postbodylimit_profile","rate":"True"},
            {"name":"as_viol_cookie_profile","rate":"True"},
            {"name":"as_viol_cookie_hijack_profile","rate":"True"},
            {"name":"as_viol_csrf_tag_profile","rate":"True"},
            {"name":"as_viol_xss_profile","rate":"True"},
            {"name":"as_viol_sql_profile","rate":"True"},
            {"name":"as_viol_fldfmt_profile","rate":"True"},
            {"name":"as_viol_fldconsistency_profile","rate":"True"},
            {"name":"as_viol_safecommerce_profile","rate":"True"},
            {"name":"as_viol_safeobject_profile","rate":"True"},
            {"name":"as_viol_signature_profile","rate":"True"},
            {"name":"as_viol_content_type_profile","rate":"True"},
            {"name":"as_viol_json_dos_profile","rate":"True"},
            {"name":"as_viol_json_sql_profile","rate":"True"},
            {"name":"as_viol_json_xss_profile","rate":"True"},
            {"name":"as_viol_json_cmd_profile","rate":"True"},
            {"name":"as_viol_fileuploadtypes_profile","rate":"True"},
            {"name":"as_viol_infer_ctype_xml_profile","rate":"True"},
            {"name":"as_viol_cmd_profile","rate":"True"},
            {"name":"as_viol_sql_gram_profile","rate":"True"},
            {"name":"as_viol_json_sql_gram_profile","rate":"True"},
            {"name":"as_viol_sql_comb_profile","rate":"True"},
            {"name":"as_viol_xxe_comb_profile","rate":"True"},
            {"name":"as_viol_xss_comb_profile","rate":"True"},
            {"name":"as_viol_owasp_comb_profile","rate":"True"},
            {"name":"as_viol_cmd_gram_profile","rate":"True"},
            {"name":"as_viol_json_cmd_gram_profile","rate":"True"},
            {"name":"as_viol_block_keyword_profile","rate":"True"},
            {"name":"as_viol_json_blockkeyword_profile","rate":"True"},
            {"name":"as_viol_total_per_profile","rate":"True"}
        ]
    }
    <!--NeedCopy-->
    
  3. スキーマファイルを更新したら、メトリクスを無効にして有効にします。

    set analytics profile <profile_name> metrics DISABLED
    
    set analytics profile <profile_name> metrics ENABLED
    <!--NeedCopy-->
    

SSL トラフィック

SSL 関連のメトリックのみを表示するには、次の手順を実行します:

  1. NetScaler CLIにログインし、/var/metrics_conf/フォルダーに移動します。
  2. たとえばusecase.jsonなどのスキーマファイルを作成し、次の内容を追加して、変更を保存します:

    {
        "netscaler":
        [
            {"name":"ssl_tot_sslInfo_TotalTxCount","rate":"True"},
            {"name":"ssl_tot_enc_bytes","rate":"True"},
            {"name":"ssl_tot_dec_bytes","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_RSA_512","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_RSA_1024","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_RSA_2048","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_RSA_3072","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_RSA_4096","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_DH_512","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_DH_1024","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_DH_2048","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_DH_4096","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_ECDHE_curve_secp521r1","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_ECDHE_curve_secp384r1","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_ECDHE_curve_secp256r1","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_ECDHE_curve_secp224r1","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_ECDHE_curve_x25519","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_RC4_40","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_RC4_56","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_RC4_64","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_RC4_128","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_DES_40","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_DES_56","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_3DES_168","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_AES_128","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_AES_256","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_RC2_40","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_RC2_56","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_RC2_128","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_AESGCM_128","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_AESGCM_256","rate":"True"},
            {"name":"ssl_tot_sslInfo_Cipher_NULL","rate":"True"},
            {"name":"ssl_tot_sslInfo_Hash_MD5","rate":"True"},
            {"name":"ssl_tot_sslInfo_Hash_SHA","rate":"True"},
            {"name":"ssl_tot_sslInfo_Hash_SHA256","rate":"True"},
            {"name":"ssl_tot_sslInfo_Hash_SHA384","rate":"True"},
            {"name":"ssl_tot_sslInfo_SSLv3HandskCount","rate":"True"},
            {"name":"ssl_tot_sslInfo_TLSv1HandskCount","rate":"True"},
            {"name":"ssl_tot_sslInfo_TLSv11HandskCount","rate":"True"},
            {"name":"ssl_tot_sslInfo_TLSv12HandskCount","rate":"True"},
            {"name":"ssl_tot_sslInfo_Auth_RSA","rate":"True"},
            {"name":"ssl_tot_sslInfo_Auth_DH","rate":"True"},
            {"name":"ssl_tot_sslInfo_Auth_DSS","rate":"True"},
            {"name":"ssl_tot_sslInfo_Auth_ECDSA","rate":"True"},
            {"name":"ssl_tot_sslInfo_Auth_NULL","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_backend_ecdhe_curve_secp521r1","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_backend_ecdhe_curve_secp384r1","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_backend_ecdhe_curve_secp256r1","rate":"True"},
            {"name":"ssl_tot_sslInfo_KeyEx_backend_ecdhe_curve_secp224r1","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_RC4_40","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_RC4_56","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_RC4_64","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_RC4_128","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_DES_40","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_DES_56","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_3DES_168","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_AES_128","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_AES_256","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_RC2_40","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_RC2_56","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_RC2_128","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_AESGCM_128","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_AESGCM_256","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Cipher_NULL","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Hash_MD5","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Hash_SHA","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Hash_SHA256","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Hash_SHA384","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Auth_RSA","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Auth_DH","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Auth_DSS","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Auth_ECDSA","rate":"True"},
            {"name":"ssl_tot_sslInfo_Backend_Auth_NULL","rate":"True"},
            {"name":"ssl_tot_enc_bytes_FE","rate":"True"},
            {"name":"ssl_tot_enc_bytes_BE","rate":"True"},
            {"name":"ssl_tot_dec_bytes_FE","rate":"True"},
            {"name":"ssl_tot_dec_bytes_BE","rate":"True"},
            {"name":"ssl_cur_session_inuse","rate":"True"}
        ],
        "vserver_ssl":
        [
            {"name":"ssl_ctx_tot_HandskFail","rate":"True"}
        ]
    }
    <!--NeedCopy-->
    
  3. スキーマファイルを更新したら、メトリクスを無効にして有効にします。

    set analytics profile <profile_name> metrics DISABLED
    
    set analytics profile <profile_name> metrics ENABLED
    <!--NeedCopy-->
    

TCP トラフィック

TCP 関連のメトリックのみを表示するには、次の手順を実行します:

  1. NetScaler CLIにログインし、/var/metrics_conf/フォルダーに移動します。
  2. たとえばusecase.jsonなどのスキーマファイルを作成し、次の内容を追加して、変更を保存します:

    {
        "server_svc_cfg":
        [
            {"name":"si_tot_pkt_rcvd","rate":"True"},
            {"name":"si_tot_pkt_sent","rate":"True"}
        ],
        "vserver_cr":
        [
            {"name":"si_tot_pkt_rcvd","rate":"True"},
            {"name":"si_tot_pkt_sent","rate":"True"}
        ],
        "vserver_cs":
        [
            {"name":"si_tot_pkt_rcvd","rate":"True"},
            {"name":"si_tot_pkt_sent","rate":"True"}
        ],
        "vserver_lb":
        [
            {"name":"si_tot_pkt_rcvd","rate":"True"},
            {"name":"si_tot_pkt_sent","rate":"True"}
        ],
        "netscaler":
        [
            {"name":"tcp_cur_ClientConn","rate":"False"},
            {"name":"tcp_cur_ClientConnEst","rate":"False"},
            {"name":"tcp_cur_ServerConn","rate":"False"},
            {"name":"tcp_cur_ServerConnEst","rate":"False"},
            {"name":"tcp_cur_ClientConnClosing","rate":"False"},
            {"name":"tcp_cur_ServerConnClosing","rate":"False"},
            {"name":"tcp_cur_surgequeuelen","rate":"False"},
            {"name":"tcp_err_rst","rate":"False"},
            {"name":"tcp_err_noip","rate":"False"},
            {"name":"tcp_err_retransmit_giveups","rate":"False"},
            {"name":"tcp_err_retransmit","rate":"False"},
            {"name":"tcp_err_stray_packets","rate":"False"}
        ],
        "vserver_user":
        [
            {"name":"si_tot_pkt_rcvd","rate":"True"},
            {"name":"si_tot_pkt_sent","rate":"True"}
        ]
    }
    
    <!--NeedCopy-->
    
  3. スキーマファイルを更新したら、メトリクスを無効にして有効にします。

    set analytics profile <profile_name> metrics DISABLED
    
    set analytics profile <profile_name> metrics ENABLED
    <!--NeedCopy-->
    

HTTP トラフィック

HTTP 関連のメトリックのみを表示するには、次の手順を実行します:

  1. NetScaler CLIにログインし、/var/metrics_conf/フォルダーに移動します。
  2. たとえばusecase.jsonなどのスキーマファイルを作成し、次の内容を追加して、変更を保存します:

    {
        "server_svc_cfg":
        [
            {"name":"si_tot_Requests","rate":"True"},
            {"name":"si_tot_Responses","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "server_serviceGroup":
        [
            {"name":"si_tot_Requests","rate":"True"},
            {"name":"si_tot_Responses","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "netscaler":
        [
            {"name":"http_tot_api_req_json","rate":"False"},
            {"name":"http_tot_api_req_xml","rate":"False"},
            {"name":"http_tot_api_req_vnd","rate":"False"},
            {"name":"http_tot_api_res_json","rate":"False"},
            {"name":"http_tot_api_res_xml","rate":"False"},
            {"name":"http_tot_api_res_vnd","rate":"False"}
        ],
        "vserver_authn":
        [
            {"name":"si_tot_Requests","rate":"True"},
            {"name":"si_tot_Responses","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "vserver_cr":
        [
            {"name":"vsvr_tot_Hits","rate":"True"},
            {"name":"si_tot_Requests","rate":"True"},
            {"name":"si_tot_Responses","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "vserver_cs":
        [
            {"name":"vsvr_tot_Hits","rate":"True"},
            {"name":"si_tot_Requests","rate":"True"},
            {"name":"si_tot_Responses","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"},
            {"name":"si_tot_clt_ttlb_transactions","rate":"False"},
            {"name":"si_tot_clt_ttlb","rate":"False"}
        ],
        "gslb_server":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "gslb_vserver":
        [
            {"name":"vsvr_tot_Hits","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "server_gslb_serviceGroup":
        [
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "vserver_lb":
        [
            {"name":"vsvr_tot_Hits","rate":"True"},
            {"name":"si_tot_Requests","rate":"True"},
            {"name":"si_tot_Responses","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"},
            {"name":"si_tot_clt_ttlb_transactions","rate":"False"},
            {"name":"si_tot_clt_ttlb","rate":"False"},
            {"name":"si_tot_1xx_resp","rate":"False"},
            {"name":"si_tot_2xx_resp","rate":"False"},
            {"name":"si_tot_4xx_resp","rate":"False"},
            {"name":"si_tot_5xx_resp","rate":"False"}
        ],
        "vserver_vpn":
        [
            {"name":"si_tot_Requests","rate":"True"},
            {"name":"si_tot_Responses","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ],
        "vserver_user":
        [
            {"name":"vsvr_tot_Hits","rate":"True"},
            {"name":"si_tot_Requests","rate":"True"},
            {"name":"si_tot_Responses","rate":"True"},
            {"name":"si_tot_RequestBytes","rate":"True"},
            {"name":"si_tot_ResponseBytes","rate":"True"}
        ]
    }
    <!--NeedCopy-->
    
  3. スキーマファイルを更新したら、メトリクスを無効にして有効にします。

    set analytics profile <profile_name> metrics DISABLED
    
    set analytics profile <profile_name> metrics ENABLED
    <!--NeedCopy-->
    

システム概要

システム概要に関連するメトリックのみを表示するには、次の手順を実行します:

  1. NetScaler CLIにログインし、/var/metrics_conf/フォルダーに移動します。
  2. たとえばusecase.jsonなどのスキーマファイルを作成し、次の内容を追加して、変更を保存します:

    {
        "server_svc_cfg":
        [
            {"name":"si_tot_svr_ttlb","rate":"False"},
            {"name":"si_tot_svr_ttlb_transactions","rate":"False"},
            {"name":"si_cur_state","rate":"False"},
            {"name":"si_tot_svr_ttfb_transactions","rate":"False"},
            {"name":"si_tot_svr_ttfb","rate":"False"}
        ],
        "serviceGroup_NSSVC":
        [
            {"name":"si_cur_state","rate":"False"}
        ],
        "server_serviceGroup":
        [
            {"name":"si_cur_state","rate":"False"},
            {"name":"si_tot_svr_ttfb_transactions","rate":"False"},
            {"name":"si_tot_svr_ttfb","rate":"False"}
        ],
        "vserver_authn":
        [
            {"name":"si_cur_state","rate":"False"}
        ],
        "vserver_cr":
        [
            {"name":"si_cur_state","rate":"False"},
            {"name":"vsvr_tot_Hits","rate":"True"}
        ],
        "vserver_cs":
        [
            {"name":"si_cur_state","rate":"False"},
            {"name":"vsvr_tot_Hits","rate":"True"}
        ],
        "gslb_server":
        [
            {"name":"si_cur_state","rate":"False"}
        ],
        "gslb_vserver":
        [
            {"name":"si_cur_state","rate":"False"},
            {"name":"vsvr_tot_Hits","rate":"True"}
        ],
        "gslb_serviceGroup_NSSVC":
        [
            {"name":"si_cur_state","rate":"False"}
        ],
        "server_gslb_serviceGroup":
        [
            {"name":"si_cur_state","rate":"False"}
        ],
        "vserver_lb":
        [
            {"name":"si_cur_state","rate":"False"},
            {"name":"si_tot_2xx_resp","rate":"False"},
            {"name":"si_tot_4xx_resp","rate":"False"},
            {"name":"vsvr_tot_Hits","rate":"True"}
        ],
        "interface":
        [
            {"name":"nic_err_dropped_pkts","rate":"True"}
        ],
        "netscaler":
        [
            {"name": "tcp_cur_ClientConn", "rate": "False"},
            {"name": "tcp_err_noip", "rate": "False"},
            {"name": "tcp_err_rst", "rate": "True"},
            {"name": "mem_cur_usedsize", "rate": "False"},
            {"name": "tcp_tot_rxpkts", "rate": "True"},
            {"name": "http_tot_rxResponseBytes", "rate": "True"},
            {"name": "http_tot_Requests1_1", "rate": "True"},
            {"name": "http_tot_Responses", "rate": "True"},
            {"name": "tcp_err_retransmit_giveups", "rate": "True"},
            {"name": "cur_syshealth_disk0_errors", "rate": "False"},
            {"name": "http_tot_Requests", "rate": "True"},
            {"name": "http_tot_rxRequestBytes", "rate": "True"},
            {"name": "slave_cpu_use", "rate": "False"},
            {"name": "cur_syshealth_disk0_used", "rate": "False"},
            {"name": "tcp_err_rst_outof_wnd", "rate": "True"},
            {"name": "tcp_err_stray_packets", "rate": "True"},
            {"name": "cur_syshealth_disk1_errors", "rate": "False"},
            {"name": "mgmt_additional_cpu_use", "rate": "False"},
            {"name": "tcp_cur_ServerConnEst", "rate": "False"},
            {"name": "tcp_cur_ClientConnEst", "rate": "False"},
            {"name": "tcp_err_link_giveups", "rate": "False"},
            {"name": "tcp_err_rst_inTimewaits", "rate": "True"},
            {"name": "tcp_err_retransmit", "rate": "True"},
            {"name": "tcp_cur_ServerConnClosing", "rate": "False"},
            {"name": "tcp_err_rst_not_est", "rate": "True"},
            {"name": "http_tot_Responses1_1", "rate": "True"},
            {"name": "tcp_err_rst_not_est", "rate": "True"},
            {"name": "tcp_err_rst_inTimewaits", "rate": "True"},
            {"name": "tcp_err_rst_outof_wnd", "rate": "True"},
            {"name": "tcp_cur_ServerConn", "rate": "False"},
            {"name": "allnic_tot_tx_mbits", "rate": "True"},
            {"name": "http_tot_Responses1_0", "rate": "True"},
            {"name": "cpu_use", "rate": "False"},
            {"name": "tcp_err_retransmit_giveups", "rate": "True"},
            {"name": "http_tot_Requests1_0", "rate": "True"},
            {"name": "mgmt_cpu_use", "rate": "False"},
            {"name": "cur_syshealth_disk1_size", "rate": "False"},
            {"name": "allnic_tot_rx_mbits", "rate": "True"},
            {"name": "master_cpu_use", "rate": "False"},
            {"name": "cur_syshealth_disk0_size", "rate": "False"}
        ],
        "mempool":
        [
            {"name":"mem_err_alloc_failed","rate":"False"}
        ],
        "vserver_ssl":
        [
            {"name":"si_cur_state","rate":"False"}
        ],
        "cpu":
        [
            {"name":"cc_cpu_use","rate":"False"}
        ],
        "vserver_vpn":
        [
            {"name":"si_cur_state","rate":"False"}
        ],
        "vserver_user":
        [
            {"name":"si_cur_state","rate":"False"},
            {"name":"vsvr_tot_Hits","rate":"True"}
        ]
    }
    <!--NeedCopy-->
    
  3. スキーマファイルを更新したら、メトリクスを無効にして有効にします。

    set analytics profile <profile_name> metrics DISABLED
    
    set analytics profile <profile_name> metrics ENABLED
    <!--NeedCopy-->
    

メトリクスを表示する

メトリクスを利用または視覚化するさまざまな方法は次のとおりです:

  • NetScaler コマンドラインインターフェイス (CLI)
  • Citrix 独自のNITRO API
  • メトリクスをNetScalerコンソールにエクスポートする
  • 指標をオブザーバビリティツールにエクスポート

NetScaler CLI

NetScaler CLIを使用してメトリックを取得できます。NetScaler CLIにログインし、シェルプロンプトからコマンドを実行します。次のコマンドはコマンドの例です:

stat lb vserver <vserver-name>
<!--NeedCopy-->

例:

> shell
root@ns# stat lb vserver vsrv-wireless
Virtual Server Summary
                      vsvrIP  port     Protocol        State   Health  actSvcs
vsrv...eless               *     0          TCP           UP      100        1

           inactSvcs
vsrv...eless       0
Virtual Server Statistics
                                          Rate (/s)                Total
Vserver hits                                       0                   10
Requests                                           0                    0
Responses                                          0                    0
Request bytes                                      0                 1580
Response bytes                                     0            532594360
Total Packets rcvd                                 0               216463
Total Packets sent                                 0               369898
Current client connections                        --                    0
Current Client Est connections                    --                    0
Current server connections                        --                    0
Requests in surge queue                           --                    0
Requests in vserver's surgeQ                      --                    0
Requests in service's surgeQs                     --                    0
Spill Over Threshold                              --                    0
Spill Over Hits                                   --                    0
Labeled Connection                                --                    0
Push Labeled Connection                           --                    0
Deferred Request                                   0                    0
Invalid Request/Response                          --                    0
Invalid Request/Response Dropped                  --                    0
Bound Service(s) Summary
                          IP  port         Type        State     Hits   Hits/s
svc-internet     192.168.2.2     0          TCP           UP       10      0/s

                 Req    Req/s      Rsp    Rsp/s Throughp ClntConn   SurgeQ
svc-internet       0      0/s        0      0/s        0        0        0
                  SvrConn   ReuseP  MaxConn ActvTran  SvrTTFB     Load
svc-internet         0        0        0        0        0        0

<!--NeedCopy-->

Citrix 独自のNITRO API

NITRO API を実行して、必要なメトリクスを取得できます。

たとえば、NetScalerが処理しているHTTPリクエストの総数を表示するには、Linuxシェルで次のcurlコマンドを実行してNITRO APIを使用できます:

curl http://{nsip}/nitro/v1/stat/nsglobalcntr?args=counters:http_tot_Requests -u {nsuser}:{nspassword}
<!--NeedCopy-->

前の例では、

  • nsip はNetScaler の IP アドレスです
  • nsuser 」と「 nspassword」 はNetScalerのログイン認証情報です

出力は次のとおりです:

root@rohit_lvm:~#  curl "http://10.10.10.10/nitro/v1/stat/nsglobalcntr?args=counters:http_tot_Requests" -u nsroot:freebsd
{ "errorcode": 0, "message": "Done", "severity": "NONE", "nsglobalcntr": { "http_tot_Requests": "33398" } }
<!--NeedCopy-->

Citrix 独自のNITRO APIについて詳しくは、「 Citrix ADCNITRO API」を参照してください。

メトリクスをNetScalerコンソールにエクスポートする

ネットワークにNetScalerコンソールを使用してNetScalerを管理している場合は、NetScalerコンソールGUIを使用してメトリックを表示できます。詳しくは、 NetScaler コンソールのドキュメントを参照してください

指標をオブザーバビリティツールにエクスポート

統計やカウンターなどの指標を次のようなオブザーバビリティツールにエクスポートできます:

サンプルダッシュボード

Grafana とSplunkで利用できる次のダッシュボードには、特定のユースケースに関連する指標が表示されます:

メトリクスのエクスポートに関する問題のトラブルシューティング

/var/nslog/metricscollector.log 場所に保存されているデバッグログを使用して、問題をトラブルシューティングできます。