1.timelion
.es(q='status:200',index=filebeat-testindex*,timefield=@timestamp,metric=count).label('200'),.es(q='status:502',index=filebeat-testindex*,timefield=@timestamp,metric=count).label('502')
2.qps
3.nginx的配置
http { include mime.types; default_type application/octet-stream; server_tokens off; log_format json '{"@timestamp":"$time_iso8601",' '"@version":"1",' '"server_addr":"$server_addr",' '"remote_addr":"$remote_addr",' '"host":"$host",' '"uri":"$uri",' '"body_bytes_sent":$body_bytes_sent,' '"bytes_sent":$body_bytes_sent,' '"upstream_response_time":$upstream_response_time,' '"request":"$request",' '"request_length":$request_length,' '"request_time":$request_time,' '"status":"$status",' '"http_referer":"$http_referer",' '"http_x_forwarded_for":"$http_x_forwarded_for",' '"http_user_agent":"$http_user_agent"' '}';