Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fluentd_iremocon.conf
<source>
type twittersearch
consumer_key XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
consumer_secret XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
oauth_token XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
oauth_token_secret XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
user_id bash0C7
count 100
run_interval 1200
result_type recent
latest_id_file bash0C7_since_id_file.pos
tag twittersearch.bash0C7
</source>
<match twittersearch.**>
type rewrite
remove_prefix twittersearch
add_prefix twitter.iremocon
<rule>
key text
pattern ^(?!iremocon).*
ignore true
</rule>
<rule>
key text
pattern ([^0-9]+)$
ignore true
</rule>
<rule>
key text
pattern ^.*([0-9]+).*$
replace \1
</rule>
</match>
<match twitter.iremocon.**>
type copy
<store>
type null
</store>
<store>
type ruby_eval
require_libs iremocon
command iremocon = Iremocon.new '192.168.0.100'; iremocon.is record['text'].to_i; iremocon.instance_eval {@telnet.close}
run_interval 2
</store>
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment