-
Change Request
-
Resolution: Duplicate
-
Trivial
-
None
-
2.0.8, 2.1.5
Try to guess why next will work:
UserParameter=awk,df -P '/boot' | egrep -A1 '^/' | awk '{s=substr($5,1,length($5)-1);print s}' # zabbix_get -s localhost -k awk
or also will work:
# zabbix_get -s localhost -k system.run["df -P '/boot' | egrep -A1 '^/' | awk '{s=3;print s}'"]
And next will NOT work:
# zabbix_get -s localhost -k system.run["df -P '/boot' | egrep -A1 '^/' | awk '{s=substr($5,1,length($5)-1);print s}'"]
We can help users to identify reason of the problem if we will print additional message to debuglog.
Now for the zabbix_get attempt above it looks like:
24323:20130926:094915.739 Requested [system.run[df -P '/boot' | egrep -A1 '^/' | awk '{s=length($5,1,2);print s}']] 24323:20130926:094915.739 Sending back [ZBX_NOTSUPPORTED]
and would be good to see something like:
24323:20130926:094915.739 Requested [system.run[df -P '/boot' | egrep -A1 '^/' | awk '{s=length($5,1,2);print s}']] 24323:20130926:094915.739 ERROR: number of the key parameters is more than allowed 24323:20130926:094915.739 Sending back [ZBX_NOTSUPPORTED]
It will require to alter all code entries like:
if (num_param(param) > 2) return SYSINFO_RET_FAIL;
Also we could add similar log records for missing (or empty) required key parameters.
Such checks located below the number of key parameters check in the code.
This error log could be:
24323:20130926:094915.739 ERROR: missing required key parameters
- duplicates
-
ZBXNEXT-2203 Zabbix should provide detailed information why item is not supported by the agent
- Closed