Skip to content

Instantly share code, notes, and snippets.

View higebu's full-sized avatar
🏠
Working from home

Yuya Kusakabe higebu

🏠
Working from home
View GitHub Profile
@higebu
higebu / cassandra_zabbix_template.xml
Created June 6, 2012 05:46
Zabbix Template for Cassandra
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2012-05-14T12:36:06Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
@higebu
higebu / gist:2880790
Created June 6, 2012 08:57
fluentd forword error
2012-06-06 17:25:26 +0900: starting fluentd-0.10.22
2012-06-06 17:25:26 +0900: reading config file path="/etc/fluent/fluent.conf"
2012-06-06 17:25:26 +0900: adding source type="tail"
2012-06-06 17:25:26 +0900: adding match pattern="**.**" type="forward"
2012-06-06 17:25:26 +0900: adding forwarding server '192.168.0.230:24224' host="192.168.0.230" port=24224 weight=60
2012-06-06 17:25:44 +0900: detached forwarding server '192.168.0.230:24224' host="192.168.0.230" port=24224 phi=8.148601411473535
2012-06-06 17:26:27 +0900: failed to flush the buffer, retrying. error="no nodes are available" instance=10245920
2012-06-06 17:26:27 +0900: /usr/local/rvm/gems/ruby-1.9.3-p194/gems/fluentd-0.10.22/lib/fluent/plugin/out_forward.rb:137:in `write_objects'
2012-06-06 17:26:27 +0900: /usr/local/rvm/gems/ruby-1.9.3-p194/gems/fluentd-0.10.22/lib/fluent/output.rb:440:in `write'
2012-06-06 17:26:27 +0900: /usr/local/rvm/gems/ruby-1.9.3-p194/gems/fluentd-0.10.22/lib/fluent/buffer.rb:274:in `write_chunk'
@higebu
higebu / fluentd
Created June 10, 2012 06:36 — forked from hito-asa/agent_fluentd.conf
/etc/init.d/fluentd
#!/bin/bash
PID_FILE=/var/run/fluentd.pid
CONF_FILE=/etc/fluent/fluent.conf
LOG_FILE=/var/log/fluent/fluent.log
PSNAME="fluentd --daemon"
F_USER=fluentd
F_GROUP=fluentd
RUBY_VER="1.9.3-p194"
@higebu
higebu / send-global-ip.py
Created June 10, 2012 07:29
E-mail notification of changes in global IP address
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import urllib
import smtplib
from email.MIMEText import MIMEText
from email.Utils import formatdate
import datetime
@higebu
higebu / vyatta-pptp.config
Created June 10, 2012 15:50
vyatta pptp configuration
vpn {
pptp {
remote-access {
authentication {
local-users {
username user {
password pass
}
}
mode local
@higebu
higebu / tailf.py
Created September 15, 2012 12:20
tailf.py
#!/usr/bin/env python
import subprocess
filename = 'test.log'
cmd = ('tail -n +1 --follow=name ' + filename)
p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
while True:
print p.stdout.readline()
@higebu
higebu / zabbix2.0.4_display_all_graph.patch
Last active December 11, 2015 11:09
Patch file for Zabbix2.0.4. Display all graphs of a host, when "not selected" is selected.
diff -u -r zabbix_orig/include/classes/screens/CScreenChart.php zabbix/include/classes/screens/CScreenChart.php
--- zabbix_orig/include/classes/screens/CScreenChart.php 2012-12-09 13:20:04.000000000 +0900
+++ zabbix/include/classes/screens/CScreenChart.php 2013-01-21 14:51:05.000000000 +0900
@@ -38,6 +38,7 @@
parent::__construct($options);
$this->graphid = isset($options['graphid']) ? $options['graphid'] : null;
+ $this->dataId = isset($options['dataId']) ? $options['dataId'] : null;
}
@higebu
higebu / mintMenu-no-such-file-or-directory-error.log
Last active December 13, 2015 19:49
Patch for mintmenu 5.3.8 to run application with unicode commands.
[Errno 2] No such file or directory
@higebu
higebu / zabbix2.0.4_jmx_double_type.patch
Created March 4, 2013 16:07
Patch for Zabbix2.0.4 Java Gateway to monitoring java.lang.Double type attributes.
--- zabbix-2.0.4/src/zabbix_java/src/com/zabbix/gateway/JMXItemChecker.java 2012-12-08 20:09:15.000000000 +0900
+++ zabbix-2.0.4_new/src/zabbix_java/src/com/zabbix/gateway/JMXItemChecker.java 2013-01-23 15:24:07.000000000 +0900
@@ -21,6 +21,7 @@
import java.util.HashMap;
import java.util.Vector;
+import java.math.BigDecimal;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanInfo;
@higebu
higebu / make_hhvm_with_enable_zend_compat.log
Created December 27, 2013 05:57
cmake -DENABLE_ZEND_COMPAT=ON . make -j8
[ 0%] [ 0%] Built target double-conversion
Built target afdt
[ 0%] [ 1%] Scanning dependencies of target mbfl
Built target sqlite3
Built target timelib
[ 3%] [ 3%] Built target folly
Built target lz4
[ 7%] Built target zip_shared
[ 7%] Building C object hphp/third_party/libmbfl/mbfl/CMakeFiles/mbfl.dir/__/filters/mbfilter_iso8859_2.c.o
Scanning dependencies of target hphp_zend