-
Notifications
You must be signed in to change notification settings - Fork 4
Get UnifiHourlySiteStats
external help file: UniFiTooling-help.xml HelpVersion: 1.1.0 Locale: en-US Module Guid: 7fff91a0-02eb-4df2-84d5-c7d3cd7f7a5d Module Name: UniFiTooling online version: https://github.com/Enatec/UniFiTooling/raw/master/docs/Get-UnifiHourlySiteStats.md schema: 2.0.0
Get horly statistics for a complete Site
Get-UnifiHourlySiteStats [[-UnifiSite] <String>] [[-Start] <String>] [[-End] <String>]
[[-Attributes] <String[]>] [<CommonParameters>]
Get horly statistics for a complete UniFi Site
For convenience, we return the a bit more then the API, e.g. everything in KB, MB, GB, and TB instead of just bytes
We also return real timestamps instead of the unix timestaps in miliseconds that the UniFi returns
Sample output: Time : 1/28/2019 8:00:00 AM wan-tx_bytes : 15674710.4243137 wan-tx_kb : 15307.33 wan-tx_mb : 14.95 wan-tx_gb : 0.01 wan-rx_bytes : 74608528.2870588 wan-rx_kb : 72859.89 wan-rx_mb : 71.15 wan-rx_gb : 0.07 wan_bytes : 90283238.7113726 wan_kb : 88167.23 wan_mb : 86.1 wan_gb : 0.08 wlan_bytes : 73033651.4499586 wlan_kb : 71321.93 wlan_mb : 69.65 wlan_gb : 0.07 Clients : 35 LAN_Clients : 30 WLAN_Clients : 5
You might filter out all the 0 values, we keep them to prevent any null pointer expetions!
You can Filter for whatever parameter you like (e.g. with Select-Object)
Get-UnifiHourlySiteStats
Get horly statistics for a complete UniFi for the default site
(Get-UnifiHourlySiteStats -Start '1548971935421' -End '1548975579019')
Get horly statistics for a complete UniFi for the default site for a given time period.
(Get-UnifiHourlySiteStats -Start '1548980058135')
Get horly statistics for a complete UniFi for the default site for the last 60 minutes (was the timestamp while the sample was created)
(Get-UnifiHourlySiteStats -UnifiSite 'contoso')[-1]
Get horly statistics for a complete UniFi for the site 'contoso'
Get-UnifiHourlySiteStats -Attributes 'bytes','wan-tx_bytes','wan-rx_bytes','wlan_bytes','num_sta','lan-num_sta','wlan-num_sta')
Get all Values from the API
ID of the client-device to be modified
Type: String
Parameter Sets: (All)
Aliases: Site
Required: False
Position: 1
Default value: Default
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseStartpoint in UniFi Unix timestamp in milliseconds
Type: String
Parameter Sets: (All)
Aliases: Startpoint, StartTime
Required: False
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: FalseEndpoint in UniFi Unix timestamp in milliseconds
Type: String
Parameter Sets: (All)
Aliases: EndPoint, EndTime
Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: Falsearray containing attributes (strings) to be returned, defaults are all
Type: String[]
Parameter Sets: (All)
Aliases: attribs, UniFiAttributes
Required: False
Position: 4
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
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).
Defaults to the past day (24 hours)
"bytes" are no longer returned with controller version 4.9.1 and later