Skip to content

Instantly share code, notes, and snippets.

View lennartkoopmann's full-sized avatar
🤠

Lennart Koopmann lennartkoopmann

🤠
View GitHub Profile
@lennartkoopmann
lennartkoopmann / gist:8197808
Created December 31, 2013 14:44
Short git summary of what changed in the last year.
graylog2-server(020)$ git diff `git log --since="1 year ago" --reverse --pretty=oneline | head -1 | awk '{print $1}'` --shortstat
function colorizeRuleResults(rules, list) {
/*var ruleslist = $("li", list);
for (var i=0; i < ruleslist.size(); i++) {
var rule = ruleslist[i];
var streamruleId = rule.getAttribute("data-streamrule-id");
if (streamruleId == undefined) continue;
var match = rules[streamruleId];
if (match != undefined) {
if (match) {
rule.classList.add("alert-success");
2013-12-09 18:54:46,822 INFO : org.graylog2.periodical.DeflectorManagerThread - Number of messages in <graylog2_108> (200034) is higher than the limit (200000). Pointing deflector to new index now!
2013-12-09 18:54:46,822 INFO : org.graylog2.indexer.Deflector - Cycling deflector to next index now.
2013-12-09 18:54:46,844 INFO : org.graylog2.indexer.Deflector - Cycling from <graylog2_108> to <graylog2_109>
2013-12-09 18:54:46,844 INFO : org.graylog2.indexer.Deflector - Creating index target <graylog2_109>...
2013-12-09 18:54:47,380 INFO : org.graylog2.indexer.Deflector - Done!
2013-12-09 18:54:47,380 INFO : org.graylog2.indexer.Deflector - Pointing deflector to new target index....
2013-12-09 18:54:47,542 INFO : org.graylog2.indexer.Deflector - Flushing old index <graylog2_108>.
2013-12-09 18:54:47,669 INFO : org.graylog2.indexer.Deflector - Setting old index <graylog2_108> to read-only.
2013-12-09 18:54:47,826 INFO : org.graylog2.system.jobs.SystemJobManager - Submitted SystemJob <fe729720-60fa-11e3-a697-4c8d
2013-11-27 15:35:59,802 DEBUG: org.graylog2.radio.buffers.ProcessBufferProcessor - Starting to process message <3bd591a0-5771-11e3-8b35-4c8d79f2b596>.
2013-11-27 15:35:59,803 DEBUG: kafka.producer.async.DefaultEventHandler - Handling 1 events
2013-11-27 15:35:59,803 DEBUG: kafka.producer.BrokerPartitionInfo - Getting broker partition info for topic graylog2-radio-messages
2013-11-27 15:35:59,803 DEBUG: kafka.producer.BrokerPartitionInfo - Partition [graylog2-radio-messages,0] has leader 1
2013-11-27 15:35:59,803 DEBUG: kafka.producer.BrokerPartitionInfo - Partition [graylog2-radio-messages,1] has leader 1
2013-11-27 15:35:59,803 DEBUG: kafka.producer.BrokerPartitionInfo - Partition [graylog2-radio-messages,2] has leader 1
2013-11-27 15:35:59,803 DEBUG: kafka.producer.BrokerPartitionInfo - Partition [graylog2-radio-messages,3] has leader 1
2013-11-27 15:35:59,803 DEBUG: kafka.producer.BrokerPartitionInfo - Partition [graylog2-radio-messages,4] has leader 1
2013-11-27 15:35:59,804 DEBUG: kafka.producer.async.De
public class KafkaProducer implements RadioTransport {
private static final Logger LOG = LoggerFactory.getLogger(KafkaProducer.class);
public final static String KAFKA_TOPIC = "graylog2-radio-messages";
private final Producer<byte[], byte[]> producer;
private final MessagePack msgPack;
echo '{"version": "1.1","host":"example.org","short_message":"A short message that helps you identify what is going on","full_message":"Backtrace here\n\nmore stuff","level":1,"_user_id":9001,"_some_info":"foo","_some_env_var":"bar"}' | nc -w 1 -u localhost 12200
@lennartkoopmann
lennartkoopmann / Example GELF message JSON payload
Last active December 29, 2015 00:19
Example GELF message JSON payload
{
"version": "1.1",
"host": "example.org",
"short_message": "A short message that helps you identify what is going on",
"full_message": "Backtrace here\n\nmore stuff",
"timestamp": 1385053862.3072,
"level": 1,
"_user_id": 9001,
"_some_info": "foo",
"_some_env_var": "bar"
return new Configuration(
ConfigFactory.parseFileAnySyntax(new File("conf/graylog2-web-interface.conf"))
.withFallback(configuration.getWrappedConfiguration().underlying())
);
@Override
public Configuration onLoadConfig(Configuration configuration, File file, ClassLoader classLoader) {
return new Configuration(ConfigFactory.parseFileAnySyntax(new File("conf/graylog2-web-interface.conf")).withFallback(configuration.getWrappedConfiguration().underlying()));
}
$("#universalsearch .timerange-selector-container .keyword input").typeWatch({
callback: function (value) {
console.log(value);
},
wait: 750,
highlight: true,
captureLength: 2
});