THESE NOTIFIcATIONS ARE OBSOLETE AND WILL NOT BE MAINTAINED. PLEASE DOWNLOAD THE COSMIC INStALLER AND RUN TELEGRAM NOTIFICATiONS INSTEAD.
This will help you set up a cron job that runs every 5 minutes (or any frequency you desire) that will search your otnode logs for specific phrases. A Notifiction will be sent to you with the log lines that we're found and are not older than 5 minutes(adjustable). If no results are returned, then a notification will not be sent.
By customizing the json config, you can configure the script to notify you about anything you want.
Install the 'Notify My Device' app from the app store and install it onto your mobile device.
Navigate to https://www.notifymydevice.com/ and create an account. Go to 'My applications' and create an application. Copy the API key and save it for later.
On your node:
Install npm, nodejs
- sudo apt install npm
- sudo apt install nodejs
Create and edit a config.json file in your directory and copy the configuration from the example-config.json file.
- Sudo nano config.json
- Paste and edit the text from the example-config.json file into your config.json file
Add a Cron job to the bottom of your crontab to trigger the script. Test running the command before adding it to your crontab.
- Sudo nano /etc/crontab
- Edit and Paste the command below to the end of your crontab
*/5 * * * * root cd ~/path/to/my/script && node Notification.js