GUIDES › TrapWatch

Other languages English · 日本語 · 한국어 · 简体中文

TrapWatch

SNMP trap receiver with on-device anomaly detection — 0.1.8

In this version

Full release notes

1. Install

Pick the build for the machine you are installing on. Every file below is the current release; older versions are listed on the release notes page.

Verify what you downloaded. The published checksums are at TrapWatch-SHA256SUMS.txt

On macOS or Linux:

shasum -a 256 TrapWatch-0.1.8-arm64.dmg

On Windows:

Get-FileHash -Algorithm SHA256 TrapWatch-0.1.8-x64.exe

The macOS build is notarised by Apple, so it opens without a warning. The Windows installer is Authenticode-signed and timestamped. The certificate is new, so SmartScreen may still show a warning until it has built reputation — if it does, choose More info → Run anyway (what the screen means and how to check the publisher).

2. First run

  1. TrapWatch listens on UDP port 1162 by default. 162 is the standard trap port but it is below 1024 and needs administrator or root privileges; 1162 does not, so the application starts as an ordinary user.
  2. On each device that should report — switch, router, firewall, UPS — set the SNMP trap destination to this machine’s IP address and port 1162. If a device cannot be given a port other than 162, change the port in Settings → Receiving and grant the privilege instead.
  3. Traps appear as they arrive. There is no device list to fill in first: anything that reaches the port is accepted, and a device you did not know about shows up the moment it speaks.
  4. If nothing arrives, the firewall is the usual reason; see Troubleshooting. The top of the window always says which port it is actually listening on, and says so in red if it could not bind one.

Every install starts with a 30-day trial of the paid edition. Nothing is asked for up front — no card, no account, no email address.

3. Administration

Status summary

From 0.1.7 the top of the window is a status summary. Tiles are grouped: the listener (port, received, rejected); today’s traps by severity and by type (linkDown, linkUp, coldStart, warmStart, authenticationFailure) and traps whose OID is not in the built-in MIB; senders and senders that have gone quiet; rules fired, shown once you have a rule or one has fired; and Central delivery when Central is configured. Below the tiles are two tables: Recent findings, which replaces the earlier “What looks unusual” strip, and Needs attention. Click a tile to filter both tables and the trap list below (the list then says how many of its traps are shown); click it again, or the × on the filter chip, to clear. One filter applies at a time. Zero is shown in grey, not red; until the first trap arrives you still see the first-run guidance. A trap rejected because its community string did not match is counted on the Rejected tile and listed under Needs attention — the string itself is never shown. The summary refreshes every minute; the rules-fired count starts from zero when the app starts.

Community strings

Left blank in Settings → Receiving, community strings are not checked and every trap that reaches the port is accepted. Fill them in and non-matching traps are counted as rejected rather than silently dropped, so the screen can tell you the difference between “nothing is arriving” and “everything is being refused”. Note that in SNMP v1 and v2c the community string travels in clear text — treat it as a filter, not as security.

SNMP versions

v1 and v2c. v3 traps are not accepted: v3 needs per-device engine IDs and credentials, which would require exactly the device registry this product deliberately does without.

Anomaly detection

Runs inside the application on this machine. Nothing is uploaded and no model is downloaded. It reports three things: a link that goes up and down repeatedly (counting direction changes, not trap volume), a device sending a kind of trap far more often than its own history says it should, and a device or trap OID seen for the first time. It stays silent until it has a baseline — about half an hour — because on the first run everything is new and an alert that fires for everything teaches you to ignore alerts.

Alert rules

Rules cover what you already know to look for; detection covers what you do not. A rule matches on source address, trap name or OID, and a minimum severity. Repeat suppression is keyed to the rule and the device, so one noisy switch cannot bury the same event happening on another one.

Unknown traps

Vendor-specific traps are shown by their OID exactly as received. TrapWatch does not invent a description for a trap it does not recognise — a plausible-sounding guess sends you looking in the wrong place.

Retention

Traps are written to this machine, one file per day, and are never deleted to enforce a plan. Settings → Retention is yours to set; 0 means keep everything. Any of it can be exported to CSV.

Language

Settings → Interface language. English, Japanese, Korean and Simplified Chinese, switchable while it runs. What a device sent — its address, the trap OID, the interface name — is never translated.

Updates

