Push notifications (using ntfy.sh), RSS and JSON application startup notifications, useful for informally notifying affected users of unexpected server restarts.
Sometimes the application support team are the last ones to hear about unexpected server restarts. It's not the fault of the busy systems administrators responding to the problem, but finding out about server problems sooner helps everyone.
This simple application runs on a server, preferably as a service that starts with the server. It hosts an RSS Feed (and a JSON response, if that's your preference) with the last time the application was started. It also has the ability to send a push notification using the ntfy notification service.
If the server restarts, the timestamp will change, resulting in a new notification.
If the feed is unavailable, either the application is down or the server is.
Download a release or clone the repository.
Install the dependencies.
npm install
Create a data/config.js
file.
cp data/configSample.js data/config.js
Run the application.
npm start
Alternatively, the application can be set up as a Windows service.
npm link node-windows
windowsService-install.bat
Subscribe to the RSS feed or read the JSON file. Note that the server port is configurable, and there is an option to customize the URLs (helpful when proxying).
http://serverName:9111/rss
http://serverName:9111/json
Install the appropriate ntfy app on your phone, and subscribe to the push notification topic set up in the config file.