Skip to content

Instantly share code, notes, and snippets.

View lennartkoopmann's full-sized avatar
🤠

Lennart Koopmann lennartkoopmann

🤠
View GitHub Profile
$("#universalsearch .timerange-selector-container .keyword input").typeWatch({
callback: function (string) {
$.ajax({
url: '/a/tools/natural_date_test',
data: {
"string": string,
},
success: function(data) {
console.log(data);
},
}lennart ~/workspace/graylog2/graylog2-server(020)$ curl -XGET http://localhost:12900/system/inputs/7ff46eb0-7306-4dc9-b05e-3301392e17d8/extractors?pretty=true -p0
{
"total" : 6,
"extractors" : [ {
"target_field" : "message",
"id" : "7dd7def2-d48b-4a8d-9ce6-323c65e5ad38",
"title" : "Extract actual message",
"metrics" : {
"time" : {
"std_dev" : 40,
lennart ~/workspace/graylog2/graylog2-web-interface(play)$ curl -XGET http://127.0.0.1:12900/system/inputs/2195083a-5cdf-442d-bc73-d1adf2f298a8/extractors?pretty=true -p0
{
"total" : 2,
"extractors" : [ {
"target_field" : "user_id_2",
"id" : "b712bbe0-720f-4f0f-a7bf-1bf3a36bace0",
"extractor_config" : {
"regex_value" : "id:(\\d+)"
},
"source_field" : "message",
lennart ~/workspace/graylog2/graylog2-web-interface(play)$ curl -XGET 'http://localhost:12900/tools/regex_tester?string=%3C10%3E%2007%20Aug%202013%20somesubsystem%3A%20this%20is%20my%20message%20for%20yo&regex=%5E.*somesubsystem%3A%20(.%2B)&pretty=true' -p0
{
"regex" : "^.*somesubsystem: (.+)",
"matched" : true,
"string" : "<10> 07 Aug 2013 somesubsystem: this is my message for you",
"match" : {
"start" : 32,
"match" : "this is my message for you",
"end" : 58
}
@Override
public ConfigurationRequest getRequestedConfiguration() {
ConfigurationRequest r = new ConfigurationRequest();
r.addField(ConfigurationRequest.Templates.bindAddress(CK_BIND_ADDRESS));
r.addField(ConfigurationRequest.Templates.portNumber(CK_PORT));
r.addField(new TextField(
CK_OVERRIDE_SOURCE,
"Override source",
lennart ~/workspace/graylog2/graylog2-server(020)$ curl -XGET http://127.0.0.1:12910/system/inputs?pretty=true -v -0
* About to connect() to 127.0.0.1 port 12910 (#0)
* Trying 127.0.0.1...
* connected
* Connected to 127.0.0.1 (127.0.0.1) port 12910 (#0)
> GET /system/inputs?pretty=true HTTP/1.0
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5
> Host: 127.0.0.1:12910
> Accept: */*
>
lennart ~/workspace/graylog2/graylog2-server(020)$ curl -XGET http://localhost:12900/system/threaddump
main id=1 state=TIMED_WAITING
at java.lang.Thread.sleep(Native Method)
at org.graylog2.Core.run(Core.java:343)
at org.graylog2.Main.main(Main.java:263)
Reference Handler id=2 state=WAITING
- waiting on <0x70627153> (a java.lang.ref.Reference$Lock)
- locked <0x70627153> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Native Method)
curl -XPOST http://localhost:12900/system/indices/ranges/rebuild
< HTTP/1.1 202 Accepted
...
2013-06-13 00:14:09,150 INFO : org.graylog2.systemjobs.SystemJobManager - Submitted SystemJob <org.graylog2.indexer.ranges.RebuildIndexRangesJob>
2013-06-13 00:14:09,151 INFO : org.graylog2.indexer.ranges.IndexRangeManager - Re-calculating index ranges.
2013-06-13 00:14:09,241 INFO : org.graylog2.indexer.ranges.IndexRangeManager - Index [graylog2_6] is empty. Not calculating ranges.
2013-06-13 00:14:09,316 INFO : org.graylog2.indexer.ranges.IndexRangeManager - Calculated range of [graylog2_4] in [75ms].
2013-06-13 00:14:09,323 INFO : org.graylog2.indexer.ranges.IndexRangeManager - Calculated range of [graylog2_5] in [6ms].
private boolean redisMasterUpToDate() {
return Math.random() < 0.5;
}
udp routerlogs 0.0.0.0 12500
tcp otherlogs 0.0.0.0 12600