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
while DATE=$(date +%s); do syslog-ng-ctl stats | awk -vhost=$HOSTNAME -F\; 'NR!=1 && $1 != "src.none" {if ($2 == "") { t=$3 } else {t=$2} printf "PUTVAL %s/syslog_ng-%s/derive-%s %s:%s\n",host,t,$5,systime(),$6}'; sleep 10; done | socat - UNIX-CLIENT:/var/run/collectd/sock |
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
#!/bin/sh | |
# | |
# chkconfig: 35 99 99 | |
# description: Node.js /home/nodejs/sample/app.js | |
# | |
. /etc/rc.d/init.d/functions | |
USER="node" |
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
{ | |
"order" : 0, | |
"template" : "*stash-*", | |
"mappings" : { | |
"properties" : { | |
"useragent" : { "type" : "string", "index" : "not_analyzed" } | |
} | |
} | |
} |
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
diff -ur collectd-5.2.0.ori/bindings/Makefile.am collectd-5.2.0/bindings/Makefile.am | |
--- collectd-5.2.0.ori/bindings/Makefile.am 2012-11-17 23:23:21.000000000 +0100 | |
+++ collectd-5.2.0/bindings/Makefile.am 2012-11-20 13:54:11.000000000 +0100 | |
@@ -48,7 +48,7 @@ | |
buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \\ | |
$(top_builddir)/config.status | |
- cd buildperl && @PERL@ Makefile.PL INSTALL_BASE=$(DESTDIR)$(prefix) @PERL_BINDINGS_OPTIONS@ | |
+ cd buildperl && @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@ |
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
LoadPlugin df | |
<Plugin df> | |
MountPoint "/afs" | |
MountPoint "/" | |
MountPoint "/boot" | |
MountPoint "/usr" | |
MountPoint "/var/core" | |
FSType "nfs" | |
FSType "tmpfs" |
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
# apparently combining INSTALL_BASE and INSTALLDIRS doesn't work (as with PREFIX+INSTALLDIRS): | |
# pwd | |
/tmp/pff/collectd-5.2.0/bindings/perl | |
# perl Makefile.PL PREFIX=/tmp/test INSTALLDIRS=vendor | |
Writing Makefile for Collectd | |
# make install | |
Skip blib/lib/Collectd/Plugins/OpenVZ.pm (unchanged) | |
Skip blib/lib/Collectd/Unixsock.pm (unchanged) | |
Skip blib/lib/Collectd/Plugins/Monitorus.pm (unchanged) | |
Skip blib/lib/Collectd.pm (unchanged) |
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
@1353079018/~(0)$ a=$(printf '\e]710;?\a') | |
@1353079038/~(0)$ echo $a | xxd | |
0000000: 1b5d 3731 303b 3f07 0a .]710;?.. | |
@1353079046/~(0)$ $a | |
bash: $'\E]710;?\a': command not found | |
@1353079049/~(0)$ |
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
<Chain PreCache> | |
<Rule unquote> | |
<Match regex> | |
Plugin "^GenericJMX$" | |
</Match> | |
<Target replace> | |
PluginInstance "\"" "" | |
</Target> | |
</Rule> | |
</Chain> |
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
LoadPlugin "target_set" | |
<Chain "PreCache"> | |
<Rule "ipmi_temperature"> | |
<Match "regex"> | |
Plugin "^ipmi$" | |
Type "^temperature$" | |
TypeInstance "(FCB Ambient1|Dom A FP Temp system_board|Ambient Temp system_board)" | |
</Match> | |
<Target "set"> |
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
# Setup Logger (source: L<Log::Contextual/LOGGER CODEREF> | |
my @caller_info; | |
my $logref = sub { | |
chomp($_[0]); | |
warn "$_[0] at $caller_info[1] line $caller_info[2].\\n" | |
}; | |
my $var_log = Log::Contextual::SimpleLogger->new({ | |
levels_upto => LEVEL->[$opt->verbose], | |
coderef => $logref, | |
}); |