This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| MONITOR_DIR="/tmp/js" | |
| OUTPUT_DIR="/tmp/min-js" | |
| YUIC_JAR="~/tool/yuicompressor/build/yuicompressor-2.4.7.jar" | |
| YUIC_OPTS="--charset utf-8" | |
| inotifywait -m -e modify --format %w%f -r $MONITOR_DIR | egrep --line-buffered '\.(js|css)$' | \ | |
| while read js;do | |
| min_js=`echo $js | sed "s|$MONITOR_DIR|$OUTPUT_DIR|"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # datacounterと連携させるときにアイテム、グラフ、スクリーン作りまくるのが面倒だから | |
| # テンプレート化できるようにに変換する | |
| # host:webservice, key:site1_2xx_count | |
| # => host:webservice_site1, key:2xx_count | |
| module Fluent | |
| class ZabbixExtOutput < ZabbixOutput | |
| Fluent::Plugin.register_output('zabbix_ext', self) | |
| config_param :split_host, :bool, :default => false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #@config | |
| #<source> | |
| # type mytail | |
| # format apache | |
| # path /var/log/httpd/access_log | |
| # tag apache.access | |
| # to_i size,code | |
| #</source> | |
| module Fluent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #指定ディレクトリ下のファイル操作を監視する | |
| # | |
| #config | |
| #<source> | |
| # type inotify | |
| # tag inotify.log | |
| # dir /tmp/inotify_test_d/ | |
| #</source> | |
| # | |
| #emit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #<source> | |
| # type mysql_query | |
| # log /var/log/mysqld/query.log | |
| #</source> | |
| # TODO:複数行クエリ対応 | |
| # TODO:余計なクエリの除外せねば | |
| # TODO:タイムスタンプをログから取得するように | |
| # TODO:ログイン後にuseされると接続DBがわからない | |
| # TODO:タグ名を変数にしないと | |
| # TODO:td-agent停止時にtailプロセスをkillできてない |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use Data::Dumper; | |
| use ZabbixAPI; | |
| my $user = "<user>"; | |
| my $password = "<password>"; |
NewerOlder