Skip to content

Instantly share code, notes, and snippets.

@Andor
Andor / teamcity-download.py
Last active September 9, 2019 09:38
Script to download all TeamCity configuration in Kotlin
#!/usr/bin/env python
import requests
from requests.auth import HTTPBasicAuth
from urllib.parse import urljoin
import os
import io
import zipfile
# this file should contain teamcity base url
@Andor
Andor / kafka-lag.yaml
Created January 18, 2019 08:49
prometheus alerts group for kafka producer/consumer lag
---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: prometheus-kafka-lagging
labels:
ksonnet.io/component: prometheus-rules
prometheus: k8s
role: alert-rules
namespace: monitoring
@Andor
Andor / default
Last active April 20, 2022 14:08
vaultbot.sls
{% for key, value in options.iteritems() %}
{{ key|upper }}="{{ value }}"
{% endfor %}
@Andor
Andor / check_postgres_replication.py
Created April 18, 2012 11:53
Nagios plugin to check PostgreSQL 9 streaming replication lag.
#!/usr/bin/env python
"""
Nagios plugin to check PostgreSQL 9 streaming replication lag.
Requires psycopg2 and nagiosplugin (both installable with pip/easy_install).
See: http://bucardo.org/check_postgres/check_postgres.pl.html#hot_standby_delay
MIT licensed:
Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved.