Skip to content

Instantly share code, notes, and snippets.

View lennartkoopmann's full-sized avatar
🤠

Lennart Koopmann lennartkoopmann

🤠
View GitHub Profile
@lennartkoopmann
lennartkoopmann / gist:4990673
Created February 19, 2013 22:17
Upgrade graylog2-web-interface from 0.10.1 to 0.10.2
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
index 0407e28..f4c3372 100644
--- a/app/controllers/messages_controller.rb
+++ b/app/controllers/messages_controller.rb
@@ -32,13 +32,13 @@
# Check streams for reader.
block_access_for_non_admins if [email protected]_for_user?(current_user)
- @total_count = MessageGateway.stream_count(@stream.id)
+ @total_count = MessageGateway.stream_count(@stream.id.to_s)
@lennartkoopmann
lennartkoopmann / gist:4961861
Created February 15, 2013 17:19
Patch: Upgrade graylog2-web-interface 0.10.0 to 0.10.11
diff --git a/app/models/stream.rb b/app/models/stream.rb
index 0428edb..5a6e3f9 100644
--- a/app/models/stream.rb
+++ b/app/models/stream.rb
@@ -35,6 +35,10 @@ class Stream
RESERVED_OUTPUT_FIELDS = %w( id typeclass description )
+ def id
+ _id.to_s
lennart.koopmann ~/workspace/graylog2-server(develop)$ java -jar target/graylog2-server-jar-with-dependencies.jar --configfile /etc/graylog2.conf.2
2013-02-03 16:32:18,499 WARN : org.graylog2.Main - Detected another master in the cluster. Retrying in 7 seconds to make sure it is not an old stale instance.
2013-02-03 16:32:25,504 WARN : org.graylog2.Main - Stale master has gone. Starting as master.
@lennartkoopmann
lennartkoopmann / gist:4512319
Created January 11, 2013 17:02
Graylog2 v0.9.6 Rails CVE-2013-0156 fix
diff --git a/Gemfile b/Gemfile
index 464a6a2..abbcdb5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,7 +2,7 @@ source :rubygems
gem 'rack', '~> 1.3.5'
gem 'rake', '~> 0.9.2'
-gem 'rails', '~> 3.1.3'
+gem 'rails', '~> 3.1.10'
@lennartkoopmann
lennartkoopmann / gist:3993975
Created November 1, 2012 14:32
Graylog2 changes between v0.9.6 and current v0.9.7 development status
.gitignore | 4 +-
Makefile | 4 +-
README | 1 -
README.markdown | 9 +
build_script/build_release.sh | 6 +-
build_script/copy/bin/graylog2ctl | 88 +++-
contrib/distro/fedora/graylog2-0.9.5p1.spec | 73 ---
contrib/distro/fedora/graylog2.conf | 48 --
contrib/distro/fedora/graylog2.drl | 26 -
contrib/distro/fedora/graylog2.init | 154 ------
2012-10-29 01:34:42,570 INFO : org.graylog2.periodical.AMQPSyncThread - Current list of consumers is bigger than configuration. Finding out which to kill.
2012-10-29 01:34:42,574 INFO : org.graylog2.periodical.AMQPSyncThread - Consumer <508dcf12535058697a00000b> is not in the configuration anymore. Stopping it.
2012-10-29 01:34:42,717 INFO : org.graylog2.inputs.amqp.AMQPReconnector - Not trying to reconnect to queue logmessages-gelf:fff:GELF, which is not in the configuration anymore.
@lennartkoopmann
lennartkoopmann / gist:3938434
Created October 23, 2012 12:14
step by step jstatd explanation
STEP ONE:
write this to a file called jstatd.all.policy:
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
STEP TWO:
def multiple_masters?
master_count > 1
end
def no_masters?
master_count == 0
end
private
def master_count
def self.throughput
return 0 if no_active_nodes?
active_nodes.map {|n| n.throughput(:current) }.sum
end
lennart ♥ ~/workspace/graylog2/graylog2-server (develop)$ curl -XGET localhost:8001
elasticsearchConnection:FAIL [not connected]
messageFlow:OK