Repository navigation
Write StatsD
Send metrics to a statsd server via UDP for writing to Influx.
Write-StatsD [-InputObject] <PSObject[]> [-IP <IPAddress>] [-Port <Int32>] [-ProgressAction <ActionPreference>]
[-WhatIf] [-Confirm] [<CommonParameters>]
Write-StatsD [-Data] <String[]> [-IP <IPAddress>] [-Port <Int32>] [-ProgressAction <ActionPreference>]
[-WhatIf] [-Confirm] [<CommonParameters>]
PowerShell cmdlet to send metric data to a statsd server. Unless server or port is passed, uses the default 127.0.0.1 and port of 8125.
Write-StatsD 'my_metric:123|g'
This will write a value to a gauge metric named my_metric.
Write-StatsD 'my_metric:321|g' -ip 10.0.0.10 -port 8180
This will write a value to a gauge metric named my_metric via the specified IP and port.
'my_metric:1|c' | Write-StatsD
This will write a value to a counter metric, using the piepline as input for the cmdlet.
A metric object (generated by one of the Get-*Metric cmdlets from this module) which can be provided as pipeline input and will be automatically converted to StatsD strings.
Type: PSObject[]
Parameter Sets: MetricObject
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseMetric data to send to statsd. If string is not enclosed in quotes (single or double), the pipe character needs to be escaped.
Type: String[]
Parameter Sets: StatsDString
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseIP address for statsd server
Type: IPAddress
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 127.0.0.1
Accept pipeline input: False
Accept wildcard characters: FalsePort that statsd server is listening to
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 8125
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{Fill ProgressAction Description}}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).