From 0.1.7, Settings → Updates. Once a day TrapWatch asks meshwatch.app which version is current and tells you when a newer one is out — nothing is downloaded or installed automatically, and nothing about you, your devices or your traps is sent. Check now asks straight away. Turn the daily check off with the box there or from the Help menu; for fleet deployments the policy switches MESHWATCH_DISABLE_UPDATE_CHECK=1 (environment variable) or a no-update-check file in the data folder lock it off. On the desktop the check follows your system proxy settings and certificate store.

Start-up signals

From 0.1.7, three times over the life of an installation — on first start, after 60 seconds, and when the first trap is accepted — TrapWatch sends one small request to meshwatch.app. It carries only the product name, version, whether it runs in server mode and the operating-system family: no identifier, account or trap data, and the site keeps daily totals only. A trap rejected for its community string does not count as the first trap. Turn it off with Settings → Updates → Send anonymous start-up signals; the policy switches above turn the signals off as well. See the Privacy Policy.

Where your data lives

Everything TrapWatch records stays on the computer it runs on. None of it is sent to us, to an analytics company or to an advertising network.

Licence keys

The key arrives by email after purchase. It is checked on this computer, so TrapWatch never contacts a licensing server — it activates on a network with no way out. When the 30-day trial ends, traps already received stay readable; only receiving new traps stops. No alerts or Central reports go out while it is stopped; enter a key and receiving starts again straight away.

Licence agreement

From version 0.1.6, TrapWatch shows the MeshWatch Software Licence Agreement before first use: a window with the agreement, a box I have read and agree to the licence agreement, and I agree / Quit. Nothing is created until you agree — Quit leaves no data behind. Your acceptance is saved in the app’s data folder, so it is asked once, and again only if the agreement changes. From 0.1.7 the Windows installer shows the agreement and records your acceptance, so the first start does not ask again; the portable Windows builds ask on first start. The macOS disk image no longer shows the agreement — the app asks on first start. Read it again any time under Help → Licence agreement, at meshwatch.app/eula, or on Linux in /opt/TrapWatch/EULA.txt.

Headless. The systemd unit installed next to trapwatch-headless starts it with --accept-eula, so installing or enabling the unit means you accept the agreement. Started by hand without the flag, it receives nothing yet and the web UI shows the agreement first; to accept from the command line, run /opt/TrapWatch/trapwatch-headless --accept-eula. The acceptance is recorded in eula.json in the data folder.

4. Firewall

5. Run on a server without a desktop (server mode)

The desktop app needs a graphical session. On a Linux server without one it does not start and prints Missing X server or $DISPLAY. For that case the Linux .deb also includes a server mode (headless): it receives, decodes, stores and alerts the same way, with the same screen served to your browser instead of a window — over HTTPS, behind a username and password. From 0.1.6 the console uses accounts; the one-time token link of 0.1.5 is gone (see upgrading below). The AppImage does not include it.

Try it in the foreground

Install the .deb — the package manager pulls in the libraries it needs — then start the wrapper installed next to the app. Nothing is received until the licence agreement is accepted, so pass --accept-eula:

sudo apt install ./TrapWatch-*-amd64.deb
/opt/TrapWatch/trapwatch-headless --accept-eula

It prints the console address, the certificate fingerprint and whether an account exists yet:

console  https://traps01:8162/
         https://192.168.1.30:8162/
certificate  self-signed (~/.config/TrapWatch/tls/cert.pem)
         SHA-256 3A:1F:...:C4
accounts NONE YET — create the first administrator: ...

Send a test trap from the same machine (snmptrap is in the net-snmp tools: apt-get install snmp or dnf install net-snmp-utils):

snmptrap -v 2c -c public 127.0.0.1:1162 '' 1.3.6.1.6.3.1.1.5.3 \
    1.3.6.1.2.1.2.2.1.1.1 i 1 1.3.6.1.2.1.2.2.1.2.1 s "eth0"

That is a linkDown for interface 1; it shows up as “Link down” on eth0 once you are signed in.

Create the first administrator

Nobody can sign in until an administrator exists, and for safety the first one can only be created from the server itself — otherwise anyone on the network could claim it before you. Either open https://localhost:8162/ in a browser on the server, or tunnel to it from your PC and open the same address there:

