Inspired By: grafana/loki#333
- docker-compose.yml
version: "3"
networks:
loki:
## The purpose of snapshots and backups are to be able to restore data to the last known good state | |
## either due to full data loss or corruption/unwanted data change | |
## Data properties: | |
## - Can change slowly or quickly. | |
## If the data changes quickly, we must snapshot/backup more frequently. We must also retain more. | |
## If the data changes slowly, we can snapshot less frequently | |
## - Is low priority or high priority. | |
## Low priority means we don't need offsite backups | |
## Medium priority means we need an offsite backup | |
## High priority means we need multiple historical offsite backups |
#!/usr/bin/env bash | |
name=fooAlert-$RANDOM | |
url='http://localhost:9093/api/v1/alerts' | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
generate_post_data() { | |
cat <<EOF | |
[{ |
Inspired By: grafana/loki#333
version: "3"
networks:
loki:
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.
I'm learning about SOPS and setting it up as my preferred mechanism for storing secrets. Here are my notes.
It’s security mechanism is that we (i.e. client) use a PUBLIC key from the receiver (i.e. server) and encode it with a random key (I’m saying nonce but it could be reused)
This varies from RSA and SSH because the server uses a PUBLIC key to identify the client.
Web of trust operates by still using PGP (i.e. encoding with recipient’s public key) but additionally, we can encrypt/sign the data as our own by signing it with the client’s private key.
This means the recipient will initially decrypt via our (i.e. client’s) public key (verifying the source) and then decrypting via their (i.e. server’s) private key to get the data.
#!/bin/sh | |
# | |
# !!! IMPORTANT !!! | |
# As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144) | |
# For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active | |
# pacaur seems to get occasional updates to fix breaking changes due to pacman updates though. | |
# | |
# If you are new to arch, I encourage you to at least read and understand what | |
# this script does befor blindley running it. | |
# That's why I didn't make a one-liner out of it so you have an easier time |
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |