The platform uses both systemd and monit daemons to monitor all
essential services. Since Sipwise C5 runs in an active/standby mode, not
all services are always running on both nodes, some of them will only run
on the active node and be stopped on the standby node. The following commands
show the most critical services on the platform:
ngcp-service summary - to get the list of services and their current status,
systemctl status - to get a tree of the services running,
systemctl list-units - to get a list of the service states,
monit summary - to get the list of services known to monit and their current status,
monit status - to get the list of services known to monit with detailed status.
When you perform a stop/start/monitor/unmonitor operation on a service, monit affects other services that depend on the initial one. Hence, if you stop or unmonitor a service all services that depend on it will be stopped or unmonitored as well.
monit stop mysql operation will stop kamailio, sbc, asterisk,
prosody and some other services. Although the recommended way to operate on
services is via the
ngcp-service wrapper which will take care of
abstracting the underlying process monitoring implementation.
If any service ever fails for whatever reason either the systemd or
monit daemons will quickly restart it. When that happens, the daemon will
send a notification email to the address specified in the
general.adminmail key. It will also send warning emails to this
address under certain abnormal conditions, such as high memory consumption
(> 75% is used) or high CPU load.
In order for monit to be able to send emails to the specified address, the local MTA (exim4) must be configured correctly. The CE edition’s handbook contains more information about this in the Installation chapter.
The platform uses the internal telegraf service to monitor many aspects of the system, including CPU, memory, swap, disk, filesystem, network, processes, NTP, Nginx, Redis and MySQL.
The gathered information is stored in InfluxDB, in the telegraf database.
The platform uses the internal ngcp-witnessd service to monitor Sipwise C5 specific metrics or system metrics currently not tracked by telegraf, including memory, process count, Heartbeat, MTA, Kamailio, SIP and MySQL.
The gathered information is stored in InfluxDB, in the ngcp database.
The platform uses InfluxDB as a time series database, to store most of the metrics collected in the system.
On a Sipwise C5 each node stores its own metrics and the ones for their peer node, and the management nodes store the metrics for all the nodes in the cluster. This is done via influxdb-relay which listens for InfluxDB writes and multiplexes them to the local node and any other node necessary.
The monitoring data is used by various components of the platform, including ngcp-collective-check, ngcp-snmp-agent and by the statistics dashboard powered by Grafana.
The monitoring data can also be accessed directly by various means; by using the influx command-line tool in CLI or TUI modes; by using the ngcp-influxdb-extract wrapper which provides two convenience commands to run arbitrary queries or to fetch the last value for a measurement’s field; or by using the HTTP API with curl (or other HTTP fetchers), or with the Sipwise::InfluxDB::HTTP perl module.
See https://docs.influxdata.com/influxdb/v1.1/query_language/spec/ for information about InfluxQL, the query language used by InfluxDB.
To get the list of all measurements for a specific database the following
query can be used
To get the list of fields for a specific measurement the following query
can be used
To get the list of tags for a specific measurement the following query
can be used
See Section 2.1, “InfluxDB monitoring keys” for detailed information about the list of data currently stored in the InfluxDB ngcp monitoring database.
The platform’s administration interface (described in Section 4, “VoIP Service Configuration Scenario”) provides a graphical overview based on Grafana of the most important system health indicators, such as memory usage, load averages and disk usage. VoIP statistics, such as the number of concurrent active calls, the number of provisioned and registered subscribers, etc. is also present.
The Sipwise C5 exports a variety of cluster health data and statistics
over the standard SNMP interface. By default, the SNMP interface can only be
accessed locally. To make it possible to provide the SNMP data to an external
config.yml file needs to be edited and the list of allowed
community names and allowed hosts/IP ranges must be populated. This list can be
found under the
checktools.snmpd.communities key and it consists of one or
source value pairs. The
community is the allowed
community name, while
source is an IP address or an IP block where to allow
the requests from.
The SNMP notifications can also be configured in a similar way, to send them
to an external system, by populating the
target value pairs. The
community is the value
that will be used when sending the trap, while the
target is an IP address
where to send the trap.
public entries with the
localhost source and target are used for
local testing of SNMP functionality. It is recommended that you leave these
entries in place. Other legal
sources can be formed as single IP addresses
or IP blocks in IP/prefix notation, for example
targets can be formed as single IP addresses.
To locally check if SNMP is working correctly, execute the command
To locally check if SNMP notifications (or traps) are working correctly,
install the snmptrapd package, which will be configured by default to
catch the traps sent by the localhost SNMP agent. The traps will show up on
INFO: SNMP version 1 and version 2c are supported.
There are two types of information that can be retrieved from SNMP. The first one is the native Sipwise C5 cluster overview from Sipwise C5 MIBs (Management Information Bases). The second is the legacy ad-hoc information using the Net-SNMP extension OIDs, and detailed information for the node running the SNMP daemon using standard OIDs (Object Identifiers).
The entire Sipwise C5 cluster can be monitored by using the
SIPWISE-NGCP-STATS-MIB. These OIDs are
rooted at Sipwise C5 slot
The MIBs are self-documented, and can be found as part of the
ngcp-snmp-mibs package (running
dpkg -S SIPWISE*MIB will list their
pathnames). The Sipwise C5 SNMP Agent is a part of the
ngcp-snmp-agent package, which is installed by default and works
out-of-the-box as long as the snmpd has been properly configured.
SIPWISE-NGCP-MIB acts as the root MIB and provides information
about the cluster licensing and layout (which is mostly static data about
each node, such as node name, its IP address, its roles, etc.) and information
required to access the OIDs from the other MIBs.
SIPWISE-NGCP-MONITOR-MIB provides current monitoring information,
global health conditions, the number of provisioned and registered subscribers
and devices. It also provides per node information (independently of the number
of nodes or their names) on their filesystem, processes, databases, system load,
memory, heartbeat status, MTA queues, etc.
SIPWISE-NGCP-STATS-MIB provides accumulated statistics on billing,
performance and processed SIP messages.
NOTICE: OIDs under the following trees are not yet implemented: ngcpMonitorFraud, ngcpMonitorPerformance.perfCAPSCurTable and ngcpStats.
INFO: The Sipwise C5 SNMP Agent uses Redis and InfluxDB as data sources. This data is essential for accurate and complete monitoring data in the SNMP OID tree. In addition, the Redis database must be available on a shared IP address, so that ngcp-witnessd can always write to it.
The following OIDs have been superseded by Sipwise C5 OIDs, but they are still provided for backwards compatibility.
All basic system health variables (such as memory, disk, swap, CPU usage,
network statistics, process lists, etc.) for the mgmt node can be found
in standard OID slots from standard MIBs. For example, memory statistics
can be found through the UCD-SNMP-MIB in OIDs such as
memAvailReal.0, etc., which
translate to numeric OIDs
.220.127.116.11.4.1.2021.4.*. In fact,
UCD-SNMP-MIB is the most useful MIB for overall system health checks.
Additionally, there’s a list of specially monitored processes, also
found through the
.18.104.22.168.4.1.2021.2.1.2) gives the list of monitored processes,
.22.214.171.124.4.1.2021.2.1.5) is how many of each process are
.126.96.36.199.4.1.2021.2.1.100) gives a 0/1
error indication (with
providing an explanation of any error).
Some of these processes are not supposed to be running on the standby node, so you’ll see the error flag raised there. A possible solution is to run these SNMP checks against the shared service IP of the cluster.
UCD-SNMP-MIB provides a list of custom external checks.
The names of these can be found under the
.2) tree, with
.101) providing the output (one
line) from each check and
.100) the exit code from
The first of these external checks called
a combined and overall system health status indicator. It gathers
information from both nodes and returns 0 in
.100.1) if everything is OK and running as it should. If it finds
a problem somewhere, but with the system still operational (e.g. a
service is stopped on the inactive node),
extResult.1 will return
extOutput.1 will be set to a string that can be used to
diagnose the problem. In case the system is found in a critical and
extResult.1 will return 2, again with
an error message set. If you want to keep it really simple, you can
just monitor this one OID and raise an alarm if it ever goes to non-zero.
INFO: The 0/1/2 status codes allow for easy integration with Nagios.
The remaining external checks simply return statistics on the system,
they all return a number in
extOutput and have
set to zero.
The full list of such checks is below. All of these checks have three modes:
the first returns the statistics from
sp1 (the first node in
Sipwise C5 pair), the second - from
and the third - from whichever node is being queried (which is useful when
querying the shared service IP). For example, the local SIP response time from
sp1 is in
sp2 - is in
from the host itself - is in
The base OID of the Result and Output OIDs is always
so if you read
.100.1, the full OID is
|Name in MIB||Result OID||Output OID||Name||Description|
Summarized platform check
SIP response time in seconds on sp1
SIP response time in seconds on sp2
Average number of MySQL queries per second on sp1
Average number of MySQL queries per second on sp2
MySQL replication delay in seconds on sp1
MySQL replication delay in seconds on sp2
RAID status on sp1
RAID status on sp2
Number of mails undelivered in MTA queue on sp1
Number of mails undelivered in MTA queue on sp2
Number of subscribers provisioned on sp1
Number of subscribers provisioned on sp2
Number of active calls on sp1
Number of active calls on sp2
Number of calls in Early Media state on sp1
Number of calls in Early Media state on sp2
Number of active calls local on sp1
Number of active calls local on sp2
Number of active calls routed via peers on sp1
Number of active calls routed via peers on sp2
Number of incoming calls on sp1
Number of incoming calls on sp2
Number of outgoing calls on sp1
Number of outgoing calls on sp2
Number of subscribers with at least one active registration on sp1
Number of subscribers with at least one active registration on sp2
Total number of registered end devices on sp1
Total number of registered end devices on sp2
Number of MySQL tables not in sync between sp1 and sp2
Number of MySQL tables not in sync between sp1 and sp2
Summarized platform check on active node
Average number of MySQL queries per second on active node
MySQL replication delay in seconds on active node
RAID status on active node
Number of mails undelivered in MTA queue on active node
Number of subscribers provisioned on active node
Number of subscribers with at least one active registration on active node
Total number of registered end devices on active node
Number of MySQL tables not in sync between sp1 and sp2
Number of active local calls on active proxy X
Number of active calls routed via peers on active proxy X
Number of incoming calls on active proxy X
Number of outgoing calls on active proxy X
Number of active calls on active proxy X
Number of calls in Early Media state on active proxy X
Some of the checks can be disabled (most are enabled by default)