gcloud_beta_logging_metrics_update (1)
NAME
- gcloud beta logging metrics update - updates the definition of a logs-based metric
SYNOPSIS
-
gcloud beta logging metrics update METRIC_NAME (--config-from-file=CONFIG_FROM_FILE | --description=DESCRIPTION --log-filter=LOG_FILTER) [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(BETA) Updates the description or the filter expression of an existing
POSITIONAL ARGUMENTS
-
- METRIC_NAME
-
The name of the log-based metric to update.
REQUIRED FLAGS
-
-
Data about the metric to update. Exactly one of these must be specified:
-
- --config-from-file=CONFIG_FROM_FILE
-
A path to a YAML file specifying the updates to be made to the logs-based
metric.
-
Arguments to specify information about simple counter logs-based metrics.
-
- --description=DESCRIPTION
-
A new description for the metric. If omitted, the description is not changed.
- --log-filter=LOG_FILTER
-
A new filter string for the metric. If omitted, the filter is not changed.
-
-
-
Data about the metric to update. Exactly one of these must be specified:
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To update the description of a metric called high_severity_count, run:
-
$ gcloud beta logging metrics update high_severity_count \
--description="Count of high-severity log entries."
To update the filter expression of the metric, run:
-
$ gcloud beta logging metrics update high_severity_count \
--log-filter="severity >= WARNING"
Detailed information about filters can be found at: cloud.google.com/logging/docs/view/advanced_filters
For advanced features such as user-defined labels and distribution metrics, update using a config file:
-
$ gcloud beta logging metrics update high_severity_count \
--config-from-file=$PATH_TO_FILE
The config file should be in YAML format. Detailed information about how to configure metrics can be found at: cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric Any top-level fields in the LogMetric definition that aren't specified in the config file will not be updated in the metric.
NOTES
This command is currently in BETA and may change without notice. This variant is also available:
- $ gcloud logging metrics update