Skip to content

Monitor the switch with SNMP

The switch answers SNMP v2c queries with live call counters: per environment, customer, account, vendor and connection, plus media relay statistics. Point Zabbix, PRTG, Nagios or any other SNMP tool at it to graph traffic and alert on drops. This page opens SNMP to your monitoring host and shows which OIDs to read. Allow 15 minutes.

  • You have root shell access to the switch over SSH. If you do not, ask FlySIP support to do steps 1 and 2.
  • You know the IP address of your monitoring host and have picked a community string, for example fs-monitor-7Qx.
  • Your monitoring host has the snmpwalk and snmpget tools (package net-snmp) for the test.

The SNMP agent answers only 127.0.0.1 until you add your host. The switch’s firewall opens UDP 161 only to hosts listed in the agent’s configuration.

  1. Open /home/ssp/etc/snmpd.conf on the switch. It already has the line that serves the switch’s statistics:

    pass_persist .1.3.6.1.4.1.36523 /home/ssp/scripts/snmp_statsd.py
  2. Add a line with your community string and the monitoring host:

    rocommunity fs-monitor-7Qx 198.51.100.20
  3. Restart the agent and reload the firewall rules. Run the firewall script inside screen, so that a dropped SSH session does not interrupt it:

    Terminal window
    /usr/local/etc/rc.d/snmpd restart
    screen /home/ssp/scripts/rc.firewall.sh

Result: UDP 161 of the switch accepts queries from 198.51.100.20 with this community.

The OIDs below work without a MIB. To see names instead of numbers in your tool, copy the MIB file that ships in /home/ssp/etc/ on the switch to the MIB directory of your monitoring host, for example /usr/share/snmp/mibs/. Ask FlySIP support if you cannot find it.

All OIDs start with .1.3.6.1.4.1.36523.1.1. Walk the tree from your monitoring host:

Terminal window
snmpwalk -v2c -On -c fs-monitor-7Qx 203.0.113.10 .1.3.6.1.4.1.36523.1.1
.1.3.6.1.4.1.36523.1.1.1.1.1.1 = STRING: "1/Primary/"
.1.3.6.1.4.1.36523.1.1.1.2.1.1 = INTEGER: 42
.1.3.6.1.4.1.36523.1.1.1.3.1.1 = INTEGER: 37

The OID is .1.3.6.1.4.1.36523.1.1.1.<n>.1.<i_environment>.

<n> Value
1 ID and name of the environment, for example "1/Primary/"
2 Active calls: calls being routed plus connected calls
3 Connected calls
4 Average ptime of the call processor
5 Average aa_ptime of the call processor
6 Average number of authorized calls
7 Average number of routed calls
8 Average number of connected calls
9 Number of authorized calls, counter
10 Number of routed calls, counter
11 Number of connected calls, counter
12 Total duration of calls, counter
13 Number of received calls, counter
14 Number of originated calls, counter
15 Number of registered devices

The ID of the root environment is 1. Other environments have the IDs shown under System Management → Environments.

Per account, customer, vendor and connection

Section titled “Per account, customer, vendor and connection”

The OID is .1.3.6.1.4.1.36523.1.1.<object>.<n>.1.<i_environment>.<id>, where <n> is 2 for active calls and 3 for connected calls.

<object> Object <id>
2 Account i_account
3 Vendor i_vendor
4 Connection i_connection
5 Customer i_customer

For example, active calls of connection 64 in environment 1:

Terminal window
snmpget -v2c -On -c fs-monitor-7Qx 203.0.113.10 .1.3.6.1.4.1.36523.1.1.4.2.1.1.64
.1.3.6.1.4.1.36523.1.1.4.2.1.1.64 = INTEGER: 52

The IDs are in the panel: open the object and look at the i_… value in the address bar, or read them with the API.

OID Value
.1.3.6.1.4.1.36523.1.1.6.1 Calls with SDP on both legs but RTP on one leg only
.1.3.6.1.4.1.36523.1.1.6.2 Calls with a media description on one leg only
.1.3.6.1.4.1.36523.1.1.6.3 Calls with SDP on both legs and no RTP on either
.1.3.6.1.4.1.36523.1.1.6.4 Discarded RTP and RTCP packets, usually from unknown sources

A growing one-way or no-RTP count points to NAT or firewall problems on the media path.

  1. Run the snmpwalk command from step 3 on the monitoring host. It prints the environments.
  2. Make a test call and run snmpget for the environment’s active calls (<n> = 2). The value goes up by one while the call is up.