Skip to content

Instantly share code, notes, and snippets.

@axemann
Last active February 15, 2025 20:18
Show Gist options
  • Save axemann/c649b2c478fac5a7cd1f5fa2f51edbd7 to your computer and use it in GitHub Desktop.
Save axemann/c649b2c478fac5a7cd1f5fa2f51edbd7 to your computer and use it in GitHub Desktop.

Revisions

  1. axemann revised this gist Nov 8, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions librenms_linux_mon_setup.txt
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    sudo apt-get install snmpd -y
    sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
    sudo su -
    sudo cat > /etc/snmp/snmpd.conf << EOF
  2. axemann revised this gist Nov 8, 2016. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions librenms_linux_mon_setup.txt
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
    sudo su -
    sudo cat > /etc/snmp/snmpd.conf << EOF
    # Change RANDOMSTRINGGOESHERE to your preferred SNMP community string
    # Change public below to your preferred SNMP community string
    com2sec readonly default public

    group MyROGroup v2c readonly
    view all included .1 80
    access MyROGroup "" any noauth exact all none none

    syslocation Rack, Room, Building, City, Country [GPSX,Y]
    syscontact Your Name <[email protected]>
    sysLocation Rack, Room, Building, City, Country [GPSX,Y]
    sysContact Your Name <[email protected]>

    #Distro Detection
    extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro
    @@ -18,3 +18,5 @@ exit
    sudo curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
    sudo chmod +x /usr/bin/distro
    sudo service snmpd restart

    #Edit sysLocation and sysContact if needed
  3. axemann revised this gist Nov 8, 2016. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions librenms_linux_mon_setup.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,8 @@
    sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
    sudo su -
    sudo cat > /etc/snmp/snmpd.conf << EOF
    # Change RANDOMSTRINGGOESHERE to your preferred SNMP community string
    com2sec readonly default RANDOMSTRINGGOESHERE
    com2sec readonly default public

    group MyROGroup v2c readonly
    view all included .1 80
    @@ -13,7 +14,7 @@ syscontact Your Name <[email protected]>
    #Distro Detection
    extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro
    EOF

    exit
    sudo curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
    sudo chmod +x /usr/bin/distro
    sudo service snmpd restart
    sudo service snmpd restart
  4. axemann revised this gist Nov 8, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions librenms_linux_mon_setup.txt
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,7 @@ syscontact Your Name <[email protected]>
    #Distro Detection
    extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro
    EOF

    sudo curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
    sudo chmod +x /usr/bin/distro
    sudo service snmpd restart
  5. axemann revised this gist Nov 8, 2016. 1 changed file with 13 additions and 12 deletions.
    25 changes: 13 additions & 12 deletions librenms_linux_mon_setup.txt
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,18 @@
    sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
    sudo echo # Change RANDOMSTRINGGOESHERE to your preferred SNMP community string \
    com2sec readonly default RANDOMSTRINGGOESHERE \
    \
    group MyROGroup v2c readonly \
    view all included .1 80 \
    access MyROGroup "" any noauth exact all none none \
    \
    syslocation Rack, Room, Building, City, Country [GPSX,Y] \
    syscontact Your Name <[email protected]> \
    \
    #Distro Detection \
    extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro >> /etc/snmp/snmpd.conf
    sudo cat > /etc/snmp/snmpd.conf << EOF
    # Change RANDOMSTRINGGOESHERE to your preferred SNMP community string
    com2sec readonly default RANDOMSTRINGGOESHERE

    group MyROGroup v2c readonly
    view all included .1 80
    access MyROGroup "" any noauth exact all none none

    syslocation Rack, Room, Building, City, Country [GPSX,Y]
    syscontact Your Name <[email protected]>

    #Distro Detection
    extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro
    EOF
    sudo curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
    sudo chmod +x /usr/bin/distro
    sudo service snmpd restart
  6. axemann revised this gist Nov 8, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions librenms_linux_mon_setup.txt
    Original file line number Diff line number Diff line change
    @@ -11,6 +11,7 @@ syscontact Your Name <[email protected]> \
    \
    #Distro Detection \
    extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro >> /etc/snmp/snmpd.conf

    sudo curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
    sudo chmod +x /usr/bin/distro
    sudo service snmpd restart
  7. axemann created this gist Nov 8, 2016.
    16 changes: 16 additions & 0 deletions librenms_linux_mon_setup.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.old
    sudo echo # Change RANDOMSTRINGGOESHERE to your preferred SNMP community string \
    com2sec readonly default RANDOMSTRINGGOESHERE \
    \
    group MyROGroup v2c readonly \
    view all included .1 80 \
    access MyROGroup "" any noauth exact all none none \
    \
    syslocation Rack, Room, Building, City, Country [GPSX,Y] \
    syscontact Your Name <[email protected]> \
    \
    #Distro Detection \
    extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro >> /etc/snmp/snmpd.conf
    sudo curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
    sudo chmod +x /usr/bin/distro
    sudo service snmpd restart