zabbix-cli icon indicating copy to clipboard operation
zabbix-cli copied to clipboard

Examples needed

Open moridius opened this issue 4 years ago • 1 comments

I'm trying to move a host to maintenance mode but I'm struggling with the syntax. The documentation names the parameters, which is great, but it doesn't show how to pass them over (at least I didn't find it). I tried this: zabbix-cli -C "create_maintenance_definition \"'name':'a','description':'b','host':'c','time period':'30 minutes','maintenance type':'0'\""

Result: [Error]: Wrong number of parameters used. Type help or \? to list commands

moridius avatar Jun 01 '20 16:06 moridius

ROFL.

Oh my god. The docs must be really bad. I came up with something completely different. At one point I starting going down the road you did but reversed course because I was getting ...Wrong number of parameters....

# zabbix-cli -C "create_maintenance_definition sfdame mdesc zinc 1h 0"

[Error]: Problems creating maintenance definition (sfdame)

EDIT I did some googling and found some working examples...

create_maintenance_definition sfdame mdesc zinc  '2018-04-23T12:00 to 2018-04-23T13:00' 1

create_maintenance_definition sfdadme mdesc zinc  '1 hour' 1

zabbix-cli -C "create_maintenance_definition '' 'Testing maintenance' 'zabbix-mgmt.uio.no' '3 hours'"

bbrendon avatar Aug 07 '20 20:08 bbrendon