Monitoring Uptime Status with Github Actions

I was searching github for some uptime monitoring apps when I stumbled across a github actions based uptime and status page.

It’s aptly named upptime and while it wasn’t what I was looking for, I found it to be novel and worth setting up:

Status Page - Upptime

Read more

Fixing Hexo Not Generating Files

If you’re having trouble with Hexo not generating files, check for broken symbolic links in the source directory tree:

1
find ./ -type l -exec test ! -e {} \; -print

Read more

NZBGet MySQL Extension Script

I wrote a simple plugin for NZBGet that inserts download history into a MySQL database. Having my download list in a database makes operations on the data easier than groking text logs.

I wanted to display my most recent downloads on a Grafana Dashboard:

Table of downloads

To use simply copy the Mysql-Log.py script into your NZBGet/scripts directory. In NZBGet, select settings and set the hostname of your MySQL instance.

You can download the plugin on github

Read more

Using curl with the Pihole API

I couldn’t find any quick references about accessing the Pihole API so I created this page.

Pihole is a great app for blocking internet advertising that was originally designed to be run on a raspberry pi. It blocks known advertisers’ domains at the DNS level by effectively null routing requests destined to serve ads. It can be run on VMs, Raspberry Pis and bare metal servers.

Here are the steps to access the pihole’s rest api. I’m using curl in this example, but you can integrate it with OpenHAB or any other system that can talk REST.

Step 1: Obtaining the web password

Most of the useful API endpoints the pihole provides wisely require authentication. After searching around the net I found that I could pass &token=A_VALID_SESSION_TOKEN to authenticate to the pihole for a session. Unfortunately, this is a temporary auth token and wasn’t suitable for my needs. After more digging, I found the gem I needed: &auth=WEBPASSWORD. Sounds great, but where do I obtain this password? You simply log onto your pihole instance or server and run:

1
2
sudo cat /etc/pihole/setupVars.conf | grep PASSWORD
17d1ce58eb420998d69dfd2850e7c639706715335d78447f78723489df78234

Read more

NZBGet ElasticSearch Plugin

I wrote a simple plugin for NZBGet that inserts download history into an ElasticSearch cluster (or node). It uses API calls rather than parsing filesystem logs. I wanted a quick way to just insert the data so I created this script.

Simply copy the ESLog.py script into your NZBGet/scripts directory. In NZBGet, select settings and set the hostname of your ElasticSearch instance.

You can download the plugin on github

Read more