Skip to content

Instantly share code, notes, and snippets.

View faxm0dem's full-sized avatar
⌨️
Typing…

Fabien Wernli faxm0dem

⌨️
Typing…
View GitHub Profile
@faxm0dem
faxm0dem / gist:e1befcc33123256e96d7
Created May 22, 2015 15:40
riemann reinject example
(let [
index (default {:state "ok" :ttl 60} (index))
indexer (default {:state "ok" :ttl 60}
index
(where (not (expired? event))
(changed-state {:init "ok"}
(tag "changed-state"
index))))
]
(streams
@faxm0dem
faxm0dem / collectd-jmx.conf
Created August 5, 2015 12:18
collectd jmx example
<Plugin "java">
JVMARG "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar"
LoadPlugin "org.collectd.java.GenericJMX"
<Plugin "GenericJMX">
<MBean "gc-count">
ObjectName "java.lang:type=GarbageCollector,*"
InstancePrefix "gc-"
InstanceFrom "name"
<Value>
Type "derive"
@faxm0dem
faxm0dem / id4.wtf
Created August 2, 2022 07:16
id4 virus upload code
trans for 3x-169
{
go for 1256:@benchHost*2456
set VirusMark^678*245-treatX^treatY
}
quarryXmark for %567* going for
{
{
{
send ValueThreat-bendColumnX*2456/Vcxzr(Xgf)
@faxm0dem
faxm0dem / sol.ilom
Created February 19, 2020 07:53
conserver ILOM
#!/usr/bin/expect -f
#
# script for SUN ILOM on x4x00 series
# tested on ILOM 1.0.3
# this will probably be obsoleted in future revisions
# when ipmi 2.0 SOL will be supported on these boxes
# connects to $username@$ilom
# and starts SOL command
# Also checks for Terminated Serial command
# To re-init SOL connection on ILOM
@faxm0dem
faxm0dem / riemann-client.go
Created January 28, 2020 07:54
riemann websocket client in Golang
package main
import (
"fmt"
"log"
"golang.org/x/net/websocket"
)
func main() {
#!/usr/bin/perl -w
#
# Jesper Nyerup <nyerup@one.com>
my $ipmitool = '/usr/bin/ipmitool';
my @chararray = split(//, join(' ', @ARGV));
usage() if (@chararray == 0 or @chararray > 14);
system("$ipmitool raw 0x6 0x58 193 0x0 0x0 ".
[
"and",
[
"=",
"name",
"operatingsystem"
],
[
"=",
"environment",
@faxm0dem
faxm0dem / collectd.conf
Created January 31, 2019 13:07
collectd if_errors monitoring
<Plugin "threshold">
<Plugin "interface">
<Type "if_errors">
FailureMax 500
Hits 5
Interesting false
Percentage false
Persist false
WarningMax 100
</Type>
@faxm0dem
faxm0dem / netdata-template.json
Last active July 10, 2018 20:29
netdata json backend
{
"netdata" : {
"order" : 0,
"template" : "netdata-*",
"settings" : {
"index" : {
"number_of_shards" : "1",
"number_of_replicas" : "0"
}
},
@faxm0dem
faxm0dem / syslog-ng-ii.conf
Created July 12, 2017 14:54
syslog-ng sucks less with ii
#
@version: 3.9
block source ii (
channel('#riemann')
server('chat.freenode.net')
basedir('/tmp/ii')
)
{
channel {