TotaalscriptSNMPCentos

From 4AllBusiness
Revision as of 14:06, 24 May 2018 by 4allbusiness (talk | contribs)
Jump to navigation Jump to search


yum install -y net-snmp net-snmp-util xinetd git mv /etc/snmp/snmpd.conf snmpd.conf2.org touch /etc/snmp/snmpd.conf chkconfig snmpd on cd /opt/ git clone https://github.com/librenms/librenms-agent.git cd librenms-agent cp check_mk_agent /usr/bin/check_mk_agent chmod +x /usr/bin/check_mk_agent cp /opt/librenms-agent/snmp/distro /usr/bin cp check_mk_xinetd /etc/xinetd.d/check_mk mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local chkconfig xinetd on cat <<EOT>> /etc/snmp/snmpd.conf

  1. Change RANDOMSTRINGGOESHERE to your preferred SNMP community string

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

syslocation Rotterdam, Nl [51.922982,4.431308] syscontact B.Huijsen <info@4allbusiness.nl>

  1. Distro Detection

extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro

  1. Hardware Detection (uncomment to enable)
  2. extend .1.3.6.1.4.1.2021.7890.2 hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name'
  3. extend .1.3.6.1.4.1.2021.7890.3 manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
  4. extend .1.3.6.1.4.1.2021.7890.4 serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'

EOT service snmpd restart service xinetd restart