CLI Commands

Using ilagent from the command line to send events, heartbeats, and manage alerts.

Sending events

Create an alert event from the command line:

ilagent event -k il1api123... -t ALERT -s 'a summary from the shell'

Additional options:

Flag
Description

-k

Alert source integration key (required)

-t

Event type: ALERT, ACCEPT, or RESOLVE (required)

-s

Summary text (required for ALERT)

-g

Attach an image URL

-l

Attach a link URL

-o

Set priority: HIGH or LOW

Sending heartbeats

Ping a heartbeat alert source:

ilagent heartbeat -k il1hbt123...

Running as a daemon

Start ilagent as a long-running process with optional HTTP server, MQTT, and Kafka consumers:

ilagent daemon -p 8977 -b il1hbt123...
Flag
Description
Default

-p

HTTP server port (server only starts when a port is provided)

(disabled)

-b

Heartbeat integration key for regular uptime pings

(disabled)

The daemon does not start an HTTP server by default. Provide -p to enable the proxy with POST /api/events support.

HTTP proxy

When started with -p, the daemon runs a local HTTP server that accepts the same event and heartbeat payloads as the ilert API. Events are buffered in a local SQLite database and delivered asynchronously with automatic retries:

  • Idle: polls every 5 seconds

  • Active: polls every 500ms to drain the queue quickly

  • Failing: exponential backoff up to 60 seconds

Endpoints

Method
Path
Description

POST

/api/events

Queue an event for delivery (same schema as https://api.ilert.com/api/events)

GET

/api/heartbeats/{key}

Proxy a heartbeat ping

GET

/health

Health check

GET

/ready

Readiness check

GET

/

Returns the ilagent version

Max retries

By default, events that keep failing are dropped after 100 attempts. Use --max_retries to change this limit:

Set --max_retries 0 for unlimited retries (events stay in the queue until they succeed).

This setting also applies to the MQTT buffer queue.

Cleanup

Mass-resolve open alerts:

Liveness probes

When the HTTP server is running (-p), ilagent exposes:

  • GET /health — health check

  • GET /ready — readiness check

We recommend also providing -b il1hbt123... to periodically ping a heartbeat alert source for uptime monitoring.

Running detached

Last updated

Was this helpful?