/aps-beam-notify-legacy

The legacy, very simple, isolated script to dumbly monitor the Argonne National Lab APS beam status

Primary LanguageJavaScript

aps-beam-notify

A simple script that runs forever and hits a Slack Incoming Webhook whenever the "Operations Status" changes for the Argonne National Lab Advanced Photon Source.

Scrapes this web page: https://www3.aps.anl.gov/aod/blops/status/srStatus.html

Prereqs

Setup

Simply run the following in the project root to install dependencies.

yarn

Running

The slack webhook is pulled from the environment variable SLACK_WEBHOOK_URL. Create an Incoming Webhook in the slack admin panel and then to run the script (e.g. in a unix-like shell, macOS, linux, etc.) (be sure to replace the URL with your own slack webhook URL):

export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/ABCDEFG1234/ABCDEFG1234/000000000000000000000000"
node index.mjs