< Back

Set-ZabbixEvent

Sun Jan 19, 2020 6:14 pm

NAME Set-ZabbixEvent



SYNOPSIS

Set events





SYNTAX

Set-ZabbixEvent [[-EventID] <Object>] [[-ackMessage] <Object>] [[-HostID] <Object>] [[-SortBy] <Array>]

[[-jsonrpc] <String>] [[-session] <String>] [[-id] <String>] [[-URL] <String>] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-EventID <Object>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-ackMessage <Object>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-HostID <Object>



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SortBy <Array>



Required? false

Position? 4

Default value clock

Accept pipeline input? false

Accept wildcard characters? false



-jsonrpc <String>



Required? false

Position? 5

Default value ($global:zabSessionParams.jsonrpc)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-session <String>



Required? false

Position? 6

Default value ($global:zabSessionParams.session)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-id <String>



Required? false

Position? 7

Default value ($global:zabSessionParams.id)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-URL <String>



Required? false

Position? 8

Default value ($global:zabSessionParams.url)

Accept pipeline input? true (ByPropertyName)

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-ZabbixEvent -EventID 445749 | Set-ZabbixEvent -ackMessage "TKT-2516: Resolved"



Acknowledge event









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-ZabbixEvent -TimeFrom (convertTo-epoch (get-date).addhours(-5)) -TimeTill (convertTo-epoch

(get-date).addhours(0)) | ? alerts | ? {$_.hosts.name -match "web" } | select eventid,@{n="Time

UTC+2";e={(convertfrom-epoch

$_.clock).addhours(2)}},@{n="Server";e={$_.hosts.name}},@{n="alerts";e={$_.alerts.subject[0]}} | Set-ZabbixEvent

-ackMessage TKT-2516: Resolved"



Acknowledge events for last 5 hours for servers match name "web"











RELATED LINKS