log_parser_notifier 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84c5e471688b6f6865d222445b3a89a51d7093a4
|
4
|
+
data.tar.gz: 069624841b3ee3dd1ae90b56062664f6fc763ee9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 031f31efea968d4ddf83362d3fa0e4cb049953f4ac775893aad483deaa4a0606b3aa7ac5ab0591f79c152509b769d8544abb6df100ae8696e6819366d506e992
|
7
|
+
data.tar.gz: acb2c9f17dca66b6784d7520381b3e636e41b3e7b2a652e0eb1a373ec42a26e2d679b3a60a98a689a5d687afd3e544c4c510aa43342ef29e3000988653c10b0d
|
data/bin/log_parser_notifier
CHANGED
@@ -9,7 +9,7 @@ end
|
|
9
9
|
opts = Slop.parse! do |o|
|
10
10
|
o.banner = 'usage: lib_parser_notifier [options] file_name'
|
11
11
|
o.on :c, :check_interval=, 'check interval (in minutes)', default: 5, as: Integer
|
12
|
-
o.on :
|
12
|
+
o.on :slow_request_threshold=, 'How long does a request need to create an event? (in ms)', default: 500, as: Integer
|
13
13
|
o.on :verbose, 'enable verbose mode'
|
14
14
|
# o.integer '--check_interval', 'check interval (in minutes)', default: 5
|
15
15
|
# o.bool '-v', '--verbose', 'enable verbose mode'
|
@@ -32,7 +32,7 @@ module LogParserNotifier
|
|
32
32
|
"#{request[:controller]}##{request[:action]} #{request[:method]} slow request #{request[:duration]} sec",
|
33
33
|
log,
|
34
34
|
{
|
35
|
-
date_happened: Time.parse(request[:timestamp].to_s).to_i,
|
35
|
+
date_happened: Time.parse(request[:timestamp].to_s).to_i.to_s,
|
36
36
|
aggregation_key: 'slow_request_rails',
|
37
37
|
source_type_name: 'rails_log',
|
38
38
|
alert_type: 'warning',
|