SIGNL4 offers critical alerting, incident response and service dispatching for operating critical infrastructure. It alerts you persistently via app push, SMS text, voice calls, and email including tracking, escalation, on-call duty scheduling and collaboration.
You can integrate SIGNL4 with your tools and systems easily, e.g. via webhook or HTTP request.
Sometimes tools can generate files. In this case you can read these files automatically and generate SIGNL4 alerts as a result.
The command line tool signl4-file-interface.js can be used to read filed from a specified folder and then send SIGNL4 alerts for each file.
Attention: This code is intended as a sample and only lightly tested with no guarantee. Please use with care.
Attention 2: Please note that all .txt and .json files from the specified folder are deleted after processing.
You can use the tool with the following command:
node signl4-file-interface.js
The following command line options are supported: --folder: The folder to read. --secret: The SIGNL4 team or integration secret. --loop: Optional. The program runs in a loop with the specified number of seconds interval. --help: Shows this help text.
You can use a cron job to call the command line in certain intervals to read a folder and to generate SIGNL4 alerts. Alternatively, you can also specify a loop parameter to let the tool process the folder in certain intervals by itself.
Here are some sample command line calls.
Linux: Read a folder one time:
node signl4-file-interface.js --folder /mnt/c/FileInterface --secret signl4_secret --loop 0
Windows: Read a folder in a loop every 20 seconds:
node signl4-file-interface.js --folder "C:\FileInterface\" --secret signl4_secret --loop 20
Please replace the parameter signl4_secret by your SIGNL4 team or integration secret.
You can find a short video here: https://youtu.be/rScyRyKuhfs