Lamp: Heartbeat Commands

This commands allows you create, update, delete and ping a heartbeat

Ping Heartbeat

Lamp pingHeartbeat command is ping an existing heartbeat in Opsgenie. createIncident command takes the following parameters:

❗️

Since Opsgenie process heartbeat ping requests asynchronously, it does not check if the heartbeat exists or not before responding.
Please note that receiving a PONG response does not necessarily mean that the heartbeat exists.

Mandatory Parameters

Parameter

Description

name

Name of the heartbeat which needs to pinged

opsgenie-lamp pingHeartbeat --name "Heartbeat Test"

Create Heartbeat

Lamp pingHeartbeat command is ping an existing heartbeat in Opsgenie. createIncident command takes the following parameters:

Mandatory Parameters

Parameter

Description

name

Name of the heartbeat which needs to pinged

interval

Specifies how often a heartbeat message should be expected.

intervalType

Interval specified as m for minutes, h for hours or d for days

🚧

If integration belongs to any team, it automatically overwrites ownerTeam object. Otherwise, id or name fields should be specified in ownerTeam

Optional Parameters

description

An optional description of the heartbeat

enabled

Enable/disable heartbeat monitoring. Default is disabled

ownerTeam

Owner team of the heartbeat, consisting id and/or name of the owner team

alertMessage

Specifies the alert message for heartbeat expiration alert. If this is not provided, default alert message is "HeartbeatName is expired"

alertTags

Specifies the alert tags for heartbeat expiration alert

alertPriority

Specifies the alert priority for heartbeat expiration alert. If this is not provided, default priority is P3

Sample Usage:

With mandatory parameters:

opsgenie-lamp  createHeartbeat --name "Heartbeat Test 2" --interval 5 --intervalType "m"

With optional parameters:

opsgenie-lamp  createHeartbeat --name "Heartbeat Test 2" --interval 5 --intervalType "m" --ownerTeam "Team 1" --enabled

Enable Heartbeat

Lamp enableHeartbeat command enable an existing heartbeat in Opsgenie. enableHeartbeat command takes the following parameters:

🚧

If the integration of the API key configured as read-only, the request will not be accepted. For more information, you can refer to API Access Management.

Mandatory Parameters

Parameter

Description

name

Name of the heartbeat which needs to pinged

opsgenie-lamp enableHeartbeat --name "Heartbeat Test"

Disable Heartbeat

Lamp disableHeartbeat command disable an existing heartbeat in Opsgenie. disableHeartbeat command takes the following parameters:

🚧

If the integration of the API key configured as read-only, the request will not be accepted. For more information, you can refer to API Access Management.

Mandatory Parameters

Parameter

Description

name

Name of the heartbeat which needs to pinged

opsgenie-lamp disableHeartbeat --name "Heartbeat Test"

Delete Heartbeat

Lamp deleteHeartbeat command is used to delete an existing heartbeat in Opsgenie. deleteHeartbeat command takes the following parameters:

🚧

If the integration of the API key configured as read-only, the request will not be accepted. For more information, you can refer to API Access Management.

Mandatory Parameters

Parameter

Description

name

Name of the heartbeat which needs to pinged

opsgenie-lamp deleteHeartbeat --name "Heartbeat Test"

List Heartbeat

Lamp listHeartbeat command is used to list all existing heartbeat in Opsgenie.

opsgenie-lamp listHeartbeat --pretty

Did this page help you?