Repository navigation
Write Influx
Writes data to Influx via the REST API.
Write-Influx -Measure <String> [-Tags <Hashtable>] -Metrics <Hashtable> [-TimeStamp <DateTime>]
[-Server <String>] [-Bulk] [-BulkSize <Int32>] [-ExcludeEmptyMetric] -Database <String>
[-Credential <PSCredential>] [-TrustServerCertificate] [-SingleLineMetrics]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Write-Influx -InputObject <PSObject[]> [-Server <String>] [-Bulk] [-BulkSize <Int32>] [-ExcludeEmptyMetric]
-Organisation <String> -Bucket <String> -Token <String> [-TrustServerCertificate] [-SingleLineMetrics]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Write-Influx -InputObject <PSObject[]> [-Server <String>] [-Bulk] [-BulkSize <Int32>] [-ExcludeEmptyMetric]
-Database <String> [-Credential <PSCredential>] [-TrustServerCertificate] [-SingleLineMetrics]
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Write-Influx -Measure <String> [-Tags <Hashtable>] -Metrics <Hashtable> [-TimeStamp <DateTime>]
[-Server <String>] [-Bulk] [-BulkSize <Int32>] [-ExcludeEmptyMetric] -Organisation <String> -Bucket <String>
-Token <String> [-TrustServerCertificate] [-SingleLineMetrics] [-ProgressAction <ActionPreference>] [-WhatIf]
[-Confirm] [<CommonParameters>]
Use to send data in to an Influx database by providing a hashtable of tags and values.
Write-Influx -Measure WebServer -Tags @{Server='Host01'} -Metrics @{CPU=100; Memory=50} -Database Web -Server http://myinflux.local:8086
This command will submit the provided tag and metric data for a measure called 'WebServer' to a database called 'Web' via the API endpoint 'http://myinflux.local:8086'
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_v2, MetricObject_v1
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseThe name of the measure to be updated or created.
Type: String
Parameter Sets: Measure_v1, Measure_v2
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA hashtable of tag names and values.
Type: Hashtable
Parameter Sets: Measure_v1, Measure_v2
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA hashtable of metric names and values.
Type: Hashtable
Parameter Sets: Measure_v1, Measure_v2
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecify 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_v1, Measure_v2
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe URL and port for the Influx REST API. Default: 'http://localhost:8086'
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Http://localhost:8086
Accept pipeline input: False
Accept wildcard characters: FalseSwitch: Use to have all metrics transmitted via a single connection to Influx.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe number of metrics to include when using the -Bulk switch before a write occurs. Default: 5000.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 5000
Accept pipeline input: False
Accept wildcard characters: FalseSwitch: 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: FalseThe name of the Influx database to write to. (This is an InfluxDB v1.x Parameter)
Type: String
Parameter Sets: Measure_v1, MetricObject_v1
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA PSCredential object with the username and password to use if the Influx server has authentication enabled. (This is an InfluxDB v1.x Parameter)
Type: PSCredential
Parameter Sets: Measure_v1, MetricObject_v1
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of the Influx organisation. (This is an InfluxDB v2.x Parameter)
Type: String
Parameter Sets: MetricObject_v2, Measure_v2
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name of the Influx bucket/database to write to. (This is an InfluxDB v2.x Parameter)
Type: String
Parameter Sets: MetricObject_v2, Measure_v2
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe token to authenticate with InfluxDB. (This is an InfluxDB v2.x Parameter)
Type: String
Parameter Sets: MetricObject_v2, Measure_v2
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSwitch: Skips Server SSL certificate validation.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSwitch: Sends all measured values for every Metric object or Measure passed within the single Influx Line Protocol line.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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).