Skip to content

Instantly share code, notes, and snippets.

View Niemi's full-sized avatar

Aleksei Niemi

View GitHub Profile
@mpneuried
mpneuried / Makefile
Last active May 4, 2024 13:46
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@matthewpalmer
matthewpalmer / pod.yaml
Created June 9, 2018 21:23
Example Kubernetes YAML for the multi-container adapter design pattern
# Example YAML configuration for the adapter pattern.
# It defines a main application container which writes
# the current date and system usage information to a log file
# every five seconds.
# The adapter container reads what the application has written and
# reformats it into a structure that a hypothetical monitoring
# service requires.
@borisisok
borisisok / aws-updown.sh
Last active December 17, 2021 07:52
LAB: VPN with BGP
#!/bin/bash
# debug: print all vars and function
env
set
# debug: print all commands during execution
set -x
TUNNEL_NAME="${PLUTO_CONNECTION}"
@claudiosteuernagel
claudiosteuernagel / nexus_upload_raw_repo.sh
Created December 18, 2020 06:30
Nexus Raw Artifact upload using cURL
#Nexus Raw Artifact upload using cURL
curl --fail -u user:password --upload-file file.zip 'https:/nexus-repository.claudiosteuernagel.com/repository/my-raw-repo/my-directory/file.zip'
import java.util.*;
/**
* A demo Java application to see how GC works.
*
* @author Thanh Nguyen
*/
public class GcMemDemo {
static Map<Long, byte[]> buffer = new HashMap<>();

Loki log ingestion issue

Loki stops ingesting logs from promtail. The error messages are a stream HTTP 499 errors in the gateway component which is based on nginx. Ex:

10.194.148.169 - - [17/Feb/2022:21:08:28 +0000]  499 "POST /loki/api/v1/push HTTP/1.1" 0 "-" "promtail/" "-"
10.194.90.195 - - [17/Feb/2022:21:08:28 +0000]  499 "POST /loki/api/v1/push HTTP/1.1" 0 "-" "promtail/" "-"
-Xlog Usage: -Xlog[:[selections][:[output][:[decorators][:output-options]]]]
where 'selections' are combinations of tags and levels of the form tag1[+tag2...][*][=level][,...]
NOTE: Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched.
Available log levels:
off, trace, debug, info, warning, error
Available log decorators:
time (t), utctime (utc), uptime (u), timemillis (tm), uptimemillis (um), timenanos (tn), uptimenanos (un), hostname (hn), pid (p), tid (ti), level (l), tags (tg)
Decorators can also be specified as 'none' for no decoration.