This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
# | |
# Gets the estimated space usage of prometheus | |
# | |
# usage: /opt/prom_calc.py 1y [optional number of samples per sec] | |
# y = years | |
# m = months | |
# d = days | |
# | |
# If number of samples not provided, queries from prometheus on prometheus.mydomain.com:9090 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Match to your prometheus node_exporter --collector.textfile.directory | |
# add "sponge" commmand inline if needed, probably isn't here | |
# Replace pool0 with the pool you wish to monitor | |
* * * * * root /opt/zfs_space_used.sh pool0 > /var/tmp/node_exporter/zfs_space.prom | |
* * * * * root /opt/zpool_status_simple.sh pool0 > /var/tmp/node_exporter/zfs_status.prom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just my personal, quick and dirty notes | |
A tape LIBRARY or changer contains one or more tape DRIVES and they are addressed/used independently of one another (mostly) | |
`mt` command is for tape drive(s) | |
`mtx` command is for tape library/changer | |
The library has the robot arm for moving tapes around, and slots for storage. The drives are... well, the drives. Like a VCR, for data. I guess then the library is like the Blockbuster. But for data. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: ./encode_hls.sh video.mp4 480 | |
# | |
# Transcode to HLS @ XXXXp | |
# | |
# Simple little script I made, requires jq and ffmpeg | |
# I just use the ffmpeg from https://johnvansickle.com/ffmpeg/ | |
# | |
export INPUTFILE=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## BEGIN san.cnf ## | |
[ req ] | |
default_bits = 2048 | |
distinguished_name = req_distinguished_name | |
req_extensions = v3_req | |
prompt = no | |
[ req_distinguished_name ] | |
commonName = foo.bar | |
[ v3_req ] | |
subjectAltName = @alt_names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Background: this was done on a CentOS 6.5 ESXi VM running pmacct 1.5.0rc2 and PostgreSQL 9.3 from PGDG repo with | |
# the following config line for pmacct: | |
# | |
# ./configure --enable-pgsql --enable-geoip --enable-ipv6 --with-pgsql-libs=/usr/pgsql-9.3/lib --with-pgsql-includes=/usr/pgsql-9.3/include | |
# | |
# | |
# I also customized the table they used in postgres to add vertical partitioning, but that's another gist :) | |
# |