I have the Redis by Agent 2 Template installed on my server. The majority of items work, but my Redis boxes have multiple instances of
I have a UserParameter for LLD Discovery configured and linked to a shell script:
This gives the following output:
This has succeeded in correctly detecting the environments and populating some additional items, but most of the item values are missing:

I can't find any trace of an error or related log activity on either client or server.
I've looked through the docs and played around with some LLD and non-LLD MACROs for the hosts, but nothing seems to make a difference.
The majority of the server data that is being returned looks to be being provided via the first (qa01) instances of Redis, via the following MACRO, but I can't find an obvious way to add an additional one:
Is anybody able to advise where I'm going wrong?
Thanks.
I have a UserParameter for LLD Discovery configured and linked to a shell script:
Code:
UserParameter=redis.discovery[*],/etc/zabbix/scripts/discovery_redis.sh
#!/bin/bash
redisconf=$(ls /etc/redis/redis*.conf)
first=1
echo '{
"data":['
for redis in $redisconf
do
if (( $first != 1))
then
echo ","
fi
name=$(basename $redis|sed 's/.conf//g')
port=$(grep port $redis|cut -f2 -d\ )
echo -n "{ \"{#REDISNAME}\":\"$name\", \"{#REDISPORT}\":\"$port\" }"
first=0
done
echo ']
}'
Code:
[root@whsnprdred01 zabbix]# /etc/zabbix/scripts/discovery_redis.sh
{
"data":[
{ "{#REDISNAME}":"redis-qa01", "{#REDISPORT}":"6379" },
{ "{#REDISNAME}":"redis-stg", "{#REDISPORT}":"6380" }]
}
I've looked through the docs and played around with some LLD and non-LLD MACROs for the hosts, but nothing seems to make a difference.
The majority of the server data that is being returned looks to be being provided via the first (qa01) instances of Redis, via the following MACRO, but I can't find an obvious way to add an additional one:
Code:
{$REDIS.CONN.URI} tcp://localhost:6379
Thanks.
Comment