Categories
- FFMpeg (5)
- Libav (1)
- Google (3)
- iBeacon (1)
- LDAP (3)
- Me (2)
- Network (11)
- OS (149)
- RTMP (4)
- SIP (1)
- Kamailio (1)
- SNMP (1)
- VMware (20)
- VCP考試 (1)
- 伺服器 網站服務 (105)
- 名詞解釋 (4)
- 專案管理 (1)
- 工具軟體 (50)
- Adobe (1)
- FMS (1)
- Cloudera (1)
- Docker (1)
- Eclipse (4)
- Intellij (2)
- OBS (2)
- Office (10)
- Excel (4)
- PowerPoint (5)
- Postman (1)
- Splunk (13)
- Virtualbox (2)
- Visual Studio (2)
- 文字編輯器 (10)
- Sublime Text 2 (6)
- Sublime Text 3 (3)
- Vim (3)
- 連線工具 (1)
- Xshell (1)
- Adobe (1)
- 程式語言 (79)
- CSS (2)
- HTML (2)
- iOS (1)
- Java (30)
- JavaScript (5)
- jQuery (4)
- jsTree (2)
- JSP (3)
- PHP (16)
- Python (7)
- Ruby (1)
- sed (1)
- Shell Script (8)
- Windows Bash Script (1)
- XML (1)
- 資料庫 (37)
- FFMpeg (5)
Category Archives: 伺服器 網站服務
[Tomcat] allowLinking setting (soft link)
edit the file ‘Tomcat/conf/context.xml’ change to restart Tomcat. Ref. Tomcat軟連接訪問配置symbol link
Posted in Tomcat
Leave a comment
[WordPress] Avoid xmlrpc attack
add below code in the functions.php in your themes.
1 2 |
add_filter('xmlrpc_enabled', '__return_false'); |
edit .htaccess
1 2 3 4 5 6 |
#protect xmlrpc <Files xmlrpc.php> Order Deny,Allow Deny from all </Files> |
delete the xmlrpc.php file Ref. 解決WordPress被利用xmlrpc.php文件攻擊導致內存超負荷
Posted in WordPress
Leave a comment
S3 CORS setting
Ref: Enabling Cross-Origin Resource Sharing 讓 S3 允許 cross-domain 存取 Amazon S3 CORS headers only show during OPTIONS (preflight) and not during GET request Must set HEAD to avoid from OPTIONS error.
Posted in AWS
Leave a comment
Install aglio in Ubuntu 14.04
Install nodejs Ref. NodeSource Node.js Binary Distributions
1 2 |
apt-get install -y nodejs nodejs-legacy |
Install python
1 2 |
apt-get install python-dev |
Install aglio Ref. Github : aglio
1 2 |
npm install -g aglio |
Posted in Aglio, Ubuntu
Leave a comment
[Git] Git command…
git stash: 暫存機制 git stash: 暫存機制,可保留目前狀態,重新取回其他版本的code git stash clear: 清除所有暫存空間 git stash drop {git status name}: 清除指定的暫存狀態,如果不加參數,則刪除最近的那一個 git stash list: 查看目前暫存列表 git stash apply {git stash name}: 取回暫存的狀態,如果不加參數,則抓取最近的版本 git stash show {git stash name}: 查看指定的暫存與parent差異的部分,如果不加參數,則顯示最近的那一個版本 git stash branch {git stash … Continue reading
Posted in Git
Leave a comment
[Elasticsearch] The health status means…
When we list the indexes, we will get the status information. It shows the health of index in the elasticsearch cluster. green All shards are allocated. yellow The primary shard is allocated but replicas are not. red The specific shard … Continue reading
Posted in Elasticsearch
Leave a comment
[Elasticsearch] List all indexes and optimize it.
When we deleted the indexes, the data were just marked by deleted. We can list all indexes to show status.
1 2 |
sudo curl 'localhost:9200/_cat/indices?v' |
It will show the health, index name, pri, rep, docs.count, docs.deleted, store.size, pri.store.size.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
health index pri rep docs.count docs.deleted store.size pri.store.size yellow kibana-int 5 1 5 0 66.7kb 66.7kb yellow logstash-2015.02.13 5 1 402030 3366353 1.2gb 1.2gb yellow logstash-2015.02.18 5 1 86843 3393979 1.1gb 1.1gb yellow logstash-2015.02.15 5 1 218402 3063776 1.2gb 1.2gb yellow logstash-2015.02.03 5 1 178621 2072000 756.3mb 756.3mb yellow logstash-2015.02.06 5 1 466185 2479658 963.4mb 963.4mb yellow logstash-2015.02.24 5 1 364473 0 166.5mb 166.5mb yellow logstash-2015.02.02 5 1 313488 1838855 710.1mb 710.1mb yellow logstash-2015.02.07 5 1 371602 3397300 1.2gb 1.2gb yellow logstash-2015.02.21 5 1 3583288 0 1.2gb 1.2gb yellow logstash-2015.02.22 5 1 3554707 0 1.1gb 1.1gb yellow logstash-2015.02.23 5 1 3680625 0 1.2gb 1.2gb |
If we want to clear … Continue reading
Posted in Elasticsearch
Leave a comment
[Nagios][Cacti] Monitor disk space > 8TB
Because the limitation of snmp, when the disk space is more than 8TB, we will get the wrong value. Whether we use snmpwalk or snmpget, the results are all the same. Therefore, we need to restore the correct value. If … Continue reading
Posted in Cacti, Nagios, SNMP
Leave a comment
[Logstash] Pattern set in grok.
The original warning message is this.
1 2 |
"You are using a deprecated config setting "pattern" set in grok. Deprecated settings will continue to work, but are scheduled for removal from logstash in the future. You should use this instead: match => { "message" => "your pattern here" } If you have any questions about this, please visit the #logstash channel on freenode irc."" |
And here is the original server config.
1 2 3 4 5 6 7 8 |
if [type] == "nginx-access" { grok { type => "nginx-access" pattern => "%{NGINXACCESS}" patterns_dir => ["/opt/logstash/patterns"] } } |
So what we should do is modify the config. Using the match function to replace the pattern, like this.
1 2 3 4 5 6 7 8 |
if [type] == "nginx-access" { grok { patterns_dir => "/opt/logstash/patterns" type => "nginx-access" match => ["message", "%{NGINXACCESS}"] } } |
Posted in Logstash
Leave a comment
[Kibana] Time range search
If I want to search information within these seven days.
1 2 |
@timestamp:["now-7d" TO "now"] |
If I want to search information between 2015-01-01 and 2015-01-31.
1 2 |
@timestamp:["2015-01-01" TO "2015-01-31"] |
If I want to search information between 2015-02-01 13:00:00 and 2015-02-01 18:00:00.
1 2 |
@timestamp:["2015-02-01T13:00:00" TO "2015-02-01T18:00:00"] |
Posted in Kibana
Leave a comment