ssh -L 8162:127.0.0.1:8162 user@server

Or create it on the command line (it asks for the password twice and does not show it; at least 12 characters). For a service, run it as the service user with the service’s data folder:

sudo -u trapwatch TRAPWATCH_DATA_DIR=/var/lib/trapwatch/TrapWatch /opt/TrapWatch/trapwatch-headless --create-admin admin

Open the console from your own computer

The console listens on all interfaces, so https://<server>:8162/ opens from any browser on your network. Open TCP 8162 (the console) and UDP 1162 in the server’s firewall if it has one (RHEL: firewall-cmd --add-port=8162/tcp --permanent, then --reload):

sudo ufw allow 8162/tcp && sudo ufw allow 1162/udp

The certificate is self-signed, so the browser warns that it does not know it. Open the certificate details, check that its SHA-256 fingerprint is the one printed at start (the sign-in page shows it too), then continue and sign in with the administrator account. A plain http:// address on the same port is redirected to https://. To keep the console on one address, add --ui-host <address>; trapwatch-headless --show-url prints the address and the fingerprint again.

Accounts and roles

Administrator: everything — settings (port, community strings), alert rules, the licence, Central, accounts. Viewer: sees traps, the summary and anomalies and exports CSV, but cannot change anything — the server refuses it and the screen says so. Viewers see the settings with each community string shortened to its first character and the SMTP user name and password left out. Add people in the console under Accounts (top right), or on the server, as the service user with the same data folder as above:

trapwatch-headless --add-user alice --role viewer
trapwatch-headless --list-users
trapwatch-headless --reset-password alice

--reset-password is for a forgotten password; it signs that person out everywhere. Sessions end after 12 hours without activity, on Sign out, and when the service restarts. Ten failed sign-ins a minute from one address, or five in a row for one account, lock further attempts for a while. Passwords are stored only as scrypt hashes (users.json, mode 0600).

Run it as a service

A systemd unit is installed next to the wrapper; it starts the service with --accept-eula, so installing and enabling it means you accept the agreement. Create a service user, copy the unit and start it:

sudo useradd --system --home /var/lib/trapwatch --create-home --shell /usr/sbin/nologin trapwatch
sudo cp /opt/TrapWatch/trapwatch-headless.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now trapwatch-headless

The console address and the certificate fingerprint are printed in the journal: sudo journalctl -u trapwatch-headless. Create the first administrator as the service user (command above), then sign in from your PC.

Port 162

TrapWatch listens on UDP 1162 by default, which any user may open. If devices can only send to 162, change the port to 162 in Settings, uncomment the AmbientCapabilities=CAP_NET_BIND_SERVICE line in /etc/systemd/system/trapwatch-headless.service, and restart the service:

sudo systemctl daemon-reload
sudo systemctl restart trapwatch-headless

If the port cannot be opened, the reason is in the journal as well as at the top of the screen.

Behind a corporate proxy

Server mode makes two kinds of outbound request, both to meshwatch.app: the once-a-day check for a newer version and the three start-up signals. Receiving and the console are inbound and need no proxy. From 0.1.7, if the server reaches the Internet only through a proxy, uncomment the two Environment= lines in /etc/systemd/system/trapwatch-headless.service and put in your proxy:

Environment=HTTPS_PROXY=http://proxy.example.com:3128
Environment=NO_PROXY=localhost,127.0.0.1

Then run sudo systemctl daemon-reload && sudo systemctl restart trapwatch-headless. Nothing changes while the lines stay commented. To stop both requests altogether, add Environment=MESHWATCH_DISABLE_UPDATE_CHECK=1 to the unit or create a no-update-check file in the data folder.

HTTPS

The self-signed certificate lives in <data folder>/tls (cert.pem, key.pem, mode 0600). It is valid for 825 days and is replaced automatically 30 days before it expires — the log then says the fingerprint is new. Your own certificate: --cert /path/fullchain.pem --key /path/privkey.pem (the service user must be able to read both); the fingerprint shown is then that certificate’s. --insecure-http serves plain HTTP — use it only behind an HTTPS reverse proxy (nginx, Caddy) on the same machine, together with --ui-host 127.0.0.1. Requests that arrive through a proxy never count as “this machine”, so create the first administrator with --create-admin.

Upgrading from 0.1.5 (token sign-in)

