**License: Pro** - Requires a Pro or Enterprise license.
**Online mode only** - This probe requires an active connection to the SenHub Observability Platform. It is not available in offline mode.

Event Probe#

The Event probe exposes an HTTP endpoint that accepts custom events from applications, scripts, or external systems. Events are validated, enriched with timestamps and tags, and forwarded to the configured strategies (Senhub, PRTG, Nagios) for storage and alerting.

Use cases:

  • Application lifecycle events (deployment, restart, upgrade)
  • Custom business events (user login, transaction, alert)
  • Scripted health checks from cron jobs
  • Bridging third-party tooling that cannot push directly to SenHub

Quick Start#

probes:
  - name: event
    type: event
    params:
      address: 127.0.0.1   # Bind address (default: 127.0.0.1)
      port: 5656           # Listening port (default: 5656)
      protocol: tcp        # tcp or udp (default: tcp)

Once started, the probe listens on http://<address>:<port>/event and accepts POST requests with a JSON body.

Configuration Parameters#

ParameterTypeRequiredDefaultDescription
addressstringNo127.0.0.1Bind address. Use 0.0.0.0 to listen on all interfaces
portintegerNo5656HTTP listening port (1–65535)
protocolstringNotcpTransport protocol (tcp or udp)

Event Format#

Events are sent as JSON via POST /event.

Required Fields#

FieldTypeDescription
hoststringSource host or service name (non-empty)
messagestringHuman-readable event description (non-empty)
severitystringSeverity level (see values below)

Optional Fields#

FieldTypeDescription
timestampstringISO 8601 / RFC 3339 timestamp. If omitted, the agent’s clock is used
any custom keystring / number / array / objectCustom metadata (stored as tags)

Maximum fields per event: 20 (including required and custom).

Supported Severity Values#

ValueDescription
EMERGSystem is unusable
ALERTAction must be taken immediately
CRITCritical conditions
ERRError conditions
WARNINGWarning conditions
NOTICENormal but significant
INFOInformational
DEBUGDebug-level messages

Values match RFC 5424 syslog severities in upper-case.

Example Requests#

Minimal Event#

curl -X POST http://localhost:5656/event \
  -H "Content-Type: application/json" \
  -d '{
    "host": "app-01",
    "severity": "INFO",
    "message": "Service started"
  }'

Event with Custom Tags and Timestamp#

curl -X POST http://localhost:5656/event \
  -H "Content-Type: application/json" \
  -d '{
    "host": "web-frontend-03",
    "severity": "ERR",
    "message": "Database connection failed",
    "timestamp": "2026-04-14T15:04:05Z",
    "service": "checkout-api",
    "environment": "production",
    "user_id": "12345"
  }'

Event with Complex Metadata#

Arrays and nested objects are preserved and stored in a _complex_values tag as JSON:

curl -X POST http://localhost:5656/event \
  -H "Content-Type: application/json" \
  -d '{
    "host": "ingest-01",
    "severity": "WARNING",
    "message": "Batch processing delayed",
    "queue": "orders",
    "pending": [101, 102, 103],
    "context": {"retry": 2, "backoff": "exponential"}
  }'

Collected Metrics#

The Event probe emits a single datapoint per received event:

MetricUnitDescription
event_eventCountAlways 1 per event. Use tags to filter and aggregate

Tags Attached to Each Event#

TagSourceDescription
hostrequest bodySource host (required field)
severityrequest bodyRFC 5424 severity level (required field)
messagerequest bodyEvent message (required field)
<custom>request bodyAny additional fields sent in the JSON body
_complex_valuesauto-generatedJSON-serialized complex fields (arrays, nested objects) when present

All custom fields are stored as string tags. Complex types (arrays, objects) are additionally preserved in the _complex_values tag in their original JSON form.

HTTP Responses#

StatusWhen
200 OKEvent accepted and forwarded
400 Bad RequestInvalid JSON, missing required field, invalid severity, invalid timestamp, or more than 20 fields
405 Method Not AllowedRequest method is not POST
500 Internal Server ErrorEvent could not be forwarded to the data store

PRTG Integration#

Query event metrics via the agent’s PRTG endpoint:

http://<agent-ip>:<http-port>/api/<agent-key>/prtg/metrics/event

Filter by severity or custom tags using the ?tags= query parameter:

http://<agent-ip>:<http-port>/api/<agent-key>/prtg/metrics/event?tags=severity:ERR

Troubleshooting#

400 Bad Request — missing required field#

All three of host, message, severity must be present and non-empty strings. Check your request body with jq.

400 Bad Request — invalid severity value#

Severity must be upper-case and exactly match one of: EMERG, ALERT, CRIT, ERR, WARNING, NOTICE, INFO, DEBUG.

400 Bad Request — invalid timestamp format#

Timestamps must be ISO 8601 / RFC 3339 (e.g. 2026-04-14T15:04:05Z or 2026-04-14T15:04:05+02:00).

Port already in use#

If another process occupies the default port, change port in the probe config. On Linux, ports below 1024 require the agent to run as root or with CAP_NET_BIND_SERVICE.

Event received but not visible in PRTG#

Verify the event strategy is enabled in your agent config and that the PRTG query filters (tags, probe name) match the events you are sending.

Debug Logging#

curl -X POST http://localhost:8080/api/{key}/debug/logs \
  -H "Content-Type: application/json" \
  -d '{"module_levels": [{"module": "probe.event", "level": "debug"}]}'

Or start the agent with:

./senhub-agent run --authentication-key KEY --verbose --debug-modules probe.event
SenHub Agent 0.1.87