Monitoring Yate

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Eventslog accessed from Rmanager)
(SNMP data from Monitoring through YATE SNMP agent)
Line 72: Line 72:
  
 
===SNMP data from Monitoring through YATE SNMP agent===
 
===SNMP data from Monitoring through YATE SNMP agent===
 +
[http://yate.null.ro/pmwiki/index.php?n=Main.MonitoringYate#Ref1 Simple Network Management Protocol (SNMP)] is a protocol that regulates information passed on in order to monitor and manage your network. Yate offers SNMP information gathered by the [[monitoring]] module (when it's loaded) through the [[Ysnmpagent]] module.
 +
 +
A simplified and generic model of how SNMP works is that within nodes of a network, you can have managed devices (ranging from routers to printers) with SNMP agents (software) running on them, and the network management systems (NMSs) gather the information (on request or following an automated script, also they also follow traps and could trigger notifications).
 +
 +
The hierarchical structure of network information is expressed by OIDs (object identifiers), translated into readable labels in MIB (Management Information Base).
 +
 +
In order to monitor Yate through SNMP you need the following modules:
 +
* ysnmpagent - found in modules/server. Its configuration file is the ysnmpagent.conf, in the conf.d directory.
 +
* monitoring - also in modules/server. Its configuration file is monitoring.conf in the conf.d directory.
 +
 +
The minimal configuration in ysnmpagent.conf you need to set is:
 +
 +
* port in the [general] section (example: 16001).
 +
* ro_community name in the [snmp_v2] section (example: testsnmp) for using SNMPv2.

Revision as of 16:36, 16 August 2013

This article shows the modules you need configured and loaded in order to monitor what happens in the server, especially when you have limited access to Yate (e.g. when Yate runs as daemon).

Meaning:

  • Eventslog accessed from Rmanager
  • SNMP data from Monitoring through YATE SNMP agent

Since you use or will use Yate, you'll need to check what happens inside the server at some point or another. The services Yate provides must be continuous, in order to avoid loss of calls or information (besides, who would want their lines to stop working right in the middle of a sales conference or a management meeting?).

Monitoring your system can be done in more ways than one, like many other things. This document reffers to the cases where your Yate runs as a daemon (for Linux users). This means that once it's started, you cannot communicate with it directly using a terminal.

The examples given in this document are from Mandriva 2010 spring OS, and Yate/YateClient 4.1.

What is monitoring

In this document, monitoring refers to using the two ways presented below in order to obtain running or debugging information as the system continues to run.
Of course, monitoring your software is quite a generic concept. Each Yate user has his/her own idea of what it means, depending of the existing configuration and the tools they prefer.
However, the basic notion of monitoring is that you follow what happens with your system in real time in order to debug or fix sometimes critical issues impending your activity.

Eventslog accessed from Rmanager

In order to monitor Yate through Eventslog, the following modules are needed:

   * eventlogs - found in /modules/server. Its configuration file is the eventlogs.conf, in the conf.d directory
   * rmanager - found in /modules. Its configuration file is rmanager.conf, also in conf.d. 

Eventlogs is a module that allows you to keep multiple logs when your Yate is daemonified, separated by specific criteria.

In order to load it when Yate starts you need to configure the eventlogs.conf from /conf.d directory. Here (eventlogs.conf) you set the path to the directory where you need the files to be created in, having log files depending of your specific configuration for creating them in the @@[mappings]@ section (e.g. linksets, trunks, links).

Now, in order to access the files while Yate is running, you need to use Rmanager, a module that makes possible the connection through Telnet to your Yate. The default configuration binds the localhost (127.0.0.1) and listens on port 5038 (you can change the configuration in rmanager.conf).

Type telnet 127.0.0.1 5038 in a terminal and this should follow:

[ana@localhost ~]$ telnet 127.0.0.1 5038
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
YATE 4.1.1-alpha1 (http://YATE.null.ro) ready on localhost.localdomain.

Let's say you want to check what modules are loaded. Modules list should do the trick:

module list 
lateroute*      ysnmpagent*     mgcpgw  monitoring*     cache   yradius   users*
pbxassist       heartbeat       analog  presence* park     callcounters    sipfeatures
accfile ysigchan        dbpbx     regfile register        mrcpspeech      queues* 
ccongestion       queuesnotify*   regexroute      wavefile        rmanager extmodule
ysipchan        ystunchan       h323chan        tonedetect        moh     callfork* 
pbx     yjinglechan     tonegen   ilbccodec*      yrtpchan        enumroute       analyzer
yiaxchan cdrbuild        callgen conference* isaccodec*      msgsniff  gvoice* dumbchan
filetransfer*   javascript*     openssl   cdrfile zlibcompress    ysockschan*     mux
subscription      cpuload sigtransport    ciscosm*        analogdetect    dbwave
mgcpca  clustering*     eventlogs       jabberserver jbfeatures

This way you can check if a module you need is loaded or not, you can restart it or stop it (depending on your needs). See here more on commands.

You can find out and ultimately control what happenned since Yate started. With logview /events log command all the messages from the point where Yate has started to present (so you can find out the uptime, for example).

logview 
Events: 132
Yate (5138) is starting Fri May 18 21:01:59 2012
Loaded module File Transfer
Loaded module DumbChannel
Loaded module Gvoice
…........

However, if what you are trying to fix an issue that has come up more recently, this might not be so useful, as you are looking for a more recent event, and Yate may have been working for days.

You can also check what events are stored in the specific logfiles you set using the command: events _logfilename_.

SNMP data from Monitoring through YATE SNMP agent

Simple Network Management Protocol (SNMP) is a protocol that regulates information passed on in order to monitor and manage your network. Yate offers SNMP information gathered by the monitoring module (when it's loaded) through the Ysnmpagent module.

A simplified and generic model of how SNMP works is that within nodes of a network, you can have managed devices (ranging from routers to printers) with SNMP agents (software) running on them, and the network management systems (NMSs) gather the information (on request or following an automated script, also they also follow traps and could trigger notifications).

The hierarchical structure of network information is expressed by OIDs (object identifiers), translated into readable labels in MIB (Management Information Base).

In order to monitor Yate through SNMP you need the following modules:

  • ysnmpagent - found in modules/server. Its configuration file is the ysnmpagent.conf, in the conf.d directory.
  • monitoring - also in modules/server. Its configuration file is monitoring.conf in the conf.d directory.

The minimal configuration in ysnmpagent.conf you need to set is:

  • port in the [general] section (example: 16001).
  • ro_community name in the [snmp_v2] section (example: testsnmp) for using SNMPv2.
Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers