I hereby claim:
- I am pilgrim2go on github.
- I am da140110 (https://keybase.io/da140110) on keybase.
- I have a public key ASCe3oEzRfP-rtLHQs2gWjgsJmoHq9hQTSO5ShQ5IGSekwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Create the datadog user with select only permissions: | |
# CREATE USER datadog WITH PASSWORD '<complex_password>'; | |
# | |
# Grant select permissions on a table or view that you want to monitor: | |
# GRANT SELECT ON <schema>.<table> TO datadog; | |
# | |
# Grant permissions for a specific column on a table or view that you want to monitor: | |
# GRANT SELECT (id, name) ON <schema>.<table> TO datadog; | |
# | |
# Let non-superusers look at pg_stat_activity in a read-only fashon. |
version: 0.2 | |
phases: | |
install: | |
commands: | |
- echo Entered the install phase... | |
- pip install -r requirements.txt | |
build: | |
commands: | |
- echo Entered the build phase... |
import boto | |
s3 = boto.connect_s3(aws_id, aws_secret_key) | |
# based on http://www.quora.com/Amazon-S3/What-is-the-fastest-way-to-measure-the-total-size-of-an-S3-bucket | |
def get_bucket_size(bucket_name): | |
bucket = s3.lookup(bucket_name) | |
total_bytes = 0 | |
n = 0 | |
for key in bucket: |
#!/usr/bin/env python | |
import boto3 | |
import argparse | |
def lookup_by_id(sgid): | |
sg = ec2.get_all_security_groups(group_ids=sgid) | |
return sg[0].name | |
# Lambda function to create partition for Cloudtrail log on daily basis. | |
# You need to schedule it in AWS Lambda. | |
''' | |
------------------------------------------- | |
AWS Athena Create Partitions Automatically | |
------------------------------------------- | |
Version 1.0 | |
Author: SqlAdmin |
# -*- coding: utf-8 -*-\ | |
""" | |
The MIT License (MIT) | |
Copyright (c) 2015 Zalando SE | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
image: docker:latest | |
# When using dind, it's wise to use the overlayfs driver for | |
# improved performance. | |
variables: | |
DOCKER_DRIVER: overlay | |
GCP_PROJECT_ID: CHANGE-TO-GCP-PROJECT-ID | |
IMAGE_NAME: image_id | |
services: |
goaccess -f haproxy.log --log-format='%^ %^ %^:%^:%^ %^ %^[%^]: %h:%^ [%d:%t.%^] %^ %^ %^/%^/%^/%^/%L %s %b %^ %^ %^ %^/%^/%^/%^/%^ %^/%^ "%r"' --date-format='%d/%b/%Y' --time-format='%H:%M:%S' -q |