2.9. メトリック

3scale toolbox を使用して、デベロッパーポータルのメトリクスの作成、更新、一覧表示、および削除を行います。

2.9.1. メトリクスの作成

メトリクスを作成するには、以下の手順に従います。

  • メトリクス名を指定する必要があります。
  • system-name を上書きするには、オプションのパラメーターを使用します。
  • 同じ名前のメトリクスがすでに存在する場合、エラーメッセージが表示されます。
  • --disabled フラグを使用して、無効な メトリクスを作成します。

    • デフォルトでは、有効 になります。
注記
  • service 位置引数はサービスの参照で、サービスの id またはサービスの system_name のどちらかです。

    • toolbox は、どちらか一方を使用します。

次の例では、メトリックを作成します。

3scale metric create [opts] <remote> <service> <metric-name>

メトリクスの作成時に、以下のオプションを使用します。

Options
       --description=<value>      This will set a metric description
       --disabled                 This will disable this metric in all application plans
    -t --system-name=<value>      This will set the application plan system name
       --unit=<value>             Metric unit: default hit

Option for metric
    -c --config-file=<value>      3scale toolbox configuration file
                                  (default: $HOME/.3scalerc.yaml)
    -h --help                     show help for this command
    -k --insecure                 Proceed and operate even for server
                                  connections otherwise considered insecure
    -v --version                  This will print the version of this command
       --verbose                  Verbose mode