Difference between revisions of "LibreNMS"

From 4AllBusiness
Jump to navigation Jump to search
Line 2: Line 2:
  
 
In CentOS het volgende installeren om snmp en xinetd te activeren:
 
In CentOS het volgende installeren om snmp en xinetd te activeren:
  yum install -y net-snmp net-snmp-util xinetd
+
  yum install -y net-snmp net-snmp-util xinetd git
  
 
Vervolgens de inhoud van de /etc/snmp/snmpd.conf aanpassen naar:
 
Vervolgens de inhoud van de /etc/snmp/snmpd.conf aanpassen naar:
Line 23: Line 23:
 
  #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
+
chkconfig snmpd on
 +
service snmpd start
 +
 
 +
Installeer de Unix-agent (mk_agent)
  
 
Clone the librenms-agent repository:
 
Clone the librenms-agent repository:
Line 43: Line 46:
 
Make each one executable that you want to use with chmod +x /usr/lib/check_mk_agent/local/$script
 
Make each one executable that you want to use with chmod +x /usr/lib/check_mk_agent/local/$script
 
Enable the check_mk service
 
Enable the check_mk service
xinetd
+
chkconfig xinetd on
  /etc/init.d/xinetd restart systemctl enable check_mk.socket && systemctl start check_mk.socket
+
  service xinetd start
  
 
Login to the LibreNMS web interface and edit the device you want to monitor. Under the modules section, ensure that unix-agent is enabled.
 
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.
 
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.
 
Wait for around 10 minutes and you should start seeing data in your graphs under Apps for the device.

Revision as of 09:47, 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 git

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'
chkconfig snmpd on
service snmpd start

Installeer de Unix-agent (mk_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

chkconfig xinetd on
service xinetd start

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.