Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

madflojo/runbook-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Runbook Webhook

This repo is home to cr-webhook.sh which is a simple shell script designed to interact with Runbook, a monitoring and automation SaaS.

This script simply uses curl to make an HTTP POST that updates a webhook monitor on Runbook. This script can change the webhooks status to either Healthy or Failed. It can also check the status of a monitor using the status action, which isn't very webhooky but that's ok.

Usage:

# ./cr-api.sh -k <check_key> -u <url> -a healthy|failed|status

Changing a monitor to healthy state:

# ./cr-api.sh -u https://dash.runbook.io/api/cr-api/unique-url -k somesupersecretkey -a healthy
Sending Request to: https://dash.runbook.io/api/cr-api/unique-url
-------------------------
Results: {"result": "success"}

Changing a monitor to failed state:

# ./cr-api.sh -u https://dash.runbook.io/api/cr-api/unique-url -k somesupersecretkey -a failed
Sending Request to: https://dash.runbook.io/api/cr-api/unique-url
-------------------------
Results: {"result": "success"}

Checking monitor state:

# ./cr-api.sh -u https://dash.runbook.io/api/cr-api/unique-url -k somesupersecretkey -a status
Sending Request to: https://dash.runbook.io/api/cr-api/unique-url
-------------------------
Results: {"status": "failed", "failcount": 0, "result": "success"}

Examples in the wild

Below is a list of examples of using cr-webhook.sh with existing tools.

About

Shell script for calling Runbook.io webhooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages