2015/07/17

ELK Note (ElasticSearch-Logstash-Kibana)

 

 

logstash filter grok

https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html

logstash filter date

https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html

logstash filter translate

https://www.elastic.co/guide/en/logstash/current/plugins-filters-translate.html

lostash filter mutate

https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html

 

logstash debug config

.\logstash.bat -f dddd.conf

input {
    stdin{}
}

filter {
    grok {
      match => { "message" => "(\s(?<stock_id>[0-9]{5}))" }
    }
    date {
        locale => "en"
        match => ["message", "YYYY-MM-dd;HH:mm:ss.SSS"]
        timezone => "Europe/Vienna"
        target => "@timestamp"
        add_field => { "debug" => "timestampMatched"}
   }
}

output {
    stdout {
            codec => "rubydebug"
    }
}

http://blog.mmlac.com/how-to-pre-process-logs-with-logstash/

 

 

logstash timestamp issue fix

http://stackoverflow.com/questions/25156517/logstash-date-parsing-as-timestamp-using-the-date-filter

 

logstash IISLOG

Logstash config for IIS logs

http://dotnetanalysis.blogspot.tw/2014/11/logstash-config-for-iis-logs.html

URL

http://engineering.laterooms.com/enriching-logs-with-logstash/

.net+LogParser like logstash

TimberWinR 

 

 

 

Regular Expression Test

http://grokconstructor.appspot.com/do/match#result

 

HowTo install ELK on Windows Server IIS

https://blog.basefarm.com/blog/how-to-install-logstash-on-windows-server-2012-with-kibana-in-iis/

2014/05/05

AutoFac InvalidException at System.Core, Version=2.0.5.0 or IContainerProviderAccessor.ContainerProvider returned null

 

Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

IContainerProviderAccessor.ContainerProvider returned null, which is invalid. If the container provider belongs to the HttpApplication subclass, ensure that it is a static variable.

 

 

解決方式:安裝 .net Framework 4 更新

http://support.microsoft.com/kb/2468871

2013/12/12

Sharepoint 2007 如何找出占用儲存空間大的清單或文件庫?

要如何找出 Sharepoint 2007 占用磁碟空間的兇手呢?

 

簡要的說:

1.管理中心->應用程式管理->網站集合配額與鎖定:設定配額

2.網站設定->網站集合管理->儲存空間配置來查詢

 

 

image

 

 

image

 

image

image

 

image

 

http://guru-web.blogspot.tw/2009/04/storage-space-allocation-reports.html

2013/12/04

KB-Redmine 網站反應速度很慢

Redmine 裝在 WEBrick 1.9.3 上面,某些電腦有可能出現速度很慢的問題,這是因為 WEBrick 有進行 DNS 反查的動作,若有電腦開啟防火牆,不允許反查的話,就有可能會發現 Retry。

 

可以解決茶包的方法, Windows 是在 ruby 安裝目錄裡面,例如:C:\Ruby\v1.9.3\lib\ruby\1.9.1\webrick

=============

Having the same issue here (even a year later). Under linux you have to do the following:

Look for the file /usr/lib/ruby/1.9.1/webrick/config.rb and edit it.

Replace the line

:DoNotReverseLookup => nil,

with

:DoNotReverseLookup => true,

Restart webrick and it'll work like a charm :)

 

http://stackoverflow.com/questions/1156759/webrick-is-very-slow-to-respond-how-to-speed-it-up/3465134#3465134

2013/11/15

Redmine-如何批次修改問題 How to Batch Edit Issue

很簡單…在問題的表格上按下右鍵就有了

image

2013/11/11

Redmine 2.3.3 Install on Windows

主要參考文件

http://www.redmine.org/projects/redmine/wiki/RedmineInstall

 

安裝步驟如下:

1.Ruby 1.9.3

2.Ruby DevKit (Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2)<==不同版本配不同的DevKit

3.Rails 3.2.13

4.Redmine 2.3.3

 

遇到的問題:

 

Q1.無法連外網,要使用 HTTP_PROXY ,怎麼做

Q2.無法使用 HTTPS 連至 https://rubygems.org/ ,怎麼辦?

Q3.好用的 Plugin 有那些?

 

 

1.Ruby 1.9.3

