Difference between revisions of "LibreNMS"

From 4AllBusiness
Jump to navigation Jump to search
(Created page with "LibreNMS instelling voor Linux In CentOS het volgende installeren om snmp en xinetd te activeren: yum install -y net-snmp net-snmp-util xinetd Vervolgens de inhoud van de /...")
 
Line 22: Line 22:
 
  #extend .1.3.6.1.4.1.2021.7890.3 manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
 
  #extend .1.3.6.1.4.1.2021.7890.3 manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
 
  #extend .1.3.6.1.4.1.2021.7890.4 serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'
 
  #extend .1.3.6.1.4.1.2021.7890.4 serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'
 +
 +
Installeer de Unix-agent
 +
 +
Clone the librenms-agent repository:
 +
cd /opt/
 +
git clone https://github.com/librenms/librenms-agent.git
 +
cd librenms-agent
 +
 +
Copy the relevant check_mk_agent to /usr/bin:
 +
cp check_mk_agent /usr/bin/check_mk_agent
 +
chmod +x /usr/bin/check_mk_agent
 +
 +
Copy the service file(s) into place.
 +
cp check_mk_xinetd /etc/xinetd.d/check_mk
 +
 +
Create the relevant directories.
 +
mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local
 +
 +
Copy each of the scripts from agent-local/ into /usr/lib/check_mk_agent/local that you require to be graphed. You can find detail setup instructions for specific applications above.
 +
Make each one executable that you want to use with chmod +x /usr/lib/check_mk_agent/local/$script
 +
Enable the check_mk service
 +
xinetd
 +
/etc/init.d/xinetd restart systemctl enable check_mk.socket && systemctl start check_mk.socket
 +
 +
Login to the LibreNMS web interface and edit the device you want to monitor. Under the modules section, ensure that unix-agent is enabled.
 +
Then under Applications, enable the apps that you plan to monitor.
 +
Wait for around 10 minutes and you should start seeing data in your graphs under Apps for the device.

Revision as of 09:37, 24 May 2018

LibreNMS instelling voor Linux

In CentOS het volgende installeren om snmp en xinetd te activeren:

yum install -y net-snmp net-snmp-util xinetd

Vervolgens de inhoud van de /etc/snmp/snmpd.conf aanpassen naar:

# Change RANDOMSTRINGGOESHERE to your preferred SNMP community string
com2sec readonly  default         publicPassAanpassen

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>

#Distro Detection
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro

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

Installeer de Unix-agent

Clone the librenms-agent repository:

cd /opt/
git clone https://github.com/librenms/librenms-agent.git
cd librenms-agent

Copy the relevant check_mk_agent to /usr/bin:

cp check_mk_agent /usr/bin/check_mk_agent
chmod +x /usr/bin/check_mk_agent

Copy the service file(s) into place.

cp check_mk_xinetd /etc/xinetd.d/check_mk

Create the relevant directories.

mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local

Copy each of the scripts from agent-local/ into /usr/lib/check_mk_agent/local that you require to be graphed. You can find detail setup instructions for specific applications above. Make each one executable that you want to use with chmod +x /usr/lib/check_mk_agent/local/$script Enable the check_mk service xinetd

/etc/init.d/xinetd restart	systemctl enable check_mk.socket && systemctl start check_mk.socket

Login to the LibreNMS web interface and edit the device you want to monitor. Under the modules section, ensure that unix-agent is enabled. Then under Applications, enable the apps that you plan to monitor. Wait for around 10 minutes and you should start seeing data in your graphs under Apps for the device.