apache log x fluentd x datadog
Mind the
format
setting, change ltsv
=> apache2
<source>
type tail
format apache2
#time_format %d/%b/%Y:%H:%M:%S %z
path /var/log/httpd/access_log
pos_file /tmp/access_log.pos
tag apache.access
</source>
Required plugins:
If you are using td-agent, plugin can be installed using:
sudo /usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-record-reformer
Permission issue may arise, so:
chmod 0645 /var/log/httpd
Shoot, apparently we need to tweak to http status matching as well. Based on this article , we should math the
code
instead of status
key<match apache.access>
type datacounter
tag apache.status
aggregate tag
count_key status
pattern1 2xx ^2\d\d$
pattern2 3xx ^3\d\d$
pattern3 4xx ^4\d\d$
pattern4 5xx ^5\d\d$
</match>
Voila
Now we're talking ;)
PS:
Both fluentd and datadog are new to me
Reference
이 문제에 관하여(apache log x fluentd x datadog), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/neofreko/items/2c23523409683250d770텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)