Ad Widget

Collapse

Zabbix official redis template does not pass password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Denikin80
    Junior Member
    • Jun 2020
    • 5

    #1

    Zabbix official redis template does not pass password

    Try using Template DB Redis https://git.zabbix.com/projects/ZBX/...lates/db/redis

    Zabbix version - 5.0.1
    redis 6.0.4

    The proplem is with template macros:
    {$REDIS.CONN.URI} Connection string in the URI format (password is not used). This param overwrites a value configured in the "Server" option of the configuration file (if it's set), otherwise, the plugin's default value is used: "tcp://localhost:6379" tcp://localhost:6379
    My Redis instance require password for auth clients, and so key data elements failed to get value - "NO AUTH (Authentication required)" error.

    I tried change macros to value like
    Code:
     tcp://:<password>@localhost:6379
    or
    Code:
    tcp://:<password>@localhost:6379/0
    but with no success.
  • Denikin80
    Junior Member
    • Jun 2020
    • 5

    #2
    So i edit config

    /etc/zabbix/zabbix_agent2.conf

    by adding two strings:

    Code:
    Plugins.Redis.Sessions.Redis1.Uri=tcp://localhost:6379
    Plugins.Redis.Sessions.Redis1.Password=password
    But with no luck - still the same error in data elements - "NO AUTH (Authentication required)"

    Comment

    • yzdann
      Junior Member
      • Aug 2020
      • 1

      #3
      Click image for larger version

Name:	session-config-in-zabbix-agent2-conf.png
Views:	4900
Size:	59.3 KB
ID:	407284
      First you should config Session Uri and Session Password in `/etc/zabbix/zabbix_agent2.conf
      (Replace `RedisServer1` with anything you want).

      Click image for larger version

Name:	macro-config-in-zabbix-panel.png
Views:	4816
Size:	20.0 KB
ID:	407285
      Then go to zabbix server and select Redis Template for your hosts.
      Before you update add new macro to host `{$REDIS.CONN.URI}` and if you set Session to `RedisServer1`set value to`RedisServer1` as well .

      Comment


      • Denikin80
        Denikin80 commented
        Editing a comment
        Thanks a lot!
    • Re5ident
      Junior Member
      • Apr 2025
      • 5

      #4
      Thanks a lot!)

      Comment

      • zabbix-peter
        Junior Member
        • Nov 2024
        • 12

        #5
        yzdann This fixed my issue , thank you very much.

        Comment

        Working...