Our server (1.8.1) is configured to run remote commands whenever a Trigger with level "Disaster" occurs. The remote command is a shell script that takes Zabbix macros as arguments. The problem is that when one or more of the Macros contains a special character the agent responds "[ZBX_NOTSUPPORTED]". More specifically, the forward slash in my situation.
The remote command:
srv61:/zabbix/scripts/service_now/create_ticket-page.sh '{HOSTNAME}' '{TRIGGER.SEVERITY}' '{TRIGGER.KEY}' '{TRIGGER.NAME}' '{DATE}' '{EVENT.ID}' '{STATUS}' '{TRIGGER.ID}' '{TRIGGER.VALUE}'
...which translates to this when run:
Requested [system.run[/zabbix/scripts/service_now/create_ticket-page.sh 'srv33' 'Disaster' 'vfs.fs.size[/,pfree]' 'TESTING Low free disk space on cmssrv33 volume /' '2012.02.21' '65000074' 'PROBLEM' '257899' '1',nowait]]
15480:20120221:121133.228 Sending back [ZBX_NOTSUPPORTED]
Other "Disasters" work fine:
21413:20120221:133044.441 Requested [system.run[/zabbix/scripts/service_now/create_ticket-page.sh 'srv113' 'Disaster' 'status' 'Server srv113 is unreachable' '2012.02.21' '65000478' 'PROBLEM' '163904' '1',nowait]]
21413:20120221:133044.441 Executing command '/zabbix/scripts/service_now/create_ticket-page.sh 'srv113' 'Disaster' 'status' 'Server srv113 is unreachable' '2012.02.21' '65000478' 'PROBLEM' '163904' '1''
21413:20120221:133044.441 Sending back [1]
I've read about special character functionality being removed from earlier clients so I update the client to 1.8.8 and also tried adding "UnsafeUserParameters=1" to the agent configuration. Nothing worked.
Anyway to escape Zabbix Macros?
The remote command:
srv61:/zabbix/scripts/service_now/create_ticket-page.sh '{HOSTNAME}' '{TRIGGER.SEVERITY}' '{TRIGGER.KEY}' '{TRIGGER.NAME}' '{DATE}' '{EVENT.ID}' '{STATUS}' '{TRIGGER.ID}' '{TRIGGER.VALUE}'
...which translates to this when run:
Requested [system.run[/zabbix/scripts/service_now/create_ticket-page.sh 'srv33' 'Disaster' 'vfs.fs.size[/,pfree]' 'TESTING Low free disk space on cmssrv33 volume /' '2012.02.21' '65000074' 'PROBLEM' '257899' '1',nowait]]
15480:20120221:121133.228 Sending back [ZBX_NOTSUPPORTED]
Other "Disasters" work fine:
21413:20120221:133044.441 Requested [system.run[/zabbix/scripts/service_now/create_ticket-page.sh 'srv113' 'Disaster' 'status' 'Server srv113 is unreachable' '2012.02.21' '65000478' 'PROBLEM' '163904' '1',nowait]]
21413:20120221:133044.441 Executing command '/zabbix/scripts/service_now/create_ticket-page.sh 'srv113' 'Disaster' 'status' 'Server srv113 is unreachable' '2012.02.21' '65000478' 'PROBLEM' '163904' '1''
21413:20120221:133044.441 Sending back [1]
I've read about special character functionality being removed from earlier clients so I update the client to 1.8.8 and also tried adding "UnsafeUserParameters=1" to the agent configuration. Nothing worked.
Anyway to escape Zabbix Macros?
Comment