If you want to monitor your server with existing monitoring mainstream stack (Prometheus, Grafana) you can use Blackbox Exporter to monitor it.
wget https://github.com/prometheus/blackbox_exporter/releases/download/v0.19.0/blackbox_exporter-0.19.0.linux-amd64.tar.gz
tar -xvf blackbox_exporter-0.19.0.linux-amd64.tar.gz
mv blackbox_exporter-0.19.0.linux-amd64/blackbox_exporter /usr/local/bin/
cd blackbox_exporter-0.19.0.linux-amd64/
sudo useradd -rs /bin/false blackbox_exporter
#!/bin/sh | |
set -e | |
set -x | |
# Adapted from https://www.daemonology.net/blog/2019-02-16-FreeBSD-ZFS-AMIs-now-available.html | |
# Note: You need to run this on an instance with read/write access to Google Compute | |
# Alternatively, you can run the gcloud commands from somewhere with privileges | |
disk=da1 |
Guide: Run FreeBSD 13.1-RELEASE for ARM64 in QEMU on Apple Silicon Mac (MacBook Pro M1, etc) with HVF acceleration (Hypervisor.framework)
This guide was adapted from https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278#running-ubuntu-server-for-arm64
- Install Xcode from App Store or install Command Line Tools on your Mac running on Apple Silicon.
This is a step-by-step main net tutorial on how to setup a Lightning Network node for Litecoin on a Mac. It is specifically for the lnd client by the Lightning Labs. You can copy and paste most of the commands except for the times I've indicated in bold for you to input your own information. It would also be a good idea to backup your computer prior to starting just in case you need to start over.
Below is a legend. Refer to it as you come across terms or symbols you don’t understand. The first part of the tutorial is taken from the lnd github. However, everything else is written with the help of Patrick Walters taking me step by step through the process.
$ = This symbol means 1 line of code. Do not type “$” into your terminal. Simply input what follows then push enter
.
Pubkey = Short for the public key that is generated from the private key w
""" | |
This app is an example of how you could charge for access to an API using | |
the lightning network and LND. The example uses a JWT token that grants 1-hour access | |
(the default jwt token expirey) but many different payment schemes could be | |
imagined (bulk payments/pay per call etc). | |
But for now I just wanted to show how simple it could be to add a paywall to an api service. | |
To use this api: | |
1. Make a POST request to get a new token and invoice at `/token` |
Here are some useful things to know for managing an Exim 4 server. This assumes a prior working knowledge of SMTP, MTAs, and a UNIX shell prompt.
Message-IDs and spool files The message-IDs that Exim uses to refer to messages in its queue are mixed-case alpha-numeric, and take the form of: XXXXXX-YYYYYY-ZZ. Most commands related to managing the queue and logging use these message-ids.
There are three -- count 'em, THREE -- files for each message in the spool directory. If you're dealing with these files by hand, instead of using the appropriate exim commands as detailed below, make sure you get them all, and don't leave Exim with remnants of messages in the queue. I used to mess directly with these files when I first started running Exim machines, but thanks to the utilities described below, I haven't needed to do that in many months.
Files in /var/spool/exim/msglog contain logging information for each message and are named the same as the message-id.
Files in /var/spool/exim/input are named after the mes
#!/bin/bash | |
# date,wallet_balance,channel_balance,total_capacity,remote_balance,unsettled_balance,sent_balance,received_balance,off_chain_updates,active_nodes,inactive_nodes,pending_channels,limbo_channels,pending_open,pending_close,pending_force_close | |
lncli="/home/lightning/gocode/bin/lncli" | |
file="~/lightning-monitor.csv" | |
# Date | |
newline="$(date +%s%3N)" | |
#set the separator to not be space | |
IFS="" |
#!/bin/bash | |
# | |
# Prints out information from bitcoin-cli about the previous Bitcoin difficulty | |
# adjustment and the projected difficulty adjustment. | |
# | |
# Requires: bitcoin-cli | |
# jq | |
# bc | |
# |