Ad Widget

Collapse

Zabbix_get showing different value than latest data (Raw data)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mlrtime
    Junior Member
    • Aug 2019
    • 15

    #1

    Zabbix_get showing different value than latest data (Raw data)

    I have a host with about 747GB of Memory and around 476GB available. I understand how zabbix calculates available memory (https://www.zabbix.com/documentation...ry.size_params). I'm getting a completely different number in raw numbers than zabbix_get

    Example:
    # zabbix_get -s HOST -p 10050 -k "vm.memory.size[used]"
    476883517440

    Latest Data:
    Click image for larger version

Name:	Capture.PNG
Views:	525
Size:	45.1 KB
ID:	386604


    It looks to me as if the value is too large for the data type in the database

  • mlrtime
    Junior Member
    • Aug 2019
    • 15

    #2
    Bump, any ideas? Anyone know how I can get the query that this returns, should it be the exact value from zabbix_get?

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      I can't read the text on the attached image file, so I don't know what is different.
      Please tell me what OS you are using and what value you want to get. Depending on the OS being used, the size of the available memory can be checked using the following key.

      ex.
      vm.memory.size[available]

      Comment

      • mlrtime
        Junior Member
        • Aug 2019
        • 15

        #4
        Thank you for responding.

        Here is the value from zabbix_get
        Example:
        # zabbix_get -s HOST -p 10050 -k "vm.memory.size[used]"
        476883517440

        Here is the values I get in HOST->Items->Latest data->Memory (Available memory)->Graph->Values
        09/24/2019 07:34:21 AM 6596272128
        09/24/2019 07:33:21 AM 6580867072
        09/24/2019 07:32:21 AM 6586548224
        09/24/2019 07:31:22 AM 6585708544
        09/24/2019 07:30:21 AM 6586400768

        The values from zabbix_get are not the same as the data shown.

        HOST is Centos 7 3.10.0 kernel
        Zabbix is Centos 7.6 3.10.0 kernel

        I'd like to why there is a discrepancy between zabbix_get values and what I see in the UI

        Comment

        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #5
          I assume you are sure you are pointing zabbix_get exactly to the same agent that handles host in the graph?

          Comment

          • mlrtime
            Junior Member
            • Aug 2019
            • 15

            #6
            Yes, I double checked, I'm obscuring the hostname for simplicity. But yeah, I copy the hostname from the graph page to the zabbix_get and get different values. The graph is 'Memory (Available Memory)' and the get is vm.memory.size[available], I haven't changed the template.
            Last edited by mlrtime; 24-09-2019, 14:45.

            Comment

            • dimir
              Zabbix developer
              • Apr 2011
              • 1080

              #7
              Wait, but available and used are different things, right?

              Comment

              • mlrtime
                Junior Member
                • Aug 2019
                • 15

                #8
                Argh, typo in the post (doesn't help my case). Here are the values, wrong value for available in values from UI

                # zabbix_get -s HOST -p 10050 -k "vm.memory.size[available]"
                789995679744

                # zabbix_get -s HOST -p 10050 -k "vm.memory.size[used]"
                685048332288


                Available memory Values from UI
                09/24/2019 08:47:21 AM 6587539456
                09/24/2019 08:46:21 AM 6595207168
                It doesn't look like used memory is a item captured in the Template OS linux

                Comment

                • dimir
                  Zabbix developer
                  • Apr 2011
                  • 1080

                  #9
                  Just out of curiosity, what if you use zabbix_agentd binary on target host, instead of zabbix_get:
                  Code:
                  # sudo -u zabbix_agentd -t vm.memory.size[used]
                  # sudo -u zabbix_agentd -t vm.memory.size[available]
                  Last edited by dimir; 25-09-2019, 08:26.

                  Comment

                  • mlrtime
                    Junior Member
                    • Aug 2019
                    • 15

                    #10
                    Same values as zabbix_get

                    # zabbix_agentd -t vm.memory.size[available] ; zabbix_agentd -t vm.memory.size[used]
                    vm.memory.size[available] [u|792433606656]
                    vm.memory.size[used] [u|682677321728]

                    Comment

                    • dimir
                      Zabbix developer
                      • Apr 2011
                      • 1080

                      #11
                      Looks like some restrictions issue, is there anything like SELinux running on target host?

                      Comment

                      • mlrtime
                        Junior Member
                        • Aug 2019
                        • 15

                        #12
                        # getenforce
                        Disabled

                        On client and Zabbix Server

                        The values match on the server and the client, my guess is that the datatype in the db is wrong and truncating. How can I get the exact query that this page uses?

                        Comment

                        • dimir
                          Zabbix developer
                          • Apr 2011
                          • 1080

                          #13
                          The numbers that UI shows (e. g. 6587539456) would not fit into Integer, so I doubt it's a database issue. Could you run the zabbix_agentd -t commands with sudo -u zabbix as I specifically mentioned? This way we are sure the values are fetched by the same user as the agent is running as.

                          Comment

                          • DARKINATY
                            Junior Member
                            • Sep 2019
                            • 2

                            #14
                            Originally posted by mlrtime
                            Yes, I double checked, I'm obscuring the hostname for simplicity. But yeah, I copy the hostname from the graph page to the zabbix_get and get different values. The graph is 'Memory (Available Memory)' and the get is vm.memory.size[available], I haven't changed the template.

                            I assume you are sure you are pointing zabbix_get exactly to the same agent that handles host in the graph?

                            Comment

                            • mlrtime
                              Junior Member
                              • Aug 2019
                              • 15

                              #15
                              So this is fixed but I never found the root cause. I upgrade the server and agent to 4.4 and now UI is showing the proper 600GB ram available. I'm assuming this is a zabbix bug

                              Comment

                              Working...