SNMP monitoring

Discussion in 'Feature Requests' started by David, Oct 8, 2016.

  1. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    781
    Likes Received:
    31
    Be able to poll the device for disk usage, interface stats, memory and cpu as well.
     
    JAMOT Loïc likes this.
  2. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    781
    Likes Received:
    31
    [​IMG]
    Hamish McArthur October 14, 2013 06:53
    I think this would be a great feature for the administrators like myself who run larger networks and depend on automated monitoring systems to keep a tab on all the system we manage. Even basics like network throughput, CPU, memory and disk usage would be very useful.



    [​IMG]
    Thomas Schaer February 10, 2015 09:31
    Are there any updates or information regarding the monitoring feature with SNMP ? It would be very useful for us.



    [​IMG]
    Hamish McArthur February 11, 2015 08:25
    Hi Thomas,

    I did have a chat with Johan Allard quite a while ago and he suggested that if we are comfortable with the Linux command line and SNMPd we just go ahead and install\configure it ourselves. This certainly isn't a GUI approach (and I don't think that changing the appliance from the command line is officially supported) but it works fine for us. If you need a little help I'm sure I can guide you. It certainly is a useful feature for us, particularly disk usage. We also monitor network, CPU and uptime.
    Regards.
    H

    [​IMG]
    Loic Jamot February 26, 2015 13:50
    Hi,

    it is difficult to imagine an application in production without the possibility of monitoring its capacity (disk/memory/cpu...)



    [​IMG]
    Marco Koenig March 17, 2015 09:32
    For us a SNMP Monitoring in General is a must have, we implemented a Workaround with the daily System Status mail.
    But in fact SNMP Monitoring of disk usage and some other KPIs must be possible.



    [​IMG]
    Hamish McArthur March 17, 2015 09:44
    Its not too bad to implement from the command line. It took me less than 15min to do. If it would help someone I can post the steps I took to download SNMPd, configure it and you will be able to monitoring your OpenSprinkler appliance using SNMP.



    [​IMG]
    Hamish McArthur March 17, 2015 09:47
    Sorry, LiquidFiles Appliance, not OpenSprinkler. I'm trying to multi-task :p


    [​IMG]
    Marco Koenig March 17, 2015 09:50
    That would really be great, appreciate your help!



    [​IMG]
    Thomas Schaer March 17, 2015 13:20
    I am also interested into the solution with command line (SNMPd). Thx Hamish for your help !
     
  3. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    781
    Likes Received:
    31
    [​IMG]
    Hamish McArthur March 17, 2015 13:59
    Hope this helps. As usual you, you follow these instructions at your own risk. I've tried to simplify the instructions as best a possible. Backup your system before you start in case you make a serious mistake. Here we go:

    Login to the server with your root account using SSH (PuTTy is a good windows client)

    Section1: Install SNMPD
    1. yum -y install net-snmp net-snmp-utils

    Section2: Install nano text editor (easier than vi for some)

    2. yum -y install nano

    Section3: Config (backup default snmp config and create new one)

    3. cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig

    4. nano /etc/snmp/snmpd.conf

    (Take a look a the sample config I have attached. Make the necessary changes to yours. This file is a basic setup. I've tried to simplify.)

    Once done, Hit "Ctrl + X" to exit and press "Y" to save then press <ENTER>

    Section4: Start service

    5. Service snmpd start

    Section5: Punch hole in firewall to allow SNMP UDP traffic (I'm not an iptables expert but this *should* do the trick)

    6. iptables -I INPUT -p udp -m udp --dport 161 -j ACCEPT

    7. iptables-save > /etc/sysconfig/iptables

    Section6: Set SNMPD to start when system boots.

    8. chkconfig snmpd on

    That *should* be it. I really hope that this works for you guys.
     

    Attached Files:

  4. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    781
    Likes Received:
    31
    [​IMG]
    Marco Koenig March 17, 2015 14:20
    Working great, i was the Firewall part which we did not know it has to be done!
    Thank you so much for your Support!


    [​IMG]
    Thomas Schaer March 25, 2015 09:13
    Thx to Hamish. Works fine and I am not a Tux Specialist :)



    [​IMG]
    JC_789089023 July 21, 2016 04:19
    Has anyone used the Site 24x7 Linux Plugin to monitor their servers?

    https://www.site24x7.com/help/admin/adding-a-monitor/linux-server-monitoring.html

    Just started playing around with it. Migrating away from Pingdom.


    [​IMG]
    JC_789089023 October 25, 2016 04:54
    PS: For anyone reading, yes, I did implement the Site24x7 Linux Plugin, been using it for a few months, and it works great!
     
  5. David

    David Administrator
    Staff Member

    Joined:
    Dec 1, 2015
    Messages:
    781
    Likes Received:
    31
    Somebody asked for SNMP cfg in LF v3.x (Centos 7) so here is a basic example:

    installation:
    #yum install -y net-snmp net-snmp-utils

    backup original cfg file
    #cd /etc/snmp
    #cp -p snmpd.conf snmpd.conf.orig


    Now you can modify the default snmpd.conf file or download one preconfigured from this forum.
    Upload and rename the snmpd-lfv3.conf file to snmpd.conf in your LF.
    In the file change com2sec community. (default was set to "yourlfcommunity" in that cfg file)
    Modify syslocation, syscontact and go through the file uncomment/add objects you want to monitor.

    Enable and start snmpd service in the system
    #systemctl enable snmpd && systemctl start snmpd

    Punch a hole in to the Firewall for SNMP and reload Firewall
    #firewall-cmd --permanent --add-port=161/udp
    #firewall-cmd --reload


    Test from LF or better from another machine. This example should list your LF system drive.
    There is used snmpwalk, a cmd line tool.
    #snmpwalk -v 1 <your.LF.IP.address> -c yourlfcommunity .1.3.6.1.4.1.2021.9

    iso.3.6.1.4.1.2021.9.1.1.1 = INTEGER: 1
    iso.3.6.1.4.1.2021.9.1.2.1 = STRING: "/"
    iso.3.6.1.4.1.2021.9.1.3.1 = STRING: "/dev/mapper/vg01-lv_root"
    iso.3.6.1.4.1.2021.9.1.4.1 = INTEGER: -1
    iso.3.6.1.4.1.2021.9.1.5.1 = INTEGER: 5
    iso.3.6.1.4.1.2021.9.1.6.1 = INTEGER: 14112768 <--- Total size
    iso.3.6.1.4.1.2021.9.1.7.1 = INTEGER: 4763228 <---- Available
    iso.3.6.1.4.1.2021.9.1.8.1 = INTEGER: 9349540 <--- Used
    iso.3.6.1.4.1.2021.9.1.9.1 = INTEGER: 66
    iso.3.6.1.4.1.2021.9.1.10.1 = INTEGER: 0
    iso.3.6.1.4.1.2021.9.1.11.1 = Gauge32: 14112768
    iso.3.6.1.4.1.2021.9.1.12.1 = Gauge32: 0
    iso.3.6.1.4.1.2021.9.1.13.1 = Gauge32: 4763228
    iso.3.6.1.4.1.2021.9.1.14.1 = Gauge32: 0
    iso.3.6.1.4.1.2021.9.1.15.1 = Gauge32: 9349540
    iso.3.6.1.4.1.2021.9.1.16.1 = Gauge32: 0
    iso.3.6.1.4.1.2021.9.1.100.1 = INTEGER: 0
    iso.3.6.1.4.1.2021.9.1.101.1 = ""
     

    Attached Files:

    #5 David, Nov 26, 2016
    Last edited: Nov 29, 2016
    rader likes this.

Share This Page