Upgrade to Pro — share decks privately, control downloads, hide ads and more …

部屋のメトリクス可視化

 部屋のメトリクス可視化

W8LT#6の資料

Shohei Yasutake

November 25, 2015
Tweet

More Decks by Shohei Yasutake

Other Decks in Programming

Transcript

  1. 3BTQCFSSZ1J  ී௨ʹ-JOVY͕ಈ͘ɺখ͍ͯ҆͘͞Ϛγϯ  (1*0ͱ͍͏CJUΛೖग़ྗͰ͖Δϐϯ͕͋ͬͯిࢠ෦඼ Λૢ࡞Ͱ͖Δ  Թ౓࣪౓ηϯαʔ %)5 

    "EBGSVJU@1ZUIPO@%)5ͱ͍͏ϥΠϒϥϦΛͦͷ· ·࢖ͬͯΔ  র౓ηϯαʔ /+--' 3BTQCFSSZ1J͸Ξ φϩάೖྗͰ͖ͳ͍ͷͰɺ"%ม׵͕ඞཁ  1*$ϚΠίϯʹ"%ม׵ͯ͠΋ΒͬͯγϦΞϧ௨৴
  2. <source> type exec command python /home/pi/temp_log/temp.py 11 26 # DHT11,

    pin=26 keys temperature,humidity,outdoor tag monitor.dht run_interval 1m </source> <filter monitor.dht> type typecast types temperature:float,humidity:float,outdoor:float </filter> <source> type exec command python /home/pi/lux_log/lux_log.py keys lux tag monitor.lux run_interval 1m </source> <filter monitor.lux> type typecast types lux:float </filter> <match monitor.**> type forward <server> name kikyo host kikyo.local </server> </match> 3BTQCFSSZ1JͷqVFOUEDPOG ؾԹɾ࣪౓ηϯαʔ͔Β ஋ΛͱΔTPVSDF ܕΩϟετ͢ΔpMUFS র౓ηϯαʔ͔Β஋ΛऔΔTPVSDF αʔόʹGPSXBSE ໊લ͸LJLZP
  3. <match monitor.dht> type copy <store> type influxdb host localhost port

    8086 dbname monitor time_precision s </store> <store> type exec command ruby /etc/td-agent/scripts/temp_alert.rb buffer_path /tmp/td-agent.temp_alert keys temperature,outdoor flush_interval 10m </store> </match> <match monitor.**> type influxdb host localhost port 8086 dbname monitor time_precision s </match> αʔόʔͷqVFOUEDPOG *OqVY%#ʹͿͪ͜Ή ৑௕ʁ ΤΞίϯ͚ͭͬͺͳ͠Ξϥʔτ
  4. *OqVY%#  ࣌ܥྻσʔλϕʔε  (P੡  42-ͬΆ͍ΫΤϦݴޠֶ͕͋ͬͯशίετ௿Ί  ଞʹ΋͍Ζ͍Ζ࣌ܥྻσʔλϕʔε͸͋Δ͚Ͳझຯͩ͠ͱΓ͋ ͑ͣ࢖ͬͯΈͨ

     %&-&5&͕Ͱ͖ͳ͍ʜ $16͕ʹுΓ෇͘   ͳͥNBDLFSFM΍EBUBEPH͡Όͳ͍ͷ͔  ແྉϓϥϯͩͱอଘظ͕ؒ೔͔ͩΒ ࣮ࡍ͸΋͏ͪΐ͍௕ ͍ͬΆ͍ 
  5. (SBGBOB  ϝτϦΫεՄࢹԽπʔϧ  *OqVY%#ͷଞʹ(SBQIJUF 0QFO54%#  &MBTUJDTFBSDI $MPVE8BUDI ,BJSPT%#

     1SPNFUIFVTΛαϙʔτ  &MBTUJDͷ,JCBOBͷGPSLΒ͍͠  ,JCBOBͷ΄͏͕ػೳ͸ଟ͍͚Ͳ,JCBOB͸ *OqVY%#Λαϙʔτ͍ͯ͠ͳ͍  EFNPIUUQQMBZHSBGBOBPSH