Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woothee/fluent-plugin-woothee
https://github.com/woothee/fluent-plugin-woothee
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/woothee/fluent-plugin-woothee
- Owner: woothee
- License: other
- Created: 2012-07-20T08:54:29.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-01-25T10:26:41.000Z (over 5 years ago)
- Last Synced: 2024-07-08T02:27:24.631Z (3 months ago)
- Language: Ruby
- Size: 29.3 KB
- Stars: 14
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# fluent-plugin-woothee
'fluent-plugin-woothee' is a Fluentd filter plugin to parse UserAgent strings and to filter/drop specified categories of user terminals (like 'pc', 'smartphone' and so on).
'woothee' is multi-language user-agent strings parser project. See: https://github.com/woothee/woothee
## Configuration
To add woothee parser result into messages:
@type woothee
key_name agent
merge_agent_info yes
Result messages has attributes like 'agent\_name', 'agent\_category' and 'agent\_os' from woothee parser result. If you want to change attribute names, or want to merge more attributes of browser vendor and its version, write configurations as below:
@type woothee
key_name agent
merge_agent_info yes
out_key_name ua_name
out_key_category ua_category
out_key_os ua_os
out_key_os_version ua_os_version
out_key_version ua_version
out_key_vendor ua_vendor
To pass messages only with specified user-agent categories (and merge woothee parser result), configure like this:
@type woothee
key_name agent
merge_agent_info yes
filter_categories pc,smartphone,mobilephone,appliance
# logs of other categories will be dropped
# ...
Or, you can specify categories to drop (and not to merge woothee result):
@type woothee
key_name agent
merge_agent_info false # default
drop_categories crawler
# ...
### Fast Crawler Filter
If you want to drop __almost__ all of messages with crawler's user-agent, and not to merge woothee result, you just specify plugin type:
@type woothee_fast_crawler_filter
key_name useragent
'fluent-plugin-woothee' uses 'Woothee.is\_crawler' of woothee with this configuration, fast and incomplete method to judge user-agent is crawler or not.
If you want to drop all of crawlers completely, specify 'type woothee' and 'drop_categories crawler'.### Output plugin
The output version of woothee plugin is not supported in versions for Fluentd v0.14.
## TODO
* patches welcome!
## Copyright
* Copyright (c) 2012- TAGOMORI Satoshi (tagomoris)
* License
* Apache License, Version 2.0