Skip to content

Instantly share code, notes, and snippets.

@bash0C7
Created April 23, 2014 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bash0C7/11222519 to your computer and use it in GitHub Desktop.
Save bash0C7/11222519 to your computer and use it in GitHub Desktop.
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