Ad Widget

Collapse

Zabbix 4.4 server and snmp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajsolanki
    Member
    • Feb 2020
    • 46

    #1

    Zabbix 4.4 server and snmp

    Hi

    Sorry if this is repeat question. I m pretty new to Zabbix. I have installed and setup 4.4 on RHEL 7 (Red Hat Enterprise Linux Server release 7.7 (Maipo)). My server is up and running fine. I have to setup snmp traps so I followed all the steps from https://blog.zabbix.com/snmp-traps-in-zabbix/8210/

    Now my Zabbix server was not setup for snmp so when I try to edit my Zabbix server host and add snmp , upon submitting update button I get this after 2 minutes "This site can’t be reached"

    There is nothing in Zabbix_server.log which would tell me what the issue is. What can do to fix this error ?

    Raj
  • rajsolanki
    Member
    • Feb 2020
    • 46

    #2
    any feedback on this ? Pretty much stuck here I have made sure my php settings also as per requirement.

    Comment

    • dimir
      Zabbix developer
      • Apr 2011
      • 1080

      #3
      That blog is no good, you should follow: https://www.zabbix.com/documentation...rap_monitoring
      If you will have an issue, see if that's the one: https://support.zabbix.com/browse/ZBX-17333
      Last edited by dimir; 19-02-2020, 16:55.

      Comment

      • rajsolanki
        Member
        • Feb 2020
        • 46

        #4
        Thanks for the reply. Thing is my zabbix server it self needs to have snmp . i guess thats step 1 which fails. Let see how can i share a screen shot.

        Comment

        • rajsolanki
          Member
          • Feb 2020
          • 46

          #5
          Click image for larger version

Name:	zabbix_snmp_config.jpg
Views:	2649
Size:	69.7 KB
ID:	395917

          Comment

          • dimir
            Zabbix developer
            • Apr 2011
            • 1080

            #6
            Follow this one: https://www.youtube.com/watch?v=fVK2YWdTalQ

            Comment

            • rajsolanki
              Member
              • Feb 2020
              • 46

              #7
              Yes i saw that too so in video at 11:43 seconds mentions about adding snmp to host thats EXACTLY is failing for me it spins and after 2 mins i get This site can’t be reached

              The connection was reset.

              i have tried adding IP , dns name of server , 127.0.0.1 but i keep getting above error.

              Comment

              • rajsolanki
                Member
                • Feb 2020
                • 46

                #8
                any help experts ? pretty much stuck here I even increased logging and do not see any errors

                Comment

                • tim.mooney
                  Senior Member
                  • Dec 2012
                  • 1427

                  #9
                  I have SNMP trap receiving working on our RHEL 7.7 Zabbix server, though our version is currently 4.2.5. I only followed the instructions in the official Zabbix documentation. dimir linked the docs in his first post in this thread.

                  Are you using the Zabbix packages from www.zabbix.com, or are they coming from somewhere else?

                  Have you verified that the Zabbix server was built (compiled) with support for SNMP? You can run

                  Code:
                  monitor ~$ ldd [I]/path/to/your/binary/for[/I]/zabbix_server | egrep snmp
                      libnetsnmp.so.31 => /lib64/libnetsnmp.so.31 (0x00007ff5af59a000)
                  You must use the correct path to wherever your zabbix_server binary is (probably /usr/sbin), but the output from ldd should include 'libnetsnmp.so.31' for RHEL 7.x.

                  I know adding the SNMP interface in your Zabbix server config was the first step in the guide, but have you also taken the step of enabling and starting snmptrapd? You'll need to do additional configuration in its conf file, as explained in the docs, but I'm wondering if just having snmptrapd running makes any difference for the issue you're having defining the interface.

                  Comment

                  • rajsolanki
                    Member
                    • Feb 2020
                    • 46

                    #10
                    Thanks for the reply. Yes I m using packages from Zabbix.com.

                    ldd /sbin/zabbix_server | egrep snmp
                    libnetsnmp.so.31 => /lib64/libnetsnmp.so.31 (0x00007f47831a4000)

                    my snmp is working fine as I can do snmp walk without any issues.

                    Comment

                    • tim.mooney
                      Senior Member
                      • Dec 2012
                      • 1427

                      #11
                      Ok, that proves that SNMP support you need is there.

                      Did you try starting snmptrapd, as I mentioned at the end of my last post, and then re-try adding the interface, to see if it makes a difference?

                      Comment

                      • rajsolanki
                        Member
                        • Feb 2020
                        • 46

                        #12
                        yes I just tried that too. Restarted Zabbix server too. Once it was up I tried adding snmp interface and got familiar This site can’t be reached

                        Comment

                        • tim.mooney
                          Senior Member
                          • Dec 2012
                          • 1427

                          #13
                          Ok, thanks for checking that.

                          You showed a screenshot above with the SNMP interface area circled, but would it be possible for you to screenshot exactly what you're filling in after you click the "Add" link? Basically, before you click "Update", screenshot what you've configured in the SNMP Interfaces area. Please provide that.

                          Comment

                          • rajsolanki
                            Member
                            • Feb 2020
                            • 46

                            #14
                            Click image for larger version

