Monitoring scripts to check for various events: * Check new bitcoin transactions for a wallet or address * Check website status * Monitor file changes * Check IP address changes * Monitor if specific services are running on an instance, such as a Bitcoin node
Sends Telegram messages with a bot and the Telegram API.
- Create a bot with Botfather with the command /newbot
- Copy the API key and place it in .token in the main telegrambot directory
- Send a message to the chat or put the Chat ID in the .chatid file in the main telegrambot directory
If everything has been setup correctly you can send messages to Telegram .. code-block:: bash
$ python sendmessage.py 'Hello world!'
Check a Bitcoin wallet for changes, so new outgoing or incoming transactions.
$ python check_bitcoin_wallet.py '<public_masterkey>' '[<network>]' '[<wallet_name>]'Check a specific bitcoin address for new transactions.
$ python check_bitcoin_address.py '<address>' '[<network>]' '[<address_name>]'Check if specific word is found on website, to check if website is running correctly.
$ python check_website.py '<url>' '<expected_word>'Or to check website, but only send a message after a 2 number of failures. You can change the number of failures before messaging in the python code.
$ python check_website_failures.py '<url>' '<expected_word>'Check for recent changes files in directory. For instance to verify if backups are working.
$ python check_latestfile.py '<directory>' <alarm_after_x_minutes>Check if server is reachable with a ping command.
$ python check_ping.py '<hostname or ip>'Check current server WAN ip address. Used for home connections where ip addresses tend to change.
$ python check_ip.pyCheck if a specific service is running on a server. Works for Ubuntu and probably other unix operating systems.
$ python check_service.py '<service_name>'Or to check for a service and only send a message after the second failure, to avoid false warnings.
$ python check_service_failures.py '<service_name>'Check if a Bitcoin core node is running and returns the number of blocks synced. Uses the Bitcoinlib library.
$ python check_bitcoind.py '<bitcoind_url>' '[<block_count>]'