User Tools

Site Tools


wiki:monitoring

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:monitoring [2018/09/26 11:19]
ghi [Configuration]
— (current)
Line 1: Line 1:
-====== Gateway monitoring ====== 
  
-===== Monit daemon ===== 
- 
-Monit is an open source supervision tool. It can monitor daemons, system resources, remote hosts or programs. It is recommended to use monit to monitor your applications. Please see [[https://​mmonit.com/​monit/​|online documentation]]. 
- 
-The command ''​monit status''​ returns the status of all supervised services. Services can be started/​stopped with monit using the commands ''​monit start <​name>''​ and ''​monit stop <​name>''​. 
- 
-The monit configuration is made in the directory **''/​etc/​monit.d''​**. It is a directory in which you have to add small scripts to describe what you want to do accordingly to monit specification. 
- 
-===== Watchdog ===== 
- 
-Watchdog is handled by monit daemon. ​ 
- 
-===== SNMP agent ===== 
- 
-Simple Network Management Protocol (SNMP) is a protocol used for monitoring network equipments. 
-The data SNMP management is organized in a management information base (MIB). 
-SNMP agent on Kerlink gateways is based on net-snmp ([[http://​net-snmp.sourceforge.net/​|Net-SNMP]]). 
-It is included by default with the firmware, however, since this is a generic agent, a few modifications are required to use it. 
- 
-==== Configuration ==== 
-Configuration file must be in ''/​etc/​snmp/''​. A default configuration file is present in this directory. 
- 
- 
-==== Manual Execution ==== 
-To execute ''​snmp''​ agent, just type:\\ 
-   snmpd 
- 
-==== Automatic Execution ==== 
-To automatically execute ''​snmpd''​ at boot time, a script named ''​snmpd.init''​ needs to be created in a new folder ''/​user/​snmp/​bin/''​. ​ 
- 
-  * Copy the following script under ''/​user/​snmp/​bin/​snmpd.init''​. 
-<code init snmpd.init>​ 
-#! /bin/sh -e 
-### BEGIN INIT INFO 
-# Provides: ​          snmpd 
-# Required-Start: ​    ​$network $local_fs 
-# Required-Stop: ​     $network $local_fs 
-# Default-Start: ​     2 3 4 5 
-# Default-Stop: ​      0 6 
-# Short-Description: ​ SNMP agents 
-# Description: ​       NET SNMP (Simple Network Management Protocol) Agents 
-### END INIT INFO 
-# 
-set -e 
- 
-export PATH=/​sbin:/​usr/​sbin:/​bin:/​usr/​bin 
- 
-test -x /​usr/​sbin/​snmpd || exit 0 
- 
-# Defaults 
-export MIBDIRS=/​usr/​share/​snmp/​mibs 
-SNMPDRUN=yes 
-SNMPDOPTS='​-Lsd -p /​var/​run/​snmpd.pid'​ 
-TRAPDRUN=no 
-TRAPDOPTS='​-Lsd -p /​var/​run/​snmptrapd.pid'​ 
- 
-# Reads config file (will override defaults above) 
-[ -r /​etc/​default/​snmpd ] && . /​etc/​default/​snmpd 
- 
-ssd_oknodo="​-o"​ 
- 
-# Cd to / before starting any daemons. 
-cd / 
- 
-# Create compatibility link to old AgentX socket location 
-if [ "​$SNMPDCOMPAT"​ = "​yes"​ ]; then 
-  ln -sf /​var/​agentx/​master /​var/​run/​agentx 
-fi 
- 
-case "​$1"​ in 
-  start) 
-    printf "​Starting network management services:"​ 
-    if [ "​$SNMPDRUN"​ = "​yes"​ -a -f /​etc/​snmp/​snmpd.conf ]; then 
-      start-stop-daemon -S -x /​usr/​sbin/​snmpd -- $SNMPDOPTS 
-      printf " snmpd" 
-    fi 
-    echo "​."​ 
-    ;; 
-  stop) 
-    printf "​Stopping network management services:"​ 
-    start-stop-daemon -q -K $ssd_oknodo -x /​usr/​sbin/​snmpd 
-    printf " snmpd" 
-    echo "​."​ 
-    ;; 
-  restart) 
-    printf "​Restarting network management services:"​ 
-    start-stop-daemon -q -K $ssd_oknodo -x /​usr/​sbin/​snmpd 
-    # Allow the daemons time to exit completely. 
-    sleep 2 
-    if [ "​$SNMPDRUN"​ = "​yes"​ -a -f /​etc/​snmp/​snmpd.conf ]; then 
-      start-stop-daemon -q -S -x /​usr/​sbin/​snmpd -- $SNMPDOPTS 
-      printf " snmpd" 
-    fi 
-    echo "​."​ 
-    ;; 
-  reload|force-reload) 
-    printf "​Reloading network management services:"​ 
-    if [ "​$SNMPDRUN"​ = "​yes"​ -a -f /​etc/​snmp/​snmpd.conf ]; then 
-      start-stop-daemon -q -K -s 1 -p /​var/​run/​snmpd.pid -x /​usr/​sbin/​snmpd 
-      printf " snmpd" 
-    fi 
-    echo "​."​ 
-    ;; 
-  *) 
-    echo "​Usage:​ /​etc/​rcU.d/​snmpd {start|stop|restart|reload|force-reload}"​ 
-    exit 1 
-esac 
- 
-exit 0 
-</​code>​ 
- 
-  * Apply executable right to the script: 
-<​code>​chmod 700 /​user/​snmp/​bin/​snmpd.init</​code>​ 
- 
-  * Create a symbolic link in ''​rcU.d''​ to the script so so it is executed at boot time. 
-<​code>​ln -s /​user/​snmp/​bin/​snmpd.init /​user/​rootfs_rw/​etc/​rcU.d/​S59snmpd</​code>  ​ 
- 
-  * Create a symbolic link in ''​rcU.d''​ to the script so so it is executed when the system halts. 
-<​code>​ln -s /​user/​snmp/​bin/​snmpd.init /​user/​rootfs_rw/​etc/​rcK.d/​K59snmpd</​code>  ​ 
- 
-  * Reboot the Wirnet™ iBTS (''​reboot''​ command) or type the below command to start ''​snmpd'':​ 
-<​code>/​etc/​rcU.d/​S59snmpd start</​code>​ 
- 
-===== Supported MIBs ===== 
-The following MIBs are supported:​\\ 
-  * mib2 (RFC1213) 
-//​mibII/​vacm_conf\\ 
-mibII/​tcpTable\\ 
-mibII/​udpTable\\ 
-mibII/​system//​ 
-  * if-mib 
-//​if-mib/​ifTable\\ 
-if-mib/​ifTable/​ifTable\\ 
-if-mib/​ifTable/​ifTable_interface//​ 
- 
-For more information,​ see [[http://​net-snmp.sourceforge.net/​|Net-SNMP]]. 
- 
- 
-  
wiki/monitoring.1537953574.txt.gz · Last modified: 2019/01/17 10:01 (external edit)