Skip to content

Instantly share code, notes, and snippets.

View alexanderilyin's full-sized avatar
:octocat:
I'm engineer. Trust me.

Alexander Ilyin alexanderilyin

:octocat:
I'm engineer. Trust me.
View GitHub Profile
@alexanderilyin
alexanderilyin / README.md
Created November 15, 2018 00:58
Auto-increment Minor Semantic Version using Docker Hub API v2

For example your latest image with semantic versioning looks like this:

${DOCKER_HUB_ORG}/${DOCKER_HUB_REPO}:v1.20.0

Example provided above will do the folowing:

  1. Generate token using your github username and password.
  2. Get list of all tags from repository.
@alexanderilyin
alexanderilyin / postmortem.md
Created April 19, 2018 05:41 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
filter {
if [type] == 'php-errors-json' {
json {
source => 'message'
remove_field => '[message]'
}
date {
match => [ "[timestamp]", "UNIX" ]
target => "@timestamp"
filter {
if [type] == 'php-fpm-slow-log' {
# Drop empty lines
if [message] =~ /^\s*$/ {
drop { }
}
# Time prefix appears on each line
multiline {
pattern => "^(\[0x0|script_filename|$)"