SNMP
This channel can send SNMP v2c or SNMP v3 traps using the net-snmp Node.js library.
Purpose
Use this channel to forward alarm notifications as SNMP traps to external monitoring systems or collectors.
Supported SNMP version and transport
- SNMP version: v2c (default) or v3 (authPriv supported).
- Transport: UDP traps (sent using
net-snmp'strapmethod).
When version is set to v2c the community parameter must be provided; when version is v3 the username and authKey parameters are required.
SNMPv3 support (authPriv) is available. The implementation uses SHA for authentication and AES for privacy, and by default the same secret value is used for both authKey and privKey.
Channel parameters
The channel exposes configuration parameters. Choose the SNMP version below to view the parameters and which are required.
- SNMP v2c
- SNMP v3
| Parameter | Type | Required | Notes |
|---|---|---|---|
host | IP | Yes | Hostname or IP address of the SNMP trap receiver. Max length: 255. |
version | select | Yes | v2c (default). |
community | password | Yes when version = v2c | SNMP community string used for v2c. Max length: 255. |
trapPort | port | No | UDP port for traps (default shown in UI: 162). Range: 1–65535. |
These values are used to call net-snmp's createSession for SNMPv2c.
| Parameter | Type | Required | Notes |
|---|---|---|---|
host | IP | Yes | Hostname or IP address of the SNMP trap receiver. Max length: 255. |
version | select | Yes | v3. |
username | text | Yes when version = v3 | SNMPv3 user name. |
authKey | password | Yes when version = v3 | Used as both authKey and privKey in the current simplified implementation; used with SHA (auth) and AES (priv). |
trapPort | port | No | UDP port for traps (default shown in UI: 162). Range: 1–65535. |
These values are used to call net-snmp's createV3Session with authPriv security (SHA/AES).
OIDs and payload
The channel uses a small enterprise OID tree under 1.3.6.1.4.1.39695 (FRAFOS enterprise):
- Base enterprise OID:
1.3.6.1.4.1.39695 - Alarm/trap OID (sent as the trap OID):
1.3.6.1.4.1.39695.1 - Content varbind OID:
1.3.6.1.4.1.39695.2
When an alarm is sent the channel builds a single varbind with OID 1.3.6.1.4.1.39695.2 of type OctetString. The string value has this format:
[<severity>] <title> (<MONITOR_NAME>): <content>
where <MONITOR_NAME> comes from the server config value MONITOR_NAME.
Logging and errors
- On success the channel logs an info-level message with the host and trapPort:
notification sent. - On failure the channel logs an error including the error object and host/trapPort, and the send promise rejects with
Failed to send SNMP notification: <err>.
Example channel configuration (JSON)
Select the SNMP version to see an example payload for that mode.
- v2c example
- v3 example
{
"type": "snmp",
"name": "SNMP Target",
"params": {
"host": "10.0.0.5",
"community": "public",
"trapPort": 162
}
}
{
"type": "snmp",
"name": "SNMPv3 Target",
"params": {
"host": "10.0.0.5",
"version": "v3",
"username": "monitorUser",
"authKey": "verysecret",
"trapPort": 162
}
}
Testing locally
You can test receiving traps locally with snmptrapd. The snmp.ts file includes a suggested command to run a receiver on port 5161 for testing. A minimal command:
snmptrapd -Loe -f --snmpTrapdAddr=localhost:5161 --authCommunity="log public"
Then configure the channel host to localhost and trapPort to 5161 to verify traps are received.
Example expected trap content (illustrative):
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (58407) 0:09:44.07
SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.39695.1
SNMPv2-SMI::enterprises.39695.2 = STRING: "[critical] Alarm title (MyMonitor): Alarm body text"
Security notes
- The channel uses SNMP v2c community strings; protect the community value like any secret.
- Because traps are sent over UDP, ensure the target is reachable and that firewalls allow outbound UDP to the configured
trapPort. - If your environment requires authenticated and encrypted SNMP v3, add a v3-capable implementation instead of v2c.
MIB (download / view)
You can download or preview the FRAFOS MIB used by the SNMP channel. Place it in your SNMP manager's MIB directory to map the OIDs to friendly names.
Show/Download FRAFOS-MIB.mib
FRAFOS-MIB DEFINITIONS ::= BEGIN
--
-- FRAFOS-MIB
--
-- Minimal MIB describing the FRAFOS enterprise OID used by Monitor's SNMP channel.
-- This MIB provides:
-- * the enterprise node under 1.3.6.1.4.1.39695
-- * an alarm trap OID (1.3.6.1.4.1.39695.1)
-- * a content object (1.3.6.1.4.1.39695.2) used for an OctetString payload
--
-- Use this file with your SNMP manager/trap receiver for better symbol names.
--
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, enterprises, Integer32
FROM SNMPv2-SMI
TEXTUAL-CONVENTION, DisplayString
FROM SNMPv2-TC
OBJECT-GROUP, MODULE-COMPLIANCE
FROM SNMPv2-CONF;
frafos MODULE-IDENTITY
LAST-UPDATED "202510280000Z"
ORGANIZATION "FRAFOS / Monitor"
CONTACT-INFO
"
Email: support@example.invalid
"
DESCRIPTION
"MIB module for the FRAFOS enterprise OID used by the Monitor SNMP channel.
This is a minimal MIB suitable for documentation and basic manager mappings"
::= { enterprises 39695 }
frafosConformance OBJECT IDENTIFIER ::= { frafos 0 }
-- Objects and traps
frafosAlarm OBJECT IDENTIFIER ::= { frafos 1 }
-- Trap OID. Managers will see SNMPv2-MIB::snmpTrapOID.0 = enterprises.39695.1
frafosContent OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Free-form content string sent with an alarm. The Monitor SNMP channel
sends an OctetString varbind using this OID containing a formatted
message: [<severity>] <title> (<MONITOR_NAME>): <content>."
::= { frafos 2 }
-- Simple grouping for manager views
frafosObjects OBJECT-GROUP
OBJECTS { frafosContent }
STATUS current
DESCRIPTION
"A group containing the basic FRAFOS objects."
::= { frafosConformance 1 }
frafosCompliance MODULE-COMPLIANCE
STATUS current
DESCRIPTION
"Compliance statement for the FRAFOS MIB (minimal)."
MODULE -- this module
MANDATORY-GROUPS { frafosObjects }
::= { frafosConformance 2 }
END