Get‐OPNsenseSystemHealth - fvanroie/PS_OPNsense GitHub Wiki
Retrieve system health data from OPNsense
Get-OPNsenseSystemHealth -Packets -Interface <String> [-From <DateTime>] `
[-To <DateTime>] [-Resolution <String>] [-Zoomlevel <String>] `
[-Inverse] [<CommonParameters>]Get-OPNsenseSystemHealth -Traffic -Interface <String> [-From <DateTime>] `
[-To <DateTime>] [-Resolution <String>] [-Zoomlevel <String>] `
[-Inverse] [<CommonParameters>]Get-OPNsenseSystemHealth -System -Resource <String> [-From <DateTime>] `
[-To <DateTime>] [-Resolution <String>] [-Zoomlevel <String>] `
[-Inverse] [<CommonParameters>]Use the Get-OPNsenseSystemHealth cmdlet to retrieve statistics about the OPNsense system health. There first switch determines the type of data returned and can be one of { Packets | System | Traffic } For Packet and Traffic statistics you need to specify the interface for which to return the data. For System statistics you need to specify the resource for which to return the data.
Use the Get-OPNsenseInterface cmdlet to retrieve a list of the available interfaces you can query. Use the Get-OPNsenseSystemResource cmdlet to retrieve a list of the available resources you can query.
The other parameters are optial and common to all commands. They specify the start and end date and resolution and zoomlevel of the data.
By default all data is shown as positive numbers. Use the Inverse switch to present outgoing interface packets or traffic values as negative numbers.
-Packets <SwitchParameter>
Return packet statistics
| Required? | true |
| Position? | named |
| Default Value? | |
| Pipeline Input? | false |
-Interface <String>
The interface for which to return packet or trafic information
| Required? | true |
| Position? | named |
| Default Value? | |
| Pipeline Input? | false |
-From <DateTime>
Not implemented
| Required? | false |
| Position? | named |
| Default Value? | |
| Pipeline Input? | false |
-To <DateTime>
Not implemented
| Required? | false |
| Position? | named |
| Default Value? | |
| Pipeline Input? | false |
-Resolution <String>
| Required? | false |
| Position? | named |
| Default Value? | Standard |
| Pipeline Input? | false |
-Zoomlevel <String>
| Required? | false |
| Position? | named |
| Default Value? | 20 Hours |
| Pipeline Input? | false |
-Inverse <SwitchParameter>
Present outgoing interface packets or traffic values as negative numbers
| Required? | false |
| Position? | named |
| Default Value? | false |
| Pipeline Input? | false |
-Traffic <SwitchParameter>
Return traffic statistics
| Required? | true |
| Position? | named |
| Default Value? | |
| Pipeline Input? | false |
-System <SwitchParameter>
Return system statistics
| Required? | true |
| Position? | named |
| Default Value? | |
| Pipeline Input? | false |
-Resource <String>
The resource for which to return system information
| Required? | true |
| Position? | named |
| Default Value? | |
| Pipeline Input? | false |
Get-OPNsenseSystemHealth -Packets -Interface 'lan'Get-OPNsenseSystemHealth -System -Resource 'memory' -VerboseGet-OPNsenseSystemHealth -Traffic -Interface 'wan' -Inverse