httpのアクセスログじゃぁ物足りないので、Macの温度情報を扱ってみる。 MacでScreenのステータスライン(hardstatus)にCPU使用率&温度とメモリ使用率を表示させる - mfumiの日記を参考にTemperature Monitorをインストールし、出力をちょっと整形。 #!/bin/sh /bin/echo -n "`/bin/hostname` " #/bin/echo -n "macbook-air " cmd=/Applications/TemperatureMonitor.app/Contents/MacOS/tempmonitor $cmd -tv|/usr/bin/sed 's/,/ /g' 2行目と最終行の空白部分はタブ。 これを動かせば、マシン名とあちこちの測定結果をTSV形式で出力してくれる。ので、fluentdのexecプラグインでキックするように
![Macbooi Airの温度情報をfluentdで扱う](https://cdn-ak-scissors.b.st-hatena.com/image/square/07e45cd2c37644b7e5e5dde6f94fbefe98919734/height=288;version=1;width=512/http%3A%2F%2F4.bp.blogspot.com%2F-toOn8-6CifA%2FTiihXT1oxPI%2FAAAAAAAAAOk%2FqPvxPAzk5bM%2Fs220%2F%2525E3%252581%2525B2%2525E3%252582%25258D2.jpg)