< Back

New-ZabbixTrigger

Sun Jan 19, 2020 6:12 pm

NAME New-ZabbixTrigger



SYNOPSIS

Create new trigger settings





SYNTAX

New-ZabbixTrigger [[-TriggerDescription] <Object>] [[-TriggerExpression] <Object>] [[-status] <Object>]

[[-TemplateID] <Array>] [[-triggertags] <Array>] [[-dependencies] <Array>] [[-jsonrpc] <String>] [[-session]

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





DESCRIPTION

Create new trigger settings





PARAMETERS

-TriggerDescription <Object>

[Parameter(ValueFromPipelineByPropertyName=$true)]$TriggerID,



Required? false

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-TriggerExpression <Object>



Required? false

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-status <Object>



Required? false

Position? 3

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-TemplateID <Array>



Required? false

Position? 4

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-triggertags <Array>



Required? false

Position? 5

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-dependencies <Array>



Required? false

Position? 6

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-jsonrpc <String>



Required? false

Position? 7

Default value ($global:zabSessionParams.jsonrpc)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-session <String>



Required? false

Position? 8

Default value ($global:zabSessionParams.session)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-id <String>



Required? false

Position? 9

Default value ($global:zabSessionParams.id)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-URL <String>



Required? false

Position? 10

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-ZabbixHost -HostName HostName | Get-ZabbixTrigger -ea silent | ? status -match 0 | ? expression -match

"V:,pfree" | Set-ZabbixTrigger -status 1 -Verbose



Disable trigger









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



PS C:\\>Get-ZabbixTrigger -TemplateID (Get-zabbixTemplate | ? name -match "Template Name").templateid | ?

description -match "trigger description" | Set-ZabbixTrigger -status 1



Disable trigger









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-ZabbixHost | ? name -match server0[1-5,7] | Get-ZabbixTrigger -ea silent | ? status -match 0 | ?

expression -match "uptime" | select triggerid,expression,status | Set-ZabbixTrigger -status 1



Disable trigger on multiple hosts









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Get-ZabbixTemplate | ? name -match "Template" | Get-ZabbixTrigger | ? description -match triggerDescription

| Set-ZabbixTrigger -status 0



Enable trigger











RELATED LINKS