Name:	zabbix_snmp_config_1.jpg
Views:	2130
Size:	103.4 KB
ID:	395942 so here is output of snmpwalk from command prompt of Zabbix server I have hiddent my server name.


                            [root@XXXXXXXXX ~]# snmpwalk -v2c -c public -O e 127.0.0.1
                            SNMPv2-MIB::sysDescr.0 = STRING: Linux XXXXXXXXX 3.10.0-1062.9.1.el7.x86_64 #1 SMP Mon Dec 2 08:31:54 EST 2019 x86_64
                            SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
                            DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (205228) 0:34:12.28
                            SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
                            SNMPv2-MIB::sysName.0 = STRING: XXXXXXXXX
                            SNMPv2-MIB::sysLocation.0 = STRING: Unknown (edit /etc/snmp/snmpd.conf)
                            SNMPv2-MIB::sysORLastChange.0 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORID.1 = OID: SNMP-MPD-MIB::snmpMPDCompliance
                            SNMPv2-MIB::sysORID.2 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
                            SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
                            SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
                            SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
                            SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
                            SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
                            SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
                            SNMPv2-MIB::sysORID.9 = OID: SNMP-NOTIFICATION-MIB::snmpNotifyFullCompliance
                            SNMPv2-MIB::sysORID.10 = OID: NOTIFICATION-LOG-MIB::notificationLogMIB
                            SNMPv2-MIB::sysORDescr.1 = STRING: The MIB for Message Processing and Dispatching.
                            SNMPv2-MIB::sysORDescr.2 = STRING: The management information definitions for the SNMP User-based Security Model.
                            SNMPv2-MIB::sysORDescr.3 = STRING: The SNMP Management Architecture MIB.
                            SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
                            SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
                            SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
                            SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations
                            SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
                            SNMPv2-MIB::sysORDescr.9 = STRING: The MIB modules for managing SNMP Notification, plus filtering.
                            SNMPv2-MIB::sysORDescr.10 = STRING: The MIB module for logging SNMP Notifications.
                            SNMPv2-MIB::sysORUpTime.1 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.2 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.3 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.4 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.5 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.6 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.7 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.8 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.9 = Timeticks: (3) 0:00:00.03
                            SNMPv2-MIB::sysORUpTime.10 = Timeticks: (3) 0:00:00.03
                            HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (305454970) 35 days, 8:29:09.70
                            HOST-RESOURCES-MIB::hrSystemUptime.0 = No more variables left in this MIB View (It is past the end of the MIB tree)
                            Attached Files

                            Comment

                            • tim.mooney
                              Senior Member
                              • Dec 2012
                              • 1427

                              #15
                              Thanks for providing that additional information. I wish I could tell you that I see something wrong with your config, but I don't.

                              The only thing that's different between your system config and mine is that for the SNMP Interface, I'm using the public IPv4 address for our Zabbix server, rather than 127.0.0.1. I too have "Use bulk requests" checked (which I don't think makes any difference in the case where we're defining an interface where we want to receive traps; bulk requests should only make a difference if that interface is used for SNMP polling). I'm also using "IP" rather than "DNS" for this interface, and still using port 161. Note that port 162 (not 161) is the SNMP trap port, but that too doesn't matter in this case.

                              Wish I had some other idea for what to check, but I don't.

                              Does this system have SELinux running in "enforcing" mode?

                              Comment

                              Working...