pavelnemirovsky / zabbix-redis-template

Multi Instance Redis Discovery Template for Zabbix
MIT License
44 stars 26 forks source link

Can't get it work. Please help! #10

Closed igorppp closed 5 years ago

igorppp commented 6 years ago

Hello, Pavel!

If it's possible, please help! Seems like i did something wrong, or didn't understand something.

I set all userparametrs directly in /opt/zabbix/etc/zabbix_agentd.conf. Path to script is set here UserParameter=redis.discovery[*], /opt/zabbix/etc/scripts/zbx_redis_discovery.sh $1 $2

I edited /opt/zabbix/etc/scripts/zbx_redis_discovery.sh to specify redis location: REDIS_CLI_DEFAULT_PATH="/opt/redis/bin/redis-cli"

When i run zbx_redis_discovery.sh general debug, few files redis-127.0.0.1-6379* in /tmp are created with root privileges. After this i can request some information with ./opt/zabbix/sbin/zabbix_agentd -t redis.stat.get[expired_keys,127.0.0.1,6379] redis.stat.get[expired_keys,127.0.0.1,6379] [t|29562818] And remotely the same.

But i get, only what is in redis-127.0.0.1-6379 file (so it's not in realtime)

chown zabbix.zabbix redis-127.0.0.1* didn't help.

I imported template in gui, but it show Timeout while executing a shell script.

Here's resutl of zbx_redis_discovery.sh general debug

`+ '[' -e /tmp/redis-cli ']' ++ cat /tmp/redis-cli

igorppp commented 5 years ago

Using CentOS it seems like everything is working. Possibly it was Slackware problem, or i did something wrong.