Ad Widget

Collapse

Zabbix 6.4 with SNMP but only some data shows in graphs with no other metrics?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uquevedo
    Junior Member
    • Dec 2023
    • 5

    #1

    Zabbix 6.4 with SNMP but only some data shows in graphs with no other metrics?

    Hi Everyone,

    I'm new to Zabbix and installed 6.4 on a RHEL9 system with PostgreSQL 16 and after figuring out the discovery to get all of my devices discovered, I wanted to monitor the metrics in some of the Linux systems using SNMP v2c.

    I'm doing what I think is a pretty basic setup with a rocommunity of just public [this is a personal home network, so I'm not too concerned about security], and after reconfiguring two of the Zabbix hosts with SNMP v2c info, I'm only getting a pie chart of disk space used and graphs for a lot of other things, but all of the entries state [no data].

    On these two devices I want to monitor in Zabbix, I setup the "Linux by SNMP" and "Zabbix server health" Templates. On the interface for each host, I added the IP address of the host and specified the SNMP v2c community public.

    I can do snmpwalk from both of these devices to each other [both Ubuntu Linux Servers] and I return all kinds of information about the device.

    If I can do a snmpwalk against these systems and get results, why might these values not be populating in the graphs for these system?

    Any pointers or advice would be greatly appreciated!​
  • ISiroshtan
    Senior Member
    • Nov 2019
    • 324

    #2
    SNMP agent configuration on linux (usually /etc/snmp/snmpd.conf) can limit what SNMP OIDs are allowed to be queried. With this limitation you would be able to SNMP walk, but only over allowed OID Trees. It's quite possible that OIDs from which Zabbix tries to get data for those empty graphs are not allowed to be queried.

    On Zabbix you can open host configurations and check the state of items that should supply data for graphs. If they are marked as unsupported with error like "no such object against OID for Agent" - it should be a good indication that agent does not allow said OIDs to be queried.

    Comment

    • uquevedo
      Junior Member
      • Dec 2023
      • 5

      #3
      Thanks for that, I had seen that in the items screen for the hosts but wasn't quite sure what it meant and now I know why.

      I can get CPU usage as well as total utilized space, but disk info among other thing just isn't there and the below screenshot is likely why:
      Click image for larger version

