DumbMonit

IntegrazioniRete e firewall

Monitorare pfSense con DumbMonit

A pfSense firewall through its REST API package: gateways down or losing packets, interfaces without link, stopped services, CPU, memory and disk.

DocumentazioneSito ufficiale: pfSense

Le descrizioni sono in inglese, come nel prodotto. Le etichette della pagina seguono la tua lingua.

Cosa controlla DumbMonit

A pfSense firewall through the community REST API package (pfSense-pkg-RESTAPI, version 2): gateways that are down, lose packets or answer slowly, enabled interfaces without link, enabled services that stopped, and CPU, memory, disk and temperature. DumbMonit sends an API key in the X-API-Key header. A key carries exactly the privileges of the pfSense user it belongs to: the dumbmonit user below holds only the GET privileges of the five pages DumbMonit reads, so the key can read those pages and change nothing. Every minute DumbMonit reads, in parallel, /api/v2/status/system, /api/v2/status/gateways, /api/v2/status/interfaces, /api/v2/status/services and /api/v2/system/version, and, if the…

Uso tipico. Firewall: gateways down or lossy, interfaces without link, stopped services

Esempi

  • pfSense CE
  • pfSense Plus
  • Netgate appliance

Come si collega

Cosa serve

  • REST API keyThe key created for the dumbmonit user: it carries only that user's read privileges.

Porte di rete da aprire

  • 443/TCPAPI (HTTPS, default)
  • 80/TCPOnly with the HTTP protocol option
Passaggi di configurazione: Create a read-only REST API key for DumbMonit
  1. Install the pfSense-pkg-RESTAPI package (version 2) from Diagnostics → Command Prompt, with the file matching your pfSense version (2.7.2 below).

    pkg-static add https://github.com/pfrest/pfSense-pkg-RESTAPI/releases/latest/download/pfSense-2.7.2-pkg-RESTAPI.pkg
  2. System → REST API → Settings: tick both BasicAuth and Key among the authentication methods.

  3. System → User Manager → Users → Add: create the user dumbmonit with a long random password.

  4. Edit the user and, under Assigned Privileges, add the privileges listed below.

  5. Create the key as dumbmonit, copy the key value of the answer, then remove the POST privilege again.

    curl -k -u dumbmonit -X POST -H 'Content-Type: application/json' -d '{"descr":"DumbMonit"}' https://pfsense.lan/api/v2/auth/key
  6. In DumbMonit, enter the pfSense address (pfsense.lan) and paste the key as API key.

Attenzione. The REST API package is a community project, not part of pfSense: reinstall it after each pfSense upgrade. pfSense ships a self-signed certificate: tick "Accept an unverifiable certificate" unless you replaced it.