This file contains 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
if git describe --exact-match 2> /dev/null; then | |
VERSION=$(git describe) | |
else | |
VERSION=$(git describe | sed -E 's/([0-9]+)\.([0-9]+)-([0-9]+).*/\1.\2.\3/') | |
git tag -a "$VERSION" -m "Tagging version \"${VERSION}\"" | |
fi |
This file contains 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
init_per_testcase(_, Config) -> | |
{ok, Pid} = riak_core_vnode:start_link(etsdb_vnode, 0, []), | |
[{vnode, Pid}| Config]. |
This file contains 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
end_per_testcase(_, Config) -> | |
Pid = ?config(vnode, Config), | |
send_command(Pid, stop), | |
ok. |
This file contains 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
-include_lib("riak_core/include/riak_core_vnode.hrl"). | |
send_command(Pid, Request) -> | |
Ref = make_ref(), | |
gen_fsm:send_event(Pid, ?VNODE_REQ{request=Request, | |
sender={raw, Ref, self()}}), | |
{ok, Ref}. | |
get_response(Ref) -> | |
receive {Ref, M} -> {ok, M} |
This file contains 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
try: | |
with util.ipmi(util.get_lom_ip(self.host))) as ipmi: | |
ipmi.foo() | |
except exceptions.IPMIError: | |
self._unwind("Failed to connect to IPMI", exceptions.IPMIError) | |
raise |
This file contains 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 random | |
import time | |
from pystatsd import Client, Server | |
sc = Client('statsd.local.vm',8125) | |
while True: | |
sc.increment('python_test.inc_int') | |
time.sleep(random.random()) |
This file contains 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
alerts: | |
- target: carbon.agents.*.metricsReceived | |
warning: 10 | |
crticial: 0 | |
name: Graphite Metrics Received |
This file contains 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 calendar | |
import json | |
import socket | |
import time | |
import requests | |
from dateutil.parser import parse | |
graphite_server = 'localhost' |
This file contains 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
File "/apps/production/api/virtualenvs/api/local/lib/python2.7/site-packages/tornado/ioloop.py", line 327, in start | |
self._handlers[fd](fd, events) | |
File "/apps/production/api/virtualenvs/api/local/lib/python2.7/site-packages/tornado/stack_context.py", line 190, in __call__ | |
return super(_StackContextWrapper, self).__call__(*args, **kwargs) | |
File "/apps/production/api/virtualenvs/api/local/lib/python2.7/site-packages/tornado/curl_httpclient.py", line 133, in _handle_events | |
self._finish_pending_requests() | |
File "/apps/production/api/virtualenvs/api/local/lib/python2.7/site-packages/tornado/curl_httpclient.py", line 187, in _finish_pending_requests | |
self._finish(curl) |
This file contains 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
pip install klout-to-graphite | |
export KLOUT_KEY="YOUR KLOUT KEY" | |
cat twitter_usernames.txt | klout_to_graphite --graphite-host graphite.example.com |
OlderNewer