40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
input {
|
|
file {
|
|
path => '/var/log/akrug/akrug.log'
|
|
}
|
|
}
|
|
|
|
filter {
|
|
grok {
|
|
patterns_dir => "/etc/logstash/patterns/logstash-rug-patterns"
|
|
match => {"message" => "%{TIMESTAMP_ISO8601:akanda_timestamp}:%{LOGLEVEL:loglevel}:%{ASTARA_STATE_METHOD:method}%{UUID:router_id}:%{POSINT:pid}:%{WORKER:worker}:%{THREAD:thread}:incoming message brings queue length to %{INT:queue_length}"}
|
|
add_tag => [ "queue_length" ]
|
|
}
|
|
|
|
grok {
|
|
patterns_dir => "/etc/logstash/patterns/logstash-rug-patterns"
|
|
match => {"message" => "%{TIMESTAMP_ISO8601:akanda_timestamp}:%{LOGLEVEL:loglevel}:%{METHOD:method}:%{POSINT:pid}:%{WORKER:worker}:%{THREAD:thread}"}
|
|
add_tag => [ "threads" ]
|
|
}
|
|
|
|
date {
|
|
match => [ "akanda_timestamp", "YYYY-MM-dd HH:mm:ss" ]
|
|
}
|
|
}
|
|
|
|
output {
|
|
if "queue_length" in [tags] {
|
|
graphite {
|
|
host => "127.0.0.1"
|
|
metrics => { "%{router_id}/queue_length" => "%{queue_length}" }
|
|
metrics_format => "openstack.astara.rug.routers.*"
|
|
}
|
|
} else if "threads" in [tags] {
|
|
graphite {
|
|
host => "127.0.0.1"
|
|
metrics => { "%{worker}/%{thread}" => "1" }
|
|
metrics_format => "openstack.astara.rug.workers.*"
|
|
}
|
|
}
|
|
}
|