< Back
Save-ZabbixGraph
Post
NAME Save-ZabbixGraph
SYNOPSIS
Save graph
SYNTAX
Save-ZabbixGraph [-GraphID] <String> [[-fileFullPath] <String>] [[-sTime] <String>] [[-Period] <String>] [[-Width]
<String>] [[-Hight] <String>] [-show] [-mail] [[-SMTPServer] <String>] [[-to] <String[]>] [[-from] <String>]
[[-subject] <String>] [[-priority] <String>] [[-body] <String>] [<CommonParameters>]
DESCRIPTION
Save graph
PARAMETERS
-GraphID <String>
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-fileFullPath <String>
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-sTime <String>
Required? false
Position? 3
Default value (convertTo-epoch ((get-date).addmonths(-1)).ToUniversalTime())
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Period <String>
Required? false
Position? 4
Default value (convertTo-epoch ((get-date).addhours(0)).ToUniversalTime())-$sTime
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Width <String>
Required? false
Position? 5
Default value 900
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Hight <String>
Required? false
Position? 6
Default value 200
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-show [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-mail [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-SMTPServer <String>
Required? false
Position? 7
Default value
Accept pipeline input? false
Accept wildcard characters? false
-to <String[]>
Required? false
Position? 8
Default value
Accept pipeline input? false
Accept wildcard characters? false
-from <String>
Required? false
Position? 9
Default value
Accept pipeline input? false
Accept wildcard characters? false
-subject <String>
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-priority <String>
Required? false
Position? 11
Default value
Accept pipeline input? false
Accept wildcard characters? false
-body <String>
Required? false
Position? 12
Default value
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:\\>Get-ZabbixHost | ? name -eq "singleHost" | Get-ZabbixGraph | ? name -match 'CPU utilization' |
Save-ZabbixGraph -verbose
Save single graph (default location: $env:TEMP\\psbbix)
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixHost | ? name -eq "singleHost" | Get-ZabbixGraph | ? name -match 'CPU utilization' |
Save-ZabbixGraph -sTime (convertTo-epoch (get-date).AddMonths(-3)) -fileFullPath $env:TEMP\\psbbix\\graphName.png
-show
Save single graph and show it
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixHost | ? name -eq "singleHost" | Get-ZabbixGraph | ? name -eq 'RAM utilization (%)' |
Save-ZabbixGraph -sTime (convertto-epoch (get-date -date "05/25/2015 00:00").ToUniversalTime()) -show
Save single graph, time sent as UTC, and will appear as local Zabbix server time
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>(Get-ZabbixHost | ? name -eq "singleHost" | Get-ZabbixGraph | ? name -match 'RAM utilization | CPU
utilization').graphid | %{Save-ZabbixGraph -GraphID $_ -sTime (convertto-epoch (get-date -date "05/25/2015
00:00")) -fileFullPath $env:TEMP\\psbbix\\graphid-$_.png -show}
Save and show graphs for single host
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>(Get-ZabbixGraph -HostID (Get-ZabbixHost | ? name -match "multipleHosts").hostid | ? name -match 'RAM
utilization | CPU utilization').graphid | %{Save-ZabbixGraph -GraphID $_ -sTime (convertto-epoch (get-date -date
"05/25/2015 00:00")) -verbose -show}
Save multiple graphs for multiple hosts
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>(Get-ZabbixGraph -HostID (Get-ZabbixHost | ? name -match "multipleHosts").hostid | ? name -match 'RAM
utilization | CPU utilization').graphid | %{Save-ZabbixGraph -GraphID $_ -sTime (convertto-epoch (get-date -date
"05/25/2015 00:00")) -show -mail -from "zabbix@domain.com" -to first.last@mail.com -smtpserver 10.10.20.10
-priority High}
Save and send by email multiple graphs, for multiple hosts
RELATED LINKS
SYNOPSIS
Save graph
SYNTAX
Save-ZabbixGraph [-GraphID] <String> [[-fileFullPath] <String>] [[-sTime] <String>] [[-Period] <String>] [[-Width]
<String>] [[-Hight] <String>] [-show] [-mail] [[-SMTPServer] <String>] [[-to] <String[]>] [[-from] <String>]
[[-subject] <String>] [[-priority] <String>] [[-body] <String>] [<CommonParameters>]
DESCRIPTION
Save graph
PARAMETERS
-GraphID <String>
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-fileFullPath <String>
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-sTime <String>
Required? false
Position? 3
Default value (convertTo-epoch ((get-date).addmonths(-1)).ToUniversalTime())
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Period <String>
Required? false
Position? 4
Default value (convertTo-epoch ((get-date).addhours(0)).ToUniversalTime())-$sTime
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Width <String>
Required? false
Position? 5
Default value 900
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Hight <String>
Required? false
Position? 6
Default value 200
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-show [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-mail [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-SMTPServer <String>
Required? false
Position? 7
Default value
Accept pipeline input? false
Accept wildcard characters? false
-to <String[]>
Required? false
Position? 8
Default value
Accept pipeline input? false
Accept wildcard characters? false
-from <String>
Required? false
Position? 9
Default value
Accept pipeline input? false
Accept wildcard characters? false
-subject <String>
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-priority <String>
Required? false
Position? 11
Default value
Accept pipeline input? false
Accept wildcard characters? false
-body <String>
Required? false
Position? 12
Default value
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:\\>Get-ZabbixHost | ? name -eq "singleHost" | Get-ZabbixGraph | ? name -match 'CPU utilization' |
Save-ZabbixGraph -verbose
Save single graph (default location: $env:TEMP\\psbbix)
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixHost | ? name -eq "singleHost" | Get-ZabbixGraph | ? name -match 'CPU utilization' |
Save-ZabbixGraph -sTime (convertTo-epoch (get-date).AddMonths(-3)) -fileFullPath $env:TEMP\\psbbix\\graphName.png
-show
Save single graph and show it
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixHost | ? name -eq "singleHost" | Get-ZabbixGraph | ? name -eq 'RAM utilization (%)' |
Save-ZabbixGraph -sTime (convertto-epoch (get-date -date "05/25/2015 00:00").ToUniversalTime()) -show
Save single graph, time sent as UTC, and will appear as local Zabbix server time
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>(Get-ZabbixHost | ? name -eq "singleHost" | Get-ZabbixGraph | ? name -match 'RAM utilization | CPU
utilization').graphid | %{Save-ZabbixGraph -GraphID $_ -sTime (convertto-epoch (get-date -date "05/25/2015
00:00")) -fileFullPath $env:TEMP\\psbbix\\graphid-$_.png -show}
Save and show graphs for single host
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>(Get-ZabbixGraph -HostID (Get-ZabbixHost | ? name -match "multipleHosts").hostid | ? name -match 'RAM
utilization | CPU utilization').graphid | %{Save-ZabbixGraph -GraphID $_ -sTime (convertto-epoch (get-date -date
"05/25/2015 00:00")) -verbose -show}
Save multiple graphs for multiple hosts
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>(Get-ZabbixGraph -HostID (Get-ZabbixHost | ? name -match "multipleHosts").hostid | ? name -match 'RAM
utilization | CPU utilization').graphid | %{Save-ZabbixGraph -GraphID $_ -sTime (convertto-epoch (get-date -date
"05/25/2015 00:00")) -show -mail -from "zabbix@domain.com" -to first.last@mail.com -smtpserver 10.10.20.10
-priority High}
Save and send by email multiple graphs, for multiple hosts
RELATED LINKS