0.1.5 opened the screen with a one-time token (ui-token in the data folder). That token no longer opens anything; the console now uses accounts, and the journal says so on the first start. Create the first administrator as above and sign in with it — settings, data and the licence are kept. Your existing unit file in /etc/systemd/system still says --ui-host 127.0.0.1, so the console stays on that machine until you remove the option (the new unit file no longer has it, and it adds --accept-eula). If you put an HTTPS reverse proxy in front as 0.1.5 suggested, either point it at https://127.0.0.1:8162 — the console now speaks HTTPS itself — or add --insecure-http to keep plain HTTP behind the proxy.

Where the data lives

As a service: /var/lib/trapwatch/TrapWatch — traps, settings, the licence, the accounts (users.json) and the certificate (tls/). Run by hand, server mode uses the same folder as the desktop app for that user (~/.config/TrapWatch), so a licence activated in one is active in the other. The service runs as its own user, so enter the licence key once in its console.

A server has no keyring, so the licence key, alert rules and Central token are stored as files readable only by the service user (mode 0600); settings.json, which holds the community strings, is written with mode 0600 as well. There is no desktop to notify: a rule that would raise a desktop notification writes one line to the journal instead. MeshWatch Central works as on the desktop and is the alert path on a server.

The full notes are in README-headless.txt next to the wrapper; trapwatch-headless --help lists the options.

6. Connect to MeshWatch Central

Optional. Central gathers alerts from several products into one inbox and correlates them by device. Only the severity, the source address and a one-line summary are sent to Central. The varbinds are never sent — a device can put anything in them — and neither is the community string, which is effectively a password.

Requires Central 1.3.4 or newer. Older Central versions do not have TrapWatch in their Agents list, so there is no way to issue a token for it.

  1. In Central, open Agents, choose TrapWatch, type any label you like — it is just a name to tell installations apart — and press Issue token. The token is shown once.
  2. Pick TrapWatch in that dropdown. A token belongs to the product it was issued for, and Central files every report under that product rather than under the application that sent it. A TrapWatch installation given another product’s token connects and reports successfully, and its data appears under the other product while the TrapWatch view stays empty — with no error at either end.
  3. In TrapWatch, open the MeshWatch Central settings and enter Central’s address as http://<central-server>:8443 and the token. Use the server’s address, not localhost, unless Central runs on this same machine.
  4. Tick the box that sends alerts to Central, save, then press Test connection. It should report success.

Alerts raised from then on appear in Central. Past alerts are not backfilled. The full walkthrough is in the MeshWatch Central guide.

7. Troubleshooting

Nothing is arriving

The firewall is the usual reason — see section 4. After that, check that the device is pointed at this computer’s current local IP address; a DHCP lease can move it.

Test connection to Central fails

bad-token means the token is wrong or was revoked — issue a new one. unreachable means the address is wrong or a firewall is in the way; port 8443 must be open on the Central server. Note it is http://, not https://, unless you put a reverse proxy in front of Central. wrong-product means the token was issued for a different product; the message names which one. Issue a token for TrapWatch instead and revoke the other. If the address looks right but Central is still unreachable, check it for a typo: most mistyped addresses are still valid addresses — 127.0.0.01 is read as 127.0.0.1 and 192.168.001.5 as 192.168.1.5 — so the connection quietly goes somewhere else. In the current releases these results are shown as sentences — a token Central refuses is explained as possibly revoked or issued by a different Central — and the code itself appears when you hover over the message.

Central shows this agent as “connected”, but nothing arrives

That is not a failure. connected means the test succeeded and nothing has been sent yet; the row switches to reporting on the first real report, because a product sends only when something happens. TrapWatch switches to reporting when the first trap actually arrives. A row still reading waiting has never reached Central.

It prints Missing X server or $DISPLAY on a Linux server

That is the desktop app asking for a screen; nothing is wrong with the install. Run it from a desktop session, or on a server without one use the headless mode — see section 5.

Problems that affect every product

A blank window after upgrading, Ubuntu 24.04 refusing to start the app, credentials stored as plain text on Linux without a keyring, alert email not being delivered — these are the same on every product and are collected on the support page.

Still stuck

Write to support@meshwatch.app with the version number and what you expected to happen. First reply within two business days, Monday to Friday.