Ad Widget

Collapse

Discussion thread for official Zabbix Template Redis

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AlexL
    Zabbix Certified Specialist
    Zabbix Certified Specialist
    • Aug 2019
    • 55

    #1

    Discussion thread for official Zabbix Template Redis

    This thread is designed to provide grounds for discussion of the official Zabbix Template for Redis.
    The template and details of the template is available in GIT repository: https://git.zabbix.com/projects/ZBX/...lates/db/redis

    Please note that this template requires Agent2 with compiled with Redis support. ( https://git.zabbix.com/projects/ZBX/.../plugins/redis )
    To learn about Agent2 please see the documentation: https://www.zabbix.com/documentation...oncepts/agent2
    Additional videos describing Agent2 are available on YouTube: https://www.youtube.com/watch?v=OWj2pk_I-rI


    Zabbix is always looking for ways to improve our services and to make our users happier.
    We pride ourselves on doing our best each and every day, but we know that there is always something more to learn.
    We would like to hear back from you to know what have you liked and what would you improve in the template.
    Last edited by AlexL; 17-04-2020, 11:44.
  • jmrice
    Member
    • Aug 2019
    • 33

    #2
    I imported the Redis template at: https://git.zabbix.com/projects/ZBX/...e_db_redis.xml
    I am getting "Unsupported item key." for the following checks:
    Template DB Redis: Redis: Ping redis.ping["{$REDIS.CONN.URI}"]
    Template DB Redis: Redis: Slowlog entries per second redis.slowlog.count["{$REDIS.CONN.URI}"]

    The macro setting for {$REDIS.CONN.URI} tcp://localhost:6379

    What am I missing?

    Comment

    • jmrice
      Member
      • Aug 2019
      • 33

      #3
      ok, so I need zabbix_agent2. We are currently running 4.4.7. Can the zabbix_agent2 be installed using this version of the server? Or will it need to wait until 5.0?

      Comment

      • AlexL
        Zabbix Certified Specialist
        Zabbix Certified Specialist
        • Aug 2019
        • 55

        #4
        Originally posted by jmrice
        ok, so I need zabbix_agent2. We are currently running 4.4.7. Can the zabbix_agent2 be installed using this version of the server? Or will it need to wait until 5.0?
        The Zabbix agent2 can be installed with 4.4.7.
        Warm Regards,
        Alex

        Comment

        • jmrice
          Member
          • Aug 2019
          • 33

          #5
          From what I had read, zabbix_agent2 is still experimental and may be included in server version 5.0. Maybe this has changed.
          How do I download and install just the zabbix_agent2 ?

          In the mean time, I went through the gyrations of implementing the solution here: https://github.com/cloudtemple/zabbi...r/zabbix_redis
          It includes a custom template, a config file, and a python script. I got it to work, but it was non trivial.

          Comment

          • FelipeVieira
            Junior Member
            • Mar 2014
            • 21

            #6
            I found an error in the expression:
            Redis: Memory usage is too high (over {$REDIS.MEM.PUSED.MAX.WARN}% in 5m) - {TEMPLATE_NAME:redis.memory.maxmemory[{#SINGLETON}].min(5m)}/{Template DB Redis:redis.memory.used_memory.last()}*100>{$REDIS .MEM.PUSED.MAX.WARN} WARNING
            It is using a formula max / used . The correct formula is used / max .

            {Template DB Redis:redis.memory.used_memory.min(5m)}/{Template DB Redis:redis.memory.maxmemory[{#SINGLETON}].last()}*100>{$REDIS.MEM.PUSED.MAX.WARN}
            Last edited by FelipeVieira; 15-05-2020, 17:38.

            Comment

            • altuhovsu
              Junior Member
              • Jun 2020
              • 6

              #7
              Hello! I installed zabbix_agent2 5.0.1, added to config 2 instances of the redis:
              Code:
              Plugins.Redis.Sessions.Redis6399.Uri=tcp://127.0.0.1:6399
              Plugins.Redis.Sessions.Redis6399.Password=pass
              Plugins.Redis.Sessions.Redis6398.Uri=tcp://127.0.0.1:6398
              Plugins.Redis.Sessions.Redis6398.Password=pass
              If I specify macros {$REDIS.CONN.URI} = Redis6399 , than it works, but only for 1 instance. If specify Redis6399, Redis6398 (like for template_db_mysql_agent2) I get an error (wrong session).
              How template_db_mysql_agent2 works with multiple instances/sessions?

              Comment

              • mikelog
                Junior Member
                • Jul 2017
                • 1

                #8
                Does this template works without zabbix_agent2 ?

                Comment

                • jmrice
                  Member
                  • Aug 2019
                  • 33

                  #9
                  Preprocessing failed for: {"error":"Object Not Found","reason":"Not Found"}
                  1. Failed: cannot extract value from json by path "$.disk_free": no data matches the specified path

                  zabbix_get -s rabbitmq1 -p 10050 -k rabbitmq.node.disk_free
                  ZBX_NOTSUPPORTED: Unsupported item key.

                  According to the docs, Preprocessing:
                  - JSONPATH: $.disk_free

                  is correct. What am I missing?

                  Comment

                  • altuhovsu
                    Junior Member
                    • Jun 2020
                    • 6

                    #10
                    Originally posted by mikelog
                    Does this template works without zabbix_agent2 ?
                    No, it is using redis plugin in the zabbix_agent2.

                    Comment

                    • Denikin80
                      Junior Member
                      • Jun 2020
                      • 5

                      #11
                      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.

                      So i edit config
                      Code:
                      /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

                      • siljathomas
                        Junior Member
                        • Jul 2020
                        • 1

                        #12
                        I went by requesting the solution, It includes a custom template, the file configuration and the Snake script I worked on, but not much.

                        Comment

                        • mtlalka
                          Junior Member
                          • Jul 2020
                          • 1

                          #13
                          Hello,

                          I have a question.

                          Is there any option to change the command that is executed for item redis.config["{$REDIS.CONN.URI}","{$REDIS.PASS}"] ?

                          I didn't find anything about this in docs.

                          Because in my environment config is renamed :

                          redis.conf
                          ...
                          rename-command CONFIG blebleble
                          ...

                          and because of this this item is unsuported with this in debug log :

                          zabbix_agent2.log
                          ...
                          executing direct exporter task for key 'redis.config["tcp://localhost:6379","blebleble"]
                          [Redis] ERR unknown command `CONFIG`, with args beginning with: `GET`, `*`, (Cannot fetch data.)
                          ...


                          Comment

                          • dbfontes
                            Junior Member
                            • Sep 2020
                            • 1

                            #14
                            Originally posted by altuhovsu
                            Hello! I installed zabbix_agent2 5.0.1, added to config 2 instances of the redis:
                            Code:
                            Plugins.Redis.Sessions.Redis6399.Uri=tcp://127.0.0.1:6399
                            Plugins.Redis.Sessions.Redis6399.Password=pass
                            Plugins.Redis.Sessions.Redis6398.Uri=tcp://127.0.0.1:6398
                            Plugins.Redis.Sessions.Redis6398.Password=pass
                            If I specify macros {$REDIS.CONN.URI} = Redis6399 , than it works, but only for 1 instance. If specify Redis6399, Redis6398 (like for template_db_mysql_agent2) I get an error (wrong session).
                            How template_db_mysql_agent2 works with multiple instances/sessions?
                            I have the same problem, how should we monitor multiple instances?

                            Comment

                            • RFriberg
                              Junior Member
                              • Sep 2020
                              • 1

                              #15
                              Originally posted by dbfontes

                              I have the same problem, how should we monitor multiple instances?
                              Same problem here. Would be nice with support for multiple instances.

                              Comment

                              Working...