Name:	Screenshot 2023-12-14 at 7.20.34 AM.png
Views:	516
Size:	111.6 KB
ID:	475860

      I've made some changes to the snmpd.conf file on the system that is being monitored [changed rocommunity public to rocommunity public default -V all and restarted the service], but either that change didn't work or something else is amiss.

      I'll keep at this but if there are any other pointers for anything else I might be missing, those would be appreciated!

      Comment

      • ISiroshtan
        Senior Member
        • Nov 2019
        • 324

        #4
        Can you post here full content of snmpd.conf file?

        Actually nevermind the questions above, it discovered the items fine, so it should have been able to query the OIDs, so issue is in something else. Sadly don't have Zabbix 6.4 with SNMP template handy atm to check what it tries to do
        Last edited by ISiroshtan; 14-12-2023, 17:40.

        Comment

        • uquevedo
          Junior Member
          • Dec 2023
          • 5

          #5
          Sure, here it is on the target system being monitored:
          ################################################## #########################
          # SECTION: Monitor Various Aspects of the Running Host
          #
          # The following check up on various aspects of a host.

          # proc: Check for processes that should be running.
          # proc NAME [MAX=0] [MIN=0]
          #
          # NAME: the name of the process to check for. It must match
          # exactly (ie, http will not find httpd processes).
          # MAX: the maximum number allowed to be running. Defaults to 0.
          # MIN: the minimum number to be running. Defaults to 0.
          #
          # The results are reported in the prTable section of the UCD-SNMP-MIB tree
          # Special Case: When the min and max numbers are both 0, it assumes
          # you want a max of infinity and a min of 1.

          proc 0

          # disk: Check for disk space usage of a partition.
          # The agent can check the amount of available disk space, and make
          # sure it is above a set limit.
          #
          # disk PATH [MIN=100000]
          #
          # PATH: mount path to the disk in question.
          # MIN: Disks with space below this value will have the Mib's errorFlag set.
          # Can be a raw integer value (units of kB) or a percentage followed by the %
          # symbol. Default value = 100000.
          #
          # The results are reported in the dskTable section of the UCD-SNMP-MIB tree

          disk / 10%

          # load: Check for unreasonable load average values.
          # Watch the load average levels on the machine.
          #
          # load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
          #
          # 1MAX: If the 1 minute load average is above this limit at query
          # time, the errorFlag will be set.
          # 5MAX: Similar, but for 5 min average.
          # 15MAX: Similar, but for 15 min average.
          #
          # The results are reported in the laTable section of the UCD-SNMP-MIB tree

          load 12 10 10
          load 5 10 15

          # file: Check on the size of a file.
          # Display a files size statistics.
          # If it grows to be too large, report an error about it.
          #
          # file /path/to/file [maxsize_in_kilobytes]
          #
          # if maxsize is not specified, assume only size reporting is needed.
          #
          # The results are reported in the fileTable section of the UCD-SNMP-MIB tree

          file /tmp/test 10240






          ################################################## #########################
          # SECTION: Access Control Setup
          #
          # This section defines who is allowed to talk to your running
          # snmp agent.

          # rocommunity: a SNMPv1/SNMPv2c read-only access community name
          # arguments: community [default|hostname|network/bits] [oid]

          rocommunity public default -V all


          ​I only added the above in red to the end of /etc/snmp/snmpd.conf.
          Last edited by uquevedo; 14-12-2023, 17:39.

          Comment

          • uquevedo
            Junior Member
            • Dec 2023
            • 5

            #6
            I just reverted back to rocommuntiy public since the previous thing I had configured wasn't producing any results from a snmpwalk from the monitoring system.

            Comment

            • uquevedo
              Junior Member
              • Dec 2023
              • 5

              #7
              I poked around a little further under Monitoring --> Latest data and selected the system that I have SNMP monitoring enabled on and I'm seeing values there:
              Click image for larger version  Name:	Screenshot 2023-12-14 at 8.28.25 AM.png Views:	0 Size:	192.5 KB ID:	475872

              If I click on the Graph from the above, I do get a nice looking graph [except for the red exclamation items for obvious reasons]. The below is one of the network interfaces on the system:
              Click image for larger version  Name:	Screenshot 2023-12-14 at 8.32.36 AM.png Views:	0 Size:	46.1 KB ID:	475873

              I did a while look while running a snmpwalk on something that should obviously change [system up time] and the value is incrementing like I think it should:
              [uquevedo@rh-vm01 ~]$ while true;do snmpwalk -v 2c -c public -O e 192.168.10.2 .1.3.6.1.2.1.1.3.0;sleep 2;done
              DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (233440) 0:38:54.40
              DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (233642) 0:38:56.42
              DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (233843) 0:38:58.43
              DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (234044) 0:39:00.44
              DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (234246) 0:39:02.46
              DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (234447) 0:39:04.47
              DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (234648) 0:39:06.48


              It's just when I go to Monitoring --> Hosts --> Select the Graphs for a system is when I don't get any results:
              Click image for larger version  Name:	Screenshot 2023-12-14 at 8.38.16 AM.png Views:	0 Size:	43.7 KB ID:	475874

              ...I think I found the problem. I just noticed that the date range was for something in November. I updated it to something more recent and I'm getting results now:
              Click image for larger version  Name:	Screenshot 2023-12-14 at 8.40.07 AM.png Views:	1 Size:	54.2 KB ID:	475877

              Big DOH! on my part.

              I'm going to continue tinkering with this and I'll post back if I have any further questions.
              Last edited by uquevedo; 14-12-2023, 18:47.

              Comment

              Working...