https://github.com/subscan-explorer/watch-logs-script
https://github.com/subscan-explorer/watch-logs-script
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/subscan-explorer/watch-logs-script
- Owner: subscan-explorer
- Created: 2023-11-28T02:28:21.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-13T06:40:51.000Z (over 2 years ago)
- Last Synced: 2025-03-26T09:19:44.468Z (about 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Validator Watch Script
This repository contains a script designed to execute a user-designed command, filter its output, and notify healthcheck.io with the results. The scripts in this repository are:
* start.sh: An initialization script to setup cron job for the validator_watch.sh.
* validator_watch.sh: A script designed to execute a user-design command, filter its output with grep and notify healthcheck.io if new logs appear.
### Usage
#### start.sh
This script sets up a cron job to execute the validator_watch.sh regularly. Run it with the following steps:
* In terminal, navigate to the directory containing start.sh.
* Run the script: ./start.sh.
* The script will ask for your cron frequency, the command to watch, the grep parameter, and your healthcheck.io id.
#### validator_watch.sh
This script is designed to execute a user-specified command, filter its output with grep, and notify healthcheck.io if new logs appear. It is generally meant to be used with a cron job set by the start.sh, and you don't have to run it manually. However, if you want to use it standalone, you can do so as follows:
* Execute the script with: ./validator_watch.sh "" "" "".