This image contains logstash and is used to filter, aggregate and forward events.
Logstash can only receive logs from Log-Courier.
It is expected that the logs come in a specific format. These are described in the next sections by type.
Required field:
Type=loadbalancer
The rest of the fields should be in the format used by HAProxy (v1.5).
Type=webserver
The webserver annotated events are parsed correctly if:
Example:
172.17.8.101 - - [27/May/2015:09:48:56 +0000] "GET /zurmo/app/index.php/min/serve/g/js/lm/1432627852 HTTP/1.1" 304 238 "http://core-01/zurmo/app/index.php/zurmo/default/login" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36"
Added Fields:
- agent # User-Agent
- bytes
- clientip
- host # Host name
- httpversion
- ident
- referrer
- request
- response
- timestamp
- type
- verb
Apache Log Format:
LogFormat "%t %{UNIQUE_ID}e \"%r\" %>s %t %T %D %B %h %A %a %U %q" custom_format
Example:
[27/May/2015:09:48:56 +0000] VWWTCAoBAAYAAAAwfwIAAAAD "GET /zurmo/app/index.php/min/serve/g/js/lm/1432627852 HTTP/1.1" 304 [27/May/2015:09:48:56 +0000] 0 145076 0 172.17.8.101 10.1.0.6 172.17.8.101 /zurmo/app/index.php/min/serve/g/js/lm/1432627852
Added fields:
- time_serve_request_in_s
- time_serve_request_in_us
- response_size_in_bytes
- request_text
- request_received_date
- request_id
- remote_ip
- remote_host
- local_ip
- http_status_code
- host
Format:
{Request_Id} {Time_elapsed}
Example:
VWWTBwoBAAYAAAA0CGMAAAAG 0.042580842971802
Added Fields:
- Request_Id
Required Field:
Type=cache
Events from memcached are parsed correctly if they appear in the following format:
COMMUNICATIONDIR [<>]{1}
MESSAGE .*
MEMCACHED %{COMMUNICATIONDIR:communictaion_direction}?%{INT:connection_socket_descriptor}? %{MESSAGE:message}
Required Field:
category=system_metrics
System Metrics are also parsed. It is intended that you send values from collectd written out to CSV files. The following metrics are supported:
metrics:
Format
{UNIX-Timestamp},{Value}
Added Fields
- epoch
- value
Format
{UNIX-Timestamp},{Value}
Added Fields
- epoch
- value
Format
{UNIX-Timestamp},{Value}
Added Fields
- epoch
- value
Format
{UNIX-Timestamp},{Read-Value},{Write-Value}
Added Fields
- epoch
- read
- write
Format
{UNIX-Timestamp},{Value}
Added Fields
- epoch
- value
All events are forwarded to elasticsearch. The short-term aggregated metrics are additionally written to etcd.
Elasticsearch is found by using service discovery with etcd. The following paths are accessed:
/services/logstorage/%UUID/ip
/services/logstorage/%UUID/transport-port
The node name which is used in the elasticsearch cluster is dependend of the ip:
logstash_{$PRIVATE_IP}
CPU and memory metrics are written to etcd. These events are found by resource field:
resource=cpu
resource=memory
The values of the metrics are written into the following path:
/services/[type]/[service-id]/metrics/[resource]/[metric]/[time_collected]
The square bracket fields are replaced dynamically with the value of the field in the received event.
Example:
/services/webserver/ac396664-4503-4d5a-983b-6dc50c9ff6ae/metrics/cpu/cpu_user/2015-05-27T11:53:15.685Z
The response times of haproxy are aggregated and written to:
/services/loadbalancer/metrics/response_time/[@timestamp]
The keys are the timestamp of the event. The content consists of the whole metrics event which contains average, min, max, standard deviation and several percentile values.
This logstash instance does aggregate the response times from the load balancers and calculate some metrics of the data.
Field for metrics: 'time_duration'
This metric is calculated twice over a different time period:
Flushed: every 5s Cleared: every 5s
Field set:
metric-period=short_term
Flushed: every 10s Cleared: every 10s
Field set:
metric-period=long_term
The following command starts the logstash container whose Ports are mapped 1:1 to the host.
You should also set the Environment Variables for the etcd port and ip as well as the ip of the host.
docker run --name zurmo_logstash \
-p 5000:5000 \
-p 9300:9300 \
-e "ETCD_IP=10.1.42.1" \
-e "ETCD_PORT=4001" \
-e "HOST_PRIVATE_IPV4=10.1.42.1" \
icclabcna/zurmo_logstash
Content type
Image
Digest
sha256:51539e7f3…
Size
405.2 MB
Last updated
about 11 years ago
docker pull icclabcna/zurmo_logstash