Ad Widget

Collapse

Monitor Free Memory in Linux via SNMP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mgajjar
    Junior Member
    • May 2021
    • 6

    #1

    Monitor Free Memory in Linux via SNMP

    I am new to Zabbix. I want to monitor my Linux Server's memory utilization via SNMP.

    In the Template "Template Module HOST-RESOURCES-MIB SNMPv2", the default item "Memory Utilization" in the item prototype calculates the free memory.

    But I know that Linux defines free memory without including buffer/cache.

    Is there a way that I can say that calculate memory that is free + buffer/cache?

    I have to do this using SNMP. I can't use Zabbix agent.
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #2
    What version of Zabbix Server are you using?

    Are you refering to this calculated key "vm.memory.util[snmp]"?

    I supose you could change the calculation to fit your system.

    The following keys are all data read from SNMP agent and available within "Linux memory SNMP" template. So, you can play with them.
    vm.memory.cached[memCached.0]
    vm.memory.buffers[memBuffer.0]
    vm.memory.free[memAvailReal.0]
    vm.memory.total[memTotalReal.0]

    Comment

    • mgajjar
      Junior Member
      • May 2021
      • 6

      #3
      The Zabbix version is 5.0

      This is my item prototype configuration. This is default.

      But I actually dont know hot keys works.

      Because when I try modifying this item and then create a graph based on this. I simply don't get any data.

      With the used one I can see data in the graph.

      Click image for larger version

Name:	2021-05-21 10_41_07-Window.png
Views:	2306
Size:	57.5 KB
ID:	425138

      Comment

      • markfree
        Senior Member
        • Apr 2019
        • 868

        #4
        According to the Zabbix Git for version 5.0, this template uses the following formula:
        Code:
        last("vm.memory.used[hrStorageUsed.{#SNMPINDEX}]")/last("vm.memory.total[hrStorageSize.{#SNMPINDEX}]")*100
        You might wanna check if keys "vm.memory.used" and "vm.memory.total" are giving you correct results as well.
        Have you upgraded your server to 5.0 from an older version?

        Comment

        • mgajjar
          Junior Member
          • May 2021
          • 6

          #5
          Yes I Upgraded from older version

          Comment

          • markfree
            Senior Member
            • Apr 2019
            • 868

            #6
            Upgrading to the latest Zabbix version will not automatically upgrade the templates used.
            Template changes [Zabbix Documentation 5.4]

            This might explain the difference in template formula.

            Comment

            Working...