The required Ruby versions for a given Redmine version is:

Redmine version Supported Ruby versions Rails version used
current trunk ruby 1.8.72, 1.9.2, 1.9.3, 2.0.01, jruby-1.6.7, jruby-1.7.2 Rails 3.2.13
2.3.0 ruby 1.8.72, 1.9.2, 1.9.3, 2.0.01, jruby-1.6.7, jruby-1.7.2 Rails 3.2.13
2.2.4 ruby 1.8.72, 1.9.2, 1.9.3, jruby-1.6.7 Rails 3.2.13

 

Ruby 1.9.3-p448

 

2.Ruby DevKit (Ruby 1.8.6 to 1.9.3: tdm-32-4.5.2)<==不同版本配不同的DevKit

 

3.Rails 3.2.13

 

gem install rdoc

gem install rails -v=3.2.13

gem install bundler

 

D:\redmine-2.3.3>rake generate_secret_token
[31mCould not find gem 'nokogiri (< 1.6.0) x86-mingw32' in the gems available o
n this machine.[0m
[33mRun `bundle install` to install missing gems.[0m

 

 

gem install nokogiri -v=1.5.10

 

D:\redmine-2.3.3>rake generate_secret_token
[31mCould not find gem 'rmagick (>= 2.0.0) x86-mingw32' in the gems available o
n this machine.[0m
[33mRun `bundle install` to install missing gems.[0m

 

 

set CPATH=”C:\Program Files (x86)\ImageMagick-6.8.7-Q16\include”
set LIBRARY_PATH=C:\Program Files (x86)\ImageMagick-6.8.7-Q16\lib

 

D:\redmine-2.3.3>bundle install --without development test rmagick
Fetching source index from https://rubygems.org/
Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification

information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect wit
using SSL, edit your Gemfile sources and change 'https' to 'http'.

 

Notepad.exe Edit Gemfile

source 'http://rubygems.org'

 

 

D:\redmine-2.3.3>gem install rmagick
ERROR:  Error installing rmagick:
        The 'rmagick' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'

 

download DevKit & run devkitvars.bat to add PATH

D:\redmine-2.3.3>d:\share\RubyDevKit\devkitvars.bat

For use with Ruby 1.8.7 and 1.9.3:http://rubyinstaller.org/downloads/

 

gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include

 

D:\redmine-2.3.3>rake generate_secret_token
[31mCould not find gem 'jquery-rails (~> 2.0.2) x86-mingw32' in t
ble on this machine.[0m
[33mRun `bundle install` to install missing gems.[0m

 

 

 

Q1.無法連外網,要使用 HTTP_PROXY ,怎麼做?

SET HTTP_PROXY=http://<ip>:<port>

 

 image

Q2.無法使用 HTTPS 連至 https://rubygems.org/ ,怎麼辦?

Fetching source index from https://rubygems.org/
Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification

information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect wit
using SSL, edit your Gemfile sources and change 'https' to 'http'.

 

Notepad.exe Edit Gemfile

source 'http://rubygems.org'

 

Q3.好用的 Plugin 有那些?

 

剪貼簿貼上

https://github.com/peclik/clipboard_image_paste

RedmineCRM:Check List

http://redminecrm.com/projects/checklist/pages/1

 

http://redminecrm.com/pages/plugins

 

Q4.如何 Run as Windows Service

 

HowTo run Redmine as a Windows service (win32-service + taskill approach)

 

sc create redmine binPath= "C:\Ruby193\bin\rubyw -C D:\redmine\ service.rb"

 

 

參考連結

 

在 Windows 上安裝 Redmine 2.3.0 的筆記

http://crboy.logdown.com/posts/141615-install-redmine-on-windows

在 Windows 架設 Redmine 專案管理平台的安裝設定筆記

http://www.imagemagick.org/script/binary-releases.php#windows

2013/10/02

Outlook 2013 的尺規不見了?

剛剛換了 Oulook 2013 ,寫信寫到一半,插入表格後,想利用尺規來調整表格欄寬,結果一直找不到藏到那邊去了,後來還是 Google 後才找到解決方式。

 

解決方式如下圖

image

 

 

原文網址

http://www.msoutlook.info/question/739