Hi folks.
I've tried finding a solution for this on these forums, but as yet can't get any. I'm trying to run commands such as the following from my Zabbix server to several remote agents, but they bomb out each time, as they appear to be receiving the incorrect number of parameters (All I want to do is replace any instances of "adam" with "adam,dave" for example in my group file):
[root@zbx2dal0 ~]# /sys_apps_01/zabbix/bin/zabbix_get -s 10.149.1.2 -k system.run["sed -i 's/adam/adam,dave/g' /etc/group","wait"];
ZBX_NOTSUPPORTED: Too many parameters.
If I try to escape the "," character, it still gives me the same results:
[root@zbx2dal0 ~]# /sys_apps_01/zabbix/bin/zabbix_get -s 10.149.1.2 -k system.run["sed -i 's/adam/adam\,dave/g' /etc/group","wait"];
ZBX_NOTSUPPORTED: Too many parameters.
Any idea how I can work around this, or am I missing something obvious in the above? It appears to me as though Zabbix is seeing the "," character and treating this as a parameter delimiter, as opposed to handling it an actual substitution string.
Thanks in advance,
M
P.S. I should have included that I am running Zabbix server 2.4.2 and remote agents are all version 2.4.3
I've tried finding a solution for this on these forums, but as yet can't get any. I'm trying to run commands such as the following from my Zabbix server to several remote agents, but they bomb out each time, as they appear to be receiving the incorrect number of parameters (All I want to do is replace any instances of "adam" with "adam,dave" for example in my group file):
[root@zbx2dal0 ~]# /sys_apps_01/zabbix/bin/zabbix_get -s 10.149.1.2 -k system.run["sed -i 's/adam/adam,dave/g' /etc/group","wait"];
ZBX_NOTSUPPORTED: Too many parameters.
If I try to escape the "," character, it still gives me the same results:
[root@zbx2dal0 ~]# /sys_apps_01/zabbix/bin/zabbix_get -s 10.149.1.2 -k system.run["sed -i 's/adam/adam\,dave/g' /etc/group","wait"];
ZBX_NOTSUPPORTED: Too many parameters.
Any idea how I can work around this, or am I missing something obvious in the above? It appears to me as though Zabbix is seeing the "," character and treating this as a parameter delimiter, as opposed to handling it an actual substitution string.
Thanks in advance,
M
P.S. I should have included that I am running Zabbix server 2.4.2 and remote agents are all version 2.4.3
Comment