< Back

Set-ZabbixHttpTest

Sun Jan 19, 2020 6:14 pm

NAME Set-ZabbixHttpTest



SYNOPSIS

Set/Update web/http test





SYNTAX

Set-ZabbixHttpTest [[-HttpTestID] <Object>] [[-HttpTestName] <Object>] [[-HttpTestStepURL] <Object>] [[-HostID]

<Object>] [[-HttpTestStepName] <Object>] [[-HttpTestStepRequired] <Object>] [[-delay] <Object>] [[-retries]

<Object>] [[-status] <Object>] [[-timeout] <Object>] [-UpdateSteps] [[-jsonrpc] <String>] [[-session] <String>]

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





DESCRIPTION

Set/Update web/http test





PARAMETERS

-HttpTestID <Object>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-HttpTestName <Object>

web/http test name



Required? false

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-HttpTestStepURL <Object>



Required? false

Position? 3

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-HostID <Object>



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-HttpTestStepName <Object>



Required? false

Position? 5

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-HttpTestStepRequired <Object>



Required? false

Position? 6

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-delay <Object>



Required? false

Position? 7

Default value 60

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-retries <Object>



Required? false

Position? 8

Default value 1

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-status <Object>



Required? false

Position? 9

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-timeout <Object>



Required? false

Position? 10

Default value 15

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-UpdateSteps [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-jsonrpc <String>



Required? false

Position? 11

Default value ($global:zabSessionParams.jsonrpc)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-session <String>



Required? false

Position? 12

Default value ($global:zabSessionParams.session)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-id <String>



Required? false

Position? 13

Default value ($global:zabSessionParams.id)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-URL <String>



Required? false

Position? 14

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:\\>Set-ZabbixHttpTest -HttpTestID (Get-ZabbixHttpTest -HttpTestName TestOldName ).httptestid -HttpTestName

"testNewName" -status 0



Enable (-status 0) web/http test and rename it (case sensitive)









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



PS C:\\>Get-ZabbixHttpTest -HttpTestName httpTest | Set-ZabbixHttpTest -status 1



Disable web/http test (-status 1)









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



PS C:\\>Set-ZabbixHttpTest -HttpTestID (Get-ZabbixHttpTest -HttpTestName testName).httptestid -UpdateSteps

-HttpTestStepName (Get-ZabbixHttpTest -HttpTestName testName).steps.name -HttpTestStepURL (Get-ZabbixHttpTest

-HttpTestName SourceHttpTestName).steps.url



Replace test steps' URL by other URL, taken from "othertest"









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



PS C:\\>Set-ZabbixHttpTest -HttpTestID (Get-ZabbixHttpTest | ? name -like "test*Name" | ? {$_.hosts.host -match

"Template"}).httptestid -UpdateSteps -HttpTestStepName "NewTestName" -HttpTestStepURL

"http://10.20.10.10:30555/health-check/do"



Edit web/http test, update name and test url











RELATED LINKS