This module is still under development, and by no means intended to be a complete read/write SNMP interface.
Reserved Object Identifier (OID)
Currently, all attributes are read-only, and are as follows:
- .1: core
- .1.1: identity
- .184.108.40.206.4.1.278220.127.116.11: FreeSWITCH version string (eg. "1.0.head (git-0cf1d54 2011-01-19 16-36-04 -0500)")
- .18.104.22.168.4.1.27822.214.171.124: Core UUID as a string
- .2: systemStats
- .126.96.36.199.4.1.278188.8.131.52: FreeSWITCH uptime as SNMP TimerTicks (hundredths of seconds)
- .184.108.40.206.4.1.278220.127.116.11: Number of sessions since FreeSWITCH was started
- .18.104.22.168.4.1.27822.214.171.124: Currently active sessions
- .126.96.36.199.4.1.278188.8.131.52: Maximum allowed sessions
- .184.108.40.206.4.1.278220.127.116.11: Currently active calls
- .18.104.22.168.4.1.27822.214.171.124: Current sessions per second
- .126.96.36.199.4.1.278188.8.131.52: Maximum allowed sessions per second
- .184.108.40.206.4.1.278220.127.116.11: Peak sessions per second
- .18.104.22.168.4.1.27822.214.171.124: Peak sessions per second Last Five Minutes
- .126.96.36.199.4.1.278188.8.131.52: Peak sessions
- .184.108.40.206.4.1.278220.127.116.11: Peak sessions Last Five Minutes
- .1.1: identity
Management information base (MIB)
The MIB can be viewed in FishEye. Developers will do their best to maintain backwards compatibility with regards to OIDs in the MIB, however since this module is in the early stages of development, some OIDs may change. Please use the MIB and object names, rather than hard-code OIDs in your NMS (eg. MRTG, Cacti etc) configuration.
Integration with SNMP server
The module acts as a Agent X subagent. This means it registers with your existing SNMP server to handle a specific OID, so can monitor your system and FS with a single daemon. This is a far more optimal approach than older approaches execute fs_cli to query the FreeSWITCH status via ESL.
Configuring Net-SNMP for AgentX Subagent Support
Your main snmpd will need to run as a master agent, so that mod_snmp can connect to it as a subagent over a named socket. Using the agentXPerms, make sure that you set the permissions and ownership such that your freeswitch user will be able to read/write to it.
Note that some earlier versions of Net-SNMP did not honor the agentXPerms config directive. If you find this happening, you will need to modify your snmpd init script to manually change the permissions/ownership of the socket after snmpd has started. If this is the case you'll see "Failed to connect to the agentx master agent" in the logs and /var/agentx/master will probably be owned by root:root instead of freeswitch:daemon.
Most default configurations of Net-SNMP only allow a restricted view of the whole tree. The systemonly view is usually defined as OIDs .18.104.22.168.2.1.1 and .22.214.171.124.126.96.36.199. If you want to allow external hosts (or even localhost) to view the entire tree, you will need to modify the security/view parameters in snmpd.conf. Near the top of your snmpd.conf you should find the following:
Uncomment that line to allow localhost to view the entire tree (including the FreeSWITCH OID). If you wish to allow external monitoring hosts, such as MRTG, Cacti etc view more than just the systemonly view, you will need to further modify the security configuration. This procedure is outside the scope of this Wiki page, and can be found described in the manpage for snmpd.conf.
Note that to monitor snmp from external hosts, you may also need to check that snmpd is binding to either 0.0.0.0 or a specified IP address. In the interests of security, many distros only bind snmpd to 127.0.0.1.
You need to install "net-snmp-devel" or "net-snmp-dev" package and have "openssl-devel" (or openssl-dev) to be able to compile this module.
Debian is missing MIBs for SNMP. To install them, add the non-free aptitude sources to /etc/apt/sources.list
Then install snmp-mibs-downloader
Testing with snmpwalk
If you have 'rocommunity public localhost' in your snmpd.conf you can test with snmpwalk. Walk the whole tree: