< Back
Create-MJinfluxArray
Post
NAME Create-MJinfluxArray
SYNOPSIS
Build an array of objects, this data can be used in the Send-MJInfluxData
Written by Ispep
www.automatiserar.se
SYNTAX
Create-MJinfluxArray [-DataToProcess] <Object> [[-MaxProcessLimit] <Int32>] [<CommonParameters>]
DESCRIPTION
This function will get an array of data, it will try to parse it with the following structure:
It will replace all spaces with "_", this to avoid influxdatabase post structure.
row1 : maintag
row2 : taginfo
row3 : value
row4 : datetime
"Maintag||||IP=10.20.30.40,Firmware=3.2||||WifiSignal=-22,Temperature=22.3,Laddning=4.2,AntalMS=1232||||2016-08-16
13:06:22.131"
This is an exampel the data will be changed:
ESP8266-NR12||||IP=10.20.30.40,Firmware=2.1||||WifiSignal=-89,Temperatur=24.94,Laddning=4.25,AntalMS=4213||||2016-0
8-16 13:06:22.131
PARAMETERS
-DataToProcess <Object>
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-MaxProcessLimit <Int32>
The default limit for an array post to Influxdb default
Required? false
Position? 2
Default value 5000
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:\\>Send-MJInfluxData -InfluxServer YourComputer -databaseName Automatiserarse -BulkData $($ArrayPostData)
This is the values in the $ArrayPostData:
ESP8266-NR12||||IP=10.20.30.40,Firmware=2.1||||WifiSignal=-84,Temperatur=12.81,Laddning=0.03,AntalMS=2456||||20
16-08-18 02:06:11.621
ESP8266-NR12||||IP=10.20.30.40,Firmware=2.1||||WifiSignal=-84,Temperatur=12.88,Laddning=0.03,AntalMS=2482||||20
16-08-18 02:11:04.365
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Another example of how to use this cmdlet
RELATED LINKS
SYNOPSIS
Build an array of objects, this data can be used in the Send-MJInfluxData
Written by Ispep
www.automatiserar.se
SYNTAX
Create-MJinfluxArray [-DataToProcess] <Object> [[-MaxProcessLimit] <Int32>] [<CommonParameters>]
DESCRIPTION
This function will get an array of data, it will try to parse it with the following structure:
It will replace all spaces with "_", this to avoid influxdatabase post structure.
row1 : maintag
row2 : taginfo
row3 : value
row4 : datetime
"Maintag||||IP=10.20.30.40,Firmware=3.2||||WifiSignal=-22,Temperature=22.3,Laddning=4.2,AntalMS=1232||||2016-08-16
13:06:22.131"
This is an exampel the data will be changed:
ESP8266-NR12||||IP=10.20.30.40,Firmware=2.1||||WifiSignal=-89,Temperatur=24.94,Laddning=4.25,AntalMS=4213||||2016-0
8-16 13:06:22.131
PARAMETERS
-DataToProcess <Object>
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-MaxProcessLimit <Int32>
The default limit for an array post to Influxdb default
Required? false
Position? 2
Default value 5000
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:\\>Send-MJInfluxData -InfluxServer YourComputer -databaseName Automatiserarse -BulkData $($ArrayPostData)
This is the values in the $ArrayPostData:
ESP8266-NR12||||IP=10.20.30.40,Firmware=2.1||||WifiSignal=-84,Temperatur=12.81,Laddning=0.03,AntalMS=2456||||20
16-08-18 02:06:11.621
ESP8266-NR12||||IP=10.20.30.40,Firmware=2.1||||WifiSignal=-84,Temperatur=12.88,Laddning=0.03,AntalMS=2482||||20
16-08-18 02:11:04.365
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Another example of how to use this cmdlet
RELATED LINKS