Ad Widget

Collapse

Monitoring Linux via SNMP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Theoupneustos
    Junior Member
    • Dec 2008
    • 4

    #1

    Monitoring Linux via SNMP

    Hello, all.

    I have used Zabbix in the past, but now I want to do something with it I haven't tried before, and I hope someone will tell me they've done it and it worked well: agentless monitoring of Linux systems.

    Here's my situation: I have inherited a badly-malfunctioning Zenoss server monitoring about 500 devices, the majority of which are Linux VMs. The Zenoss server will have to be rebuilt, and I would like to propose to our team that we switch to Zabbix. One of the original reasons they chose Zenoss was its ability to monitor Linux systems via SNMP. I would like to show them that with Zabbix we have a choice of SNMP or agent-based monitoring...IF I can make it do what Zenoss (used to) do.

    My question: has anyone deployed Zabbix to monitor Linux systems without installing the agent? How successful were you? What problems did you encounter?

    Thanks.
  • marcel
    Senior Member
    Zabbix Certified Specialist
    • Oct 2010
    • 112

    #2
    Zabbix is fully SNMP-aware, however I am not sure about how much of auto discovery of services/ports/etc works in Zabbix using SNMP - that is how can you monitor for example 48 ethernet ports on a switch without actually adding all of the ports into the monitoring by hand.

    How is this done in Zenoss?

    Otherwise, I am using SNMP to monitor uptimes of networked devices and that works great.

    Marcel
    Zabbix Certified Specialist for Large Environments since 12/2010

    Comment

    • MrKen
      Senior Member
      • Oct 2008
      • 652

      #3
      Provided you have snmp installed, configured and running on the Linux box, you can try these OIDs and create your own custom Template.

      Have fun!

      CPU Statistics
      Load
      1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1
      5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2
      15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3
      ucd-snmpd.laLoadInt1 .1.3.6.1.4.1.2021.10.1.5.1
      ucd-snmpd.laLoadInt5 .1.3.6.1.4.1.2021.10.1.5.2
      ucd-snmpd.laLoadInt15 .1.3.6.1.4.1.2021.10.1.5.3


      CPU
      percentage of user CPU time: .1.3.6.1.4.1.2021.11.9.0
      raw user cpu time: .1.3.6.1.4.1.2021.11.50.0
      percentages of system CPU time: .1.3.6.1.4.1.2021.11.10.0
      raw system cpu time: .1.3.6.1.4.1.2021.11.52.0
      percentages of idle CPU time: .1.3.6.1.4.1.2021.11.11.0
      raw idle cpu time: .1.3.6.1.4.1.2021.11.53.0
      raw nice cpu time: .1.3.6.1.4.1.2021.11.51.0

      Memory Statistics
      Total Swap Size: .1.3.6.1.4.1.2021.4.3.0
      Available Swap Space: .1.3.6.1.4.1.2021.4.4.0
      Total RAM in machine: .1.3.6.1.4.1.2021.4.5.0
      Total RAM used: .1.3.6.1.4.1.2021.4.6.0
      Total RAM Free: .1.3.6.1.4.1.2021.4.11.0
      Total RAM Shared: .1.3.6.1.4.1.2021.4.13.0
      Total RAM Buffered: .1.3.6.1.4.1.2021.4.14.0
      Total Cached Memory: .1.3.6.1.4.1.2021.4.15.0

      Linux Disk Space:
      hrStorageSize 1.3.6.1.2.1.25.2.3.1.5.
      hrStorageUsed 1.3.6.1.2.1.25.2.3.1.6.
      hrStorageType 1.3.6.1.2.1.25.2.3.1.2
      hrStorageDescr 1.3.6.1.2.1.25.2.3.1.3
      hrStorageAllocationUnits 1.3.6.1.2.1.25.2.3.1.4


      System Uptime: .1.3.6.1.2.1.1.3.0
      Traffic - can monitor ifInOctets, ifOutOctets, ifDescr, ifAdminStatus
      Port Connectivity - do snmpwalk & grep tcpConnState, for something like:
      .1.3.6.1.2.1.6.13.1.1.0.0.0.0.9260.0.0.0.0.0 (Monitoring Port 9260)


      MrKen
      Disclaimer: All of the above is pure speculation.

      Comment

      • subba5678
        Senior Member
        • May 2010
        • 132

        #4
        Hi MrKen,
        Thanks for the SNMP OIDs . I created a template to monitor the disk space / in a linux server which is monitored by SNMP V1 . I used the below OID's for the template , but no luck and i got the response as " NOTSUPPORTED" . Please find the attachment of my template which i created . Please help me out

        Thanks,
        Subbu
        Attached Files
        Last edited by subba5678; 29-10-2010, 22:20. Reason: Need to change the image

        Comment

        • MrKen
          Senior Member
          • Oct 2008
          • 652

          #5
          Hi Subba5678,

          That will not work!

          First, you need to do snmpwalk on 1.3.6.1.2.1.25.2.3.1.3 which will give you a list of the partitions. Look for the hrStorageDescr.number which corresponds with /

          On the Server that I just checked on, it is hrStorageDescr.4 (yours may be different)
          So to monitor the StorageUsed, I need to add .4 to the end of the OID
          Like this: 1.3.6.1.2.1.25.2.3.1.6.4

          Next, you need to snmpwalk 1.3.6.1.2.1.25.2.3.1.4 (hrStorageAllocationUnits) to get the Custom Multiplier. In my case it is 1024.

          Try that.

          MrKen
          Disclaimer: All of the above is pure speculation.

          Comment

          • subba5678
            Senior Member
            • May 2010
            • 132

            #6
            Hi MrKen,
            Thanks for the Update and will try with the below descriptipon and will get back to you

            Thanks,
            Subbu

            Comment

            • subba5678
              Senior Member
              • May 2010
              • 132

              #7
              Hi MrKen,
              I followed the procedure which you uploaded . I am not getting the exact total diskspace . I had the total Disk Space of 20 GB for "/" , but its showing 30.3 MB . Please find my SNMP WALK details . For reference please find the screen shot and help me out .

              HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /


              Thanks,
              Subbu
              Attached Files

              Comment

              • MrKen
                Senior Member
                • Oct 2008
                • 652

                #8
                Originally posted by subba5678
                Hi MrKen,
                I followed the procedure which you uploaded . I am not getting the exact total diskspace .

                HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /
                Well, actually you followed part of the procedure!

                What about the part where I said, "Next, you need to snmpwalk 1.3.6.1.2.1.25.2.3.1.4 (hrStorageAllocationUnits) to get the Custom Multiplier. In my case it is 1024."

                On your Item config change:
                Type of Information: Numeric (float)
                Units: Bytes
                Use Multiplier: Custom Multiplier
                Cusotm Multiplier: the value you get for hrStorageAlloctionUnits. maybe 1024

                MrKen
                Disclaimer: All of the above is pure speculation.

                Comment

                • subba5678
                  Senior Member
                  • May 2010
                  • 132

                  #9
                  Hi MrKen,
                  Thanks for the reply . I did snmpwalk 1.3.6.1.2.1.25.2.3.1.31 (hrStorageAllocationUnits) to get the Custom Multiplier. In my case it is 4096." Even then also its showing the Incorrect value . For reference please find the SNMP Walk Details as well as Snampshot . As because the actual value is 201G.B . Please help me out
                  SNMP WALK Details

                  [root@localhost ~]# snmpwalk -v1 -cxxxx XXXX 1.3.6.1.2.1.25.2.3.1.4.31
                  HOST-RESOURCES-MIB::hrStorageAllocationUnits.31 = INTEGER: 4096 Bytes




                  Thanks,
                  Subbu
                  Attached Files

                  Comment

                  • subba5678
                    Senior Member
                    • May 2010
                    • 132

                    #10
                    Hi MrKen,
                    Finally i got it . I created a trigger to send an email if the disk space is less then 200G . I used the below template for that , but i am not getting the trigger . Please help me out

                    {ATL616:hrStorageSize.31.min(900)}<200G


                    Thanks,
                    Subbu

                    Comment

                    • MrKen
                      Senior Member
                      • Oct 2008
                      • 652

                      #11
                      Originally posted by subba5678
                      Hi MrKen,
                      Thanks for the reply . I did snmpwalk 1.3.6.1.2.1.25.2.3.1.31 (hrStorageAllocationUnits) to get the Custom Multiplier. In my case it is 4096." Even then also its showing the Incorrect value .

                      As because the actual value is 201G.B .
                      In your Item image the Description says "Total Disk Space on /"
                      however, the OID you are using is for Used Disk Space. No wonder it isn't showing 201 Gb.

                      Change the OID to 1.3.6.1.2.1.25.2.3.1.5.31

                      MrKen
                      Disclaimer: All of the above is pure speculation.

                      Comment

                      • subba5678
                        Senior Member
                        • May 2010
                        • 132

                        #12
                        Hi MrKen ,
                        Thanks for the update . Now iam able to monitor and create the trigger for Disk Space . Please find my trigger details for the same . It will trigger if the used space is more than 200GB . If it is wrong please help me out .

                        {localhostXXX:hrStorageUsed.31.min(900)}>200G


                        Thanks,
                        Subbu

                        Comment

                        • MrKen
                          Senior Member
                          • Oct 2008
                          • 652

                          #13
                          Your Trigger looks dangerous.

                          If your total disk space is 201 GB, and your trigger is configured to fire if Used Space is greater that 200 GB means that you are going to be alerted when the drive is about to run out of disk space and crash.

                          Perhaps you could change 200 GB to 190 or 180. Also I'm pretty sure that you cannot put 200G, you need to put 2000000000.

                          You might like to try this. It will trigger if used disk space is greater than 80%.

                          {localhostXXX:hrStorageUsed.31.last(0)}*100/{localhostXXX:hrStorageSize.31.last(0)}>80

                          MrKen
                          Disclaimer: All of the above is pure speculation.

                          Comment

                          • subba5678
                            Senior Member
                            • May 2010
                            • 132

                            #14
                            hi Mrken,
                            Thanks for the update . my exact requirement is if the maximum disk space reached to 98.5% for 15 Mins then i need a trigger . i will try with the below procedure and will get back to you . Also kindly help me how to create a trigger if the disk space reached to 98.5% . for the windows server. As I am using the windows zabbix agent version 1.8.2 and server 1.8.1 . please help me out

                            Thanks,
                            Subbu

                            Comment

                            • EnigmA-X
                              Senior Member
                              Zabbix Certified Specialist
                              • Oct 2010
                              • 116

                              #15
                              Your trigger should be like something like this:

                              {localhostXXX:hrStorageUsed.31.last(900)}*100/{localhostXXX:hrStorageSize.31.last(0)}>98.5

                              You will find valuable information about triggers here.

                              Furthermore, there should be no problem with running different versions of zabbix agents and servers as long as they both are 1.8x versions.

                              Comment

                              Working...