< Back

Get-GcLogMetric

Mon Jan 13, 2020 11:17 pm

NAME Get-GcLogMetric



SYNOPSIS

Retrieves StackDriver Log Metrics.





SYNTAX

Get-GcLogMetric [-Project <string>] [[-MetricName] <string[]>] [<CommonParameters>]





DESCRIPTION

Retrieves one or more StackDriver Log Metrics. If -MetricName is not used, the cmdlet will return all the log

metrics under the specified project (default project if -Project is not used). Otherwise, the cmdlet will return a

list of metrics matching the names specified in -MetricName and will raise an error for any metrics that cannot be

found.





PARAMETERS

-Project <string>

The project to check for log metrics in. If not set via PowerShell parameter processing, will default to the

Cloud SDK's DefaultProject property.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MetricName <string[]>

The names of the log metrics to be retrieved.



Required? false

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string[]>

The names of the log metrics to be retrieved.



This is an alias of the MetricName parameter.



Required? false

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



---------- EXAMPLE 1 ----------



PS C:\\> Get-GcLogMetric



This command retrieves all metrics in the default project.

---------- EXAMPLE 2 ----------



PS C:\\> Get-GcLogMetric -MetricName "metric1", "metric2" -Project "my-project"



This command retrieves 2 metrics ("metric1" and "metric2") in the project "my-project".



RELATED LINKS

[Log Metrics] (https://cloud.google.com/logging/docs/v ... ed_metrics)