Skip to content

Instantly share code, notes, and snippets.

View justizin's full-sized avatar

Justin Alan Ryan justizin

View GitHub Profile
# schema creation for Telephus (Twisted Python Cassandra client) example code
# feed into cassandra-cli
connect localhost/9160;
create keyspace Keyspace1;
use Keyspace1;
create column family Standard1 with comparator = UTF8Type;
update column family Standard1 with column_metadata = [
{column_name: foo, validation_class: UTF8Type}];
@justizin
justizin / gist:4616799
Created January 24, 2013 01:34
gmond -d 4 output
2013-01-24_01:31:15.65113 udp_recv_channel mcast_join=NULL mcast_if=NULL port=8649 bind=NULL
2013-01-24_01:31:15.65116 tcp_accept_channel bind=NULL port=8649
2013-01-24_01:31:15.65117 udp_send_channel mcast_join=NULL mcast_if=NULL host=10.240.227.155 port=8649
Traceback (most recent call last):
File "/etc/zabbix/alert.d//pagerduty", line 239, in <module>
pagerduty_queue.enqueue(Zabbix(sys.argv).event())
File "/etc/zabbix/alert.d//pagerduty", line 213, in event
event = self._parse_zabbix_body(self.arguments[3])
File "/etc/zabbix/alert.d//pagerduty", line 197, in _parse_zabbix_body
return dict(line.strip().split(':', 1) for line in body_str.strip().split('\n'))
ValueError: dictionary update sequence element #4 has length 1; 2 is required
Traceback (most recent call last):
File "/etc/zabbix/alert.d//pagerduty", line 242, in <module>
pagerduty_queue.enqueue(Zabbix(sys.argv).event())
File "/etc/zabbix/alert.d//pagerduty", line 222, in event
incident_key = "%s-%s" % (event["id"], event["hostname"])
TypeError: 'NoneType' object has no attribute '__getitem__'
@justizin
justizin / gist:5535371
Created May 7, 2013 19:21
my knife ec2 server create cmd
knife ec2 server create -I ami-3fec7956 -f m1.small -x ubuntu -S justizin --run-list=role[base] -N cheftest-08
@justizin
justizin / gist:5535487
Created May 7, 2013 19:38
how in heck does this generate an md5 error?
cookbook_file '/etc/checksecurity.conf' do
source 'checksecurity.conf'
mode 0600
owner 'root'
group 'root'
end
@justizin
justizin / gist:9945174
Created April 2, 2014 23:10
gmetad segfault
access("/etc/ganglia/gmetad.conf", R_OK) = 0
open("/etc/ganglia/gmetad.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4920, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5af5767000
read(3, "# This is an example of a Gangli"..., 4096) = 4096
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
gmetad.
/* Feel free to specify as many udp_send_channels as you like. Gmond
used to only support having a single channel */
udp_send_channel {
host = 10.1.0.48
port =
ttl = 1
}
/* always send to localhost */
udp_send_channel {
@justizin
justizin / gist:10427383
Created April 10, 2014 21:59
londiste ini
[londiste3]
job_name = st3_l3simple_db1
db = dbname=l3simple_db1
queue_name = replika
logfile = st3simple/log/st3_l3simple_db1.log
pidfile = st3simple/pid/st3_l3simple_db1.pid
@justizin
justizin / gist:10428288
Created April 10, 2014 22:15
londiste drop-node error
[S] [hm@pg06 l3simple]$ sudo -u postgres londiste3 st3simple/st3_l3simple_db1.ini drop-node node2
2014-04-10 22:14:52,769 19253 ERROR Job st3_l3simple_leaf crashed: find_root_db: got loop: dbname=l3simple_db1
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/skytools/scripting.py", line 579, in run_func_safely
r = func()
File "/usr/local/lib/python2.7/dist-packages/skytools/adminscript.py", line 62, in work
fn(*cmdargs)
File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py", line 659, in cmd_drop_node
root_db = self.find_root_db()
File "/usr/local/lib/python2.7/dist-packages/pgq/cascade/admin.py", line 365, in find_root_db