Skip to content

Write InfluxUDP

AzureDevOps edited this page Sep 25, 2026 · 1 revision

Write-InfluxUDP

SYNOPSIS

Send metrics to the Influx UDP listener (UDP must be enabled in influxdb.conf) for writing to Influx.

SYNTAX

MetricObject

Write-InfluxUDP [-InputObject] <PSObject[]> [-IP <IPAddress>] [-Port <Int32>] [-ExcludeEmptyMetric]
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

Measure

Write-InfluxUDP [-Measure] <String> [-Tags <Hashtable>] -Metrics <Hashtable> [-TimeStamp <DateTime>]
 [-IP <IPAddress>] [-Port <Int32>] [-ExcludeEmptyMetric] [-ProgressAction <ActionPreference>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Use to write data in to an Influx database via UDP by providing a hashtable of tags and values.

EXAMPLES

EXAMPLE 1

Write-InfluxUDP -Measure WebServer -Tags @{Server='Host01'} -Metrics @{CPU=100; Memory=50} -IP 1.2.3.4 -Port 8089

Description

This command will submit the provided tag and metric data for a measure called 'WebServer' via the endpoint 'udp://1.2.3.4:8089'

PARAMETERS

-InputObject

A metric object (generated by one of the Get-*Metric cmdlets from this module) which can be provided as pipeline input.

Type: PSObject[]
Parameter Sets: MetricObject
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Measure

The name of the measure to be updated or created.

Type: String
Parameter Sets: Measure
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Tags

A hashtable of tag names and values.

Type: Hashtable
Parameter Sets: Measure
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Metrics

A hashtable of metric names and values.

Type: Hashtable
Parameter Sets: Measure
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeStamp

Specify the exact date and time for the measure data point. If not specified the current date and time is used.

Type: DateTime
Parameter Sets: Measure
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IP

IP address for InfluxDB UDP listener.

Type: IPAddress
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 127.0.0.1
Accept pipeline input: False
Accept wildcard characters: False

-Port

Port for InfluxDB UDP listener.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 8089
Accept pipeline input: False
Accept wildcard characters: False

-ExcludeEmptyMetric

Switch: Use to exclude null or empty metric values from being sent. Useful where a metric is initially created as an integer but then an empty or null instance of that metric would attempt to be sent as an empty string, resulting in a datatype conflict.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows 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: False

-Confirm

Prompts 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

-ProgressAction

{{Fill ProgressAction Description}}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This 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).

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Clone this wiki locally