Hello any idea how to escape ',' for system.run item? It seems the command I need to run has a comma in it but zabbix interprets as second parameter. Error says invalid second parameter
system.run[powershell -c "(omreport storage controller | FINDSTR "Name").split(":").Replace(" ","") | FINDSTR /V "Name""]
Here is the command without escaping so you can read clearly: system.run[powershell -c "(omreport storage controller | FINDSTR "Name").split(":").Replace(" ","")"]
the comma is in Replace section
It seems zabbix thinks that ',' comma in the command is a mode
system.run[command,<mode>] that's the documentation https://www.zabbix.com/documentation...s/zabbix_agent
Also the square brackets don't work. If I try to add a item with square brackets then I can't add the item as frontend doesn't allow me to add the item.
Here is the command without escaping so you can read it clearly.
system.run[omreport storage controller | FINDSTR "Name").split(":")[1].replace(" ","")]
The fontend thinks square brackets are considered some kind of start and end block as a result it won't let me add the item.
Error:
Invalid key "system.run[omreport storage controller | FINDSTR "Name").split(":")[1].replace(" ","")] " for item "Raid Controller" on "Template OS Windows": incorrect syntax near ".replace(" ","")] ".
I tried single quote before the start and end of the command but that did not work either
system.run[powershell -c "(omreport storage controller | FINDSTR "Name").split(":").Replace(" ","") | FINDSTR /V "Name""]
Here is the command without escaping so you can read clearly: system.run[powershell -c "(omreport storage controller | FINDSTR "Name").split(":").Replace(" ","")"]
the comma is in Replace section
It seems zabbix thinks that ',' comma in the command is a mode
system.run[command,<mode>] that's the documentation https://www.zabbix.com/documentation...s/zabbix_agent
Also the square brackets don't work. If I try to add a item with square brackets then I can't add the item as frontend doesn't allow me to add the item.
Here is the command without escaping so you can read it clearly.
system.run[omreport storage controller | FINDSTR "Name").split(":")[1].replace(" ","")]
The fontend thinks square brackets are considered some kind of start and end block as a result it won't let me add the item.
Error:
Invalid key "system.run[omreport storage controller | FINDSTR "Name").split(":")[1].replace(" ","")] " for item "Raid Controller" on "Template OS Windows": incorrect syntax near ".replace(" ","")] ".
I tried single quote before the start and end of the command but that did not work either
Comment