Skip to content

Instantly share code, notes, and snippets.

@mariussturm
mariussturm / gist:bcd6a9f3138ae0912b92
Last active August 29, 2015 14:13
Install Graylog web on SLES11
- Download http://packages.graylog2.org/releases/graylog2-web-interface/graylog2-web-interface-0.92.4.tgz
- install -d -o "graylog2" -g "graylog2" -m 0755 "/var/lib/graylog2-web"
- install -d -o "graylog2" -g "graylog2" -m 0755 "/var/log/graylog2-web"
- install -d -o "graylog2" -g "graylog2" -m 0755 "/var/run/graylog2-web"
- install -d -o "graylog2" -g "graylog2" -m 0755 "/etc/graylog2/web"
- tar xzvf graylog2-web-interface-0.92.4.tgz
- cp -r graylog2-web-interface-0.92.4 /usr/share/graylog2-web
- cp /usr/share/graylog2-web/conf/application.conf /etc/graylog2/web/
- cp /usr/share/graylog2-web/conf/play.plugins /etc/graylog2/web/
- cp /usr/share/graylog2-web/conf/graylog2-web-interface.conf /etc/graylog2/web/web.conf
@mariussturm
mariussturm / gist:3d99f5c55b59db804e43
Created January 21, 2015 17:19
SLES11 /etc/init.d/elasticsearch
#!/bin/sh
#
# elasticsearch <summary>
#
# chkconfig: 2345 80 20
# description: Starts and stops a single elasticsearch instance on this system
#
### BEGIN INIT INFO
# Provides: Elasticsearch
@mariussturm
mariussturm / gist:a1cb134da2f0f6a9eded
Last active November 12, 2015 10:06
Install Graylog server on SLES11
- Download Java7 RPM: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
- zypper install jdk-7u75-linux-x64.rpm
- Install MongoDB
- zypper addrepo http://download.opensuse.org/repositories/server:database/SLE_11_SP3/server:database.repo
- zypper refresh
- zypper install mongodb
- /sbin/chkconfig --add mongodb
- /etc/init.d/mongodb start
- Install Elasticsearch
- Download https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.1.noarch.rpm
@mariussturm
mariussturm / gist:0b885812500d91df8c3a
Last active January 9, 2023 12:57
Graylog2 create inputs/streams/alerts
#!/bin/bash
sleep 3
IP_ADDRESS=$(hostname -I | cut -f1 -d' ')
GRAYLOG2_URL="http://admin:admin@${IP_ADDRESS}:12900"
GRAYLOG2_INPUT_GELF_TCP='
{
"global": "true",
@mariussturm
mariussturm / gist:061b9f4861ef1292aa60
Last active February 1, 2017 13:16
How to pair Firefox 29 with Owncloud's mozilla_sync / Weave
_Go to your Owncloud installation <https://myowncloud/remote.php/mozilla_sync> and accept the SSL Certificate
_Open about:config
_Create: services.sync.username <string> the value should be a hash not the username itself. (You only need the hash if the
sync was setup with a pre FF29, if you start from scratch the string doesn't matter)
You can look this up in an older browser or in the logs of your Owncloud server!!
_Go to: Preferences -> Sync -> Setup Firefox sync (you should see the old UI now)
'I Have an Account'
'I don't have the device with me'
'Account' - again use the hash NOT the actual username!
@mariussturm
mariussturm / Rakefile
Created March 18, 2014 09:00
Apply librarian-chef's cookbook versions to a Chef environment
require "ridley"
require "librarian/chef"
Celluloid.logger = nil
namespace :chef do
desc "Apply cookbook verions from librarian-chef's lockfile to a chef environment"
task :apply, :environment do |t, args|
write_chef_environment(args.environment, librarian_locked_verions)
end
Katze123
#!/usr/bin/env ruby
require 'rubygems'
require 'net/ssh/gateway'
gateway = Net::SSH::Gateway.new('remote_host', \
'remote_user', \
:auth_methods => ['publickey'], \
:forward_agent => true)