Archive for 11月, 2012

 

fabric 環境切替

11月 29th, 2012

こんな感じで env.roledefs={} env.roledefs_dev = {  ‘proxy':['192.168.0.100'] } env.roledefs_prod = {  ‘proxy':['192.168.1.99'] } env.development = True def dev():  env.roledefs = env.roledefs_dev def production():  env.development = False  env.roledefs = env.roledefs_prod @roles(‘proxy’) def print_proxy():  print env.host で $ fab dev print_proxy 192.168.0.100 こんな感じで、ちゃんとrolesが反映されました。

Read full article | コメントは受け付けていません。

nagios check iptables

11月 26th, 2012

ローテクで。 iptables -n -L > /tmp/check_itpabes_list これをrootのcronで実行させておいてnagiosで出力ファイルをチェック policy DROPされてればokを返すpluginを作成しておく。 後は、普通に外部からアクセス出来ないことを確認する。 それだけ。

Read full article | コメントは受け付けていません。

nagios active_checks_enabled

11月 25th, 2012

アクティブチェックをしないとき。 ( 継承しているhostで既に他でやっているので必要ないときなど。 host { active_checks_enabled 0 }

Read full article | コメントは受け付けていません。

nagios nrpe settings

11月 25th, 2012

pdf http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf yumで入れるだけなので サーバー側追加 plugin nagios-plugins-nrpe.x86_64 : Provides nrpe plugin for Nagios クライアント側( nagios と必要な pluginsも入れます。 nrpe.x86_64 : Host/service/network monitoring agent for Nagios クライアント側設定 /etc/nagios/nrpe.cfg server_port=25666 # 待ち受け interface server_address=192.168.0.26 # サーバー ipaddress allowed_hosts=192.168.0.170 ( iptablesでこれを許可します。 起動 $ sudo /etc/init.d/nrpe start Starting nrpe:                         […]

Read full article | コメントは受け付けていません。

nagios plugin API | pythonで書いてみる。

11月 25th, 2012

http://nagiosplug.sourceforge.net/developer-guidelines.html // http://nagios.sourceforge.net/docs/3_0/pluginapi.html 決め事はシンプルかな 基本3点 * 80字以内の1行で出力する * return code 0 OK 1 Warning 2 Critical 3 Unknown * option There are a few reserved options that should not be used for other purposes: -V version (–version) -h help (–help) -t timeout (–timeout) -w warning threshold (–warning) -c critical threshold (–critical) -H hostname (–hostname) -v […]

Read full article | コメントは受け付けていません。

nagios install

11月 24th, 2012

新しく入れ直すのでメモ yum search nagios plugins がいろいろ。 nagios-plugins.x86_64 : Host/service/network monitoring program plugins for                      : Nagios nagios-plugins-all.x86_64 : Nagios Plugins – All plugins nagios-plugins-apt.x86_64 : Nagios Plugin – check_apt nagios-plugins-bdii.x86_64 : Nagios Plugin – check_bdii_entries nagios-plugins-breeze.x86_64 : Nagios Plugin – check_breeze nagios-plugins-by_ssh.x86_64 : Nagios Plugin – […]

Read full article | コメントは受け付けていません。

Android Platform Version 4.0.3が着実に増えていますね。

11月 23rd, 2012

http://developer.android.com/about/dashboards/index.html Gingerbread 2.3.3 – 2.3.7 9 0.3% 10 53.9% Honeycomb 3.1 12 0.4% 3.2 13 1.4% Ice Cream Sandwich 4.0.3 – 4.0.4 15 25.8% Jelly Bean 4.1 16 2.7% 感想としては、4.0は25%なのですが、 2.3は、以前より利用している人なので、既存層であり アプリを新規インストールしたり、アクティブに端末を利用する人は4.0の人の方が多いと予想します。 実際、4.0のアクティブ率が2.3を上回っているアプリの話を良く聞きました。

Read full article | コメントは受け付けていません。

MVNO iij が LTE対応 +050plus

11月 22nd, 2012

iij 高速モバイルDサービス。 https://www.iijmio.jp/guide/outline/hdd/?l=0m159a 初期費用 3,150円(税込)(*1) 月額料金 945円(税込) バンドルクーポン 0MB 通信速度 通常時 最大128kbps クーポン購入時 下り最大100Mbps、上り最大37.5Mbps(*2) SIMカード 1枚提供 標準SIM/microSIMを選択可能 これで050plusで運用している人は問題なく運用出来ているそうです。 でどんな感じか考えてみました。 ☆目的:安く、電話+メールだけ利用する。 初期費用+条件 ・050plusはsms認証が必要なので、認証用番号(初回のみ) ・simフリー端末 or ドコモ : とりあえずAndroidを想定 ・iij 2945円 simフリー端末と書いた時点で面倒ですね。と思ったのですが https://www.iijmio.jp/guide/outline/hdd/devices.jsp docomo端末はsimロックフリーにする必要ないみたいです!これ重要ですね ご自身の型落ち携帯がある場合がベストです。 月額 iij 945円 050plus 345円 ◎ドコモのネットワークなので広さは問題ない。 ○メールやテキストサイト閲覧程度は128kbpsで問題ない。 1台安く携帯を持ちたい場合この方法は悪くないかな。 電話しない人やskype、comm、lineで十分な人は050plusいらないので、子供に持たせるのに良いですね

Read full article | コメントは受け付けていません。

gmail 検索オプション

11月 22nd, 2012

http://support.google.com/mail/bin/answer.py?hl=en&answer=7190 -is:starred ☆のついてないものも出来た。 例えばこんなので from:アドレス -is:starred -is:important before:2012/01/01 アドレスリスト作って自動でゴミ箱に移動する。 というextension作ったけど。 これは公開は出来ない。

Read full article | コメントは受け付けていません。

2012/11 useragent | ie6は少ないです。

11月 21st, 2012

あるサイトのuseragent 2012年11月分 androidとiosを除いた比率。 Internet Explorer Windows 48.7% Chrome Windows 23.65% Firefox Windows 11.48% Safari Macintosh 5.50% Chrome Macintosh 2.10% ie比率かなり減ってきました。 internet explore 1. 9.0 63.62% 2. 8.0 30.95% 3. 7.0 3.17% 4. 6.0 1.74% 5. 10.0 0.45% さすがに ie6.0 は対応しなくても良さそうですね PCの1%未満です。 androidとiosはandroidのほうが少し多かったです。

Read full article | コメントは受け付けていません。