cuimingkun / zbx_tem_redis

33 stars 34 forks source link

Item Preprocessing failures #3

Closed ang3lwitch closed 6 years ago

ang3lwitch commented 6 years ago

I am getting tons of prprocessing step failures that I am not understanding how to resolve.

image

If i run the basic command from the userparameter_redis_lld.conf, i do get something as a test.

ss -4lp|grep redis-server|awk -F':' '{print $2}'|awk '{print $1}'| awk NF|while read line; do role=(echo info ; sleep 0.1)|telnet 192.168.63.61 $line 2>/dev/null|grep 'role:slave'|awk -F ':' '{print $2}';if [ "$role" == "slave" ] ;then echo "SLAVE:$line"|sed -e s/^/'{"{#REDIS_PORT_'/g -e s/'$'/'"},'/g -e s/':'/'}": "'/g ; fi;done| tr -d \\n | sed -e s/^/'{"data":['/g -e s/',$'/]}/g

result below

{"data":[{"{#REDIS_PORT_SLAVE}": "vcom-tunnel"}]}

cuimingkun commented 6 years ago

You need to split the command into execution.Troubleshooting problems.

ang3lwitch commented 6 years ago

Well, I am not entirely sure what I did other than re-apply userparameter file and template again

It works! yay!

Thanks, i really enjoy easy userparameter files and templates.