This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM prom/prometheus | |
EXPOSE 9090 | |
VOLUME [ "/prometheus" ] | |
WORKDIR /prometheus | |
ENTRYPOINT [ "/bin/prometheus" ] | |
CMD [ "-config.file=/etc/prometheus/prometheus.yml", \ | |
"-storage.local.path=/prometheus", \ | |
"-alertmanager.url=http://localhost:9093", \ | |
"-web.console.libraries=/etc/prometheus/console_libraries", \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM sdurrheimer/alpine-glibc | |
MAINTAINER The Prometheus Authors <[email protected]> | |
WORKDIR /gopath/src/github.com/prometheus/prometheus | |
COPY . /gopath/src/github.com/prometheus/prometheus | |
RUN apk add --update -t build-deps tar openssl git make bash curl\ | |
&& source ./scripts/goenv.sh /go /gopath \ | |
&& make build \ | |
&& cp prometheus promtool /bin/ \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import click | |
import requests | |
def get_status(node): | |
es_stats = requests.get("http://%s:8080/_cluster/health?level=indices" % node) | |
indices = es_stats.json()['indices'] | |
bad_indices = {k:v['status'] for k,v in indices.items() if 'green' not in v['status'] and 'nginx' in k} | |
for k,v in bad_indices.items(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto | |
ec2 = boto.connect_ec2() | |
res = ec2.get_all_instances() | |
instances = [i for r in res for i in r.instances] | |
vol = ec2.get_all_volumes() | |
def attachedvolumes(): | |
print 'Attached Volume ID - Instance ID','-','Device Name' | |
for volumes in vol: | |
if volumes.attachment_state() == 'attached': | |
filter = {'block-device-mapping.volume-id':volumes.id} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Install the necessary tools" | |
sudo apt-get update | |
sudo apt-get -y install make flex bison libtool libevent-dev automake pkg-config libssl-dev libboost-all-dev libbz2-dev build-essential g++ python-dev git | |
echo "git cloning Thrift" | |
apt- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto.ec2 | |
import os | |
access = os.environ['aws_access_key_id'] | |
secret = os.environ['aws_secret_access_key'] | |
conn = boto.ec2.connect_to_region(region, aws_access_key_id=access, | |
aws_secret_access_key=secret) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String url = "http://api.openweathermap.org/data/2.5/weather?q=London,uk"; | |
OkHttpClient client = new OkHttpClient(); | |
try{ | |
Request request = new Request.Builder() | |
.url(url) | |
.build(); | |
Response response = client.newCall(request).execute(); | |
System.out.println(response.body().string()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.web | |
import tornado.ioloop | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write() | |
application = tornado.web.Application([ | |
(r"/", MainHandler), |
NewerOlder