I hereby claim:
- I am goduncan on github.
- I am dunc (https://keybase.io/dunc) on keybase.
- I have a public key ASDoTaz6f56igrXRVzMiwfalr8hWRtcePMsMBGvOnGNKGQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
[Unit] | |
Description=Sumo Logic Collector | |
[Service] | |
Type=forking | |
ExecStart=/usr/local/bin/startsumo.sh | |
ExecStop=/opt/SumoCollector/collector stop | |
# Give a reasonable amount of time for the server to start up/shut down | |
TimeoutSec=300 |
#!/bin/bash | |
az=$(curl -sfm1 http://169.254.169.254/latest/meta-data/placement/availability-zone) | |
instanceId=$(curl -sfm1 http://169.254.169.254/latest/meta-data/instance-id) | |
accountNo=$(curl -sfm1 http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.accountId') | |
region=$(echo $az | sed 's/\w$//') | |
name="${instanceId}:${region}:${accountNo}" | |
# Check if we have set the name already |
CREATE EXTERNAL TABLE IF NOT EXISTS goduncan.flow_logs ( | |
src string, | |
spt int, | |
dst string, | |
dpt int, | |
proto int, | |
start_time bigint, | |
end_time bigint, | |
out_bytes bigint | |
) |
import json | |
import gzip | |
import time | |
from StringIO import StringIO | |
import boto3 | |
S3 = boto3.client('s3') |