Skip to content

Instantly share code, notes, and snippets.

View frimik's full-sized avatar

Mikael Fridh frimik

  • Electronic Arts / DICE
  • Uppsala, Sweden
View GitHub Profile
@frimik
frimik / aurora.py
Last active July 5, 2017 13:45 — forked from zircote/aurora.py
WIP DataDog check for Apache Aurora
"""
Aurora Scheduler check
Collects metrics from aurora scheduler.
"""
import requests
from checks import AgentCheck, CheckException
class AuroraCheck(AgentCheck):
import redis
r = redis.Redis()
base = 0 # Smallest allowed key in samples
jump = 50 # Key size bins
top = 1300 # Largest allowed key in sample
samples = 1000 # Numbers of samples
bins = []
for i in xrange(1+(top-base)/jump):
'''
@author Bommarito Consulting, LLC; http://bommaritollc.com/
@date 20131029
This script monitors and logs to CSV the status of all tunnels for all VPNs for a single EC2 region.
'''
# Imports
import boto
import boto.ec2
import boto.vpc
@frimik
frimik / logstash
Created March 13, 2013 13:26 — forked from nikolavp/logstash
#! /bin/sh
### BEGIN INIT INFO
# Provides: logstash
### END INIT INFO
# Author: your name here <change email>
#
# Do NOT "set -e"
#!/usr/bin/env ruby
USAGE=<<EOS
Delete files in specified folders that are older than a given number of days.
Options:
-v - verbose. Will list folders and files.
-d - dry run. Like verbose, but does not delete files.
-h - Show this usage help.
Arguments: