forked from dennyzhang/devops_public
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dennyzhang
committed
Jul 21, 2017
1 parent
4b0483e
commit 510f2fe
Showing
30 changed files
with
44 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ This repo host common DevOps scripts, which are public and available for everyon | |
Please contact [email protected], if you have any feedback or suggestions. | ||
|
||
- Github Repo: https://github.com/DennyZhang/devops_public | ||
- Learn more: http://www.dennyzhang.com/category/devops/ | ||
- Learn more: https://www.dennyzhang.com/category/devops/ |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/low_disk/ | ||
Read more: https://www.dennyzhang.com/low_disk/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,11 @@ | |
## File : cleanup_old_files.py | ||
## Author : Denny <[email protected]> | ||
## Created : <2017-05-03> | ||
## Updated: Time-stamp: <2017-07-05 20:35:05> | ||
## Updated: Time-stamp: <2017-07-21 15:35:06> | ||
## Description : | ||
## Remove old files in a safe and organized way | ||
## | ||
## More reading: http://www.dennyzhang.com/low_disk/ | ||
## More reading: https://www.dennyzhang.com/low_disk/ | ||
## | ||
## Sample: | ||
## # Remove files: Check /opt/app and remove files naming "app-.*-SNAPSHOT.jar". But keep latest 2 copies | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/suspicious_process/ | ||
Read more: https://www.dennyzhang.com/suspicious_process/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,15 +3,15 @@ | |
## @copyright 2015 DennyZhang.com | ||
## File : detect_suspicious_process.py | ||
## Author : DennyZhang.com <[email protected]> | ||
## Description : http://www.dennyzhang.com/suspicious_process/ | ||
## Description : https://www.dennyzhang.com/suspicious_process/ | ||
## python ./detect_suspicious_process.py | ||
## python ./detect_suspicious_process.py --whitelist_file /tmp/whitelist.txt | ||
## | ||
## More reading: http://www.dennyzhang.com/suspicious_process/ | ||
## More reading: https://www.dennyzhang.com/suspicious_process/ | ||
## | ||
## -- | ||
## Created : <2016-01-15> | ||
## Updated: Time-stamp: <2017-06-30 23:21:15> | ||
## Updated: Time-stamp: <2017-07-21 15:35:06> | ||
##------------------------------------------------------------------- | ||
import argparse | ||
import subprocess | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/es_shard/ | ||
Read more: https://www.dennyzhang.com/es_shard/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/docker_code_check/ | ||
Read more: https://www.dennyzhang.com/docker_code_check/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/docker_code_check/ | ||
Read more: https://www.dennyzhang.com/docker_code_check/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/docker_code_check/ | ||
Read more: https://www.dennyzhang.com/docker_code_check/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,11 @@ | |
## Author : Denny <[email protected]> | ||
## Description : | ||
## | ||
## More reading: http://www.dennyzhang.com/shellcheck/ | ||
## More reading: https://www.dennyzhang.com/shellcheck/ | ||
## | ||
## -- | ||
## Created : <2017-05-12> | ||
## Updated: Time-stamp: <2017-06-03 19:12:32> | ||
## Updated: Time-stamp: <2017-07-21 15:35:23> | ||
##------------------------------------------------------------------- | ||
code_dir=${1?""} | ||
ignore_file_list=${2-""} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,11 @@ | |
## Author : Denny <[email protected]> | ||
## Description : | ||
## | ||
## More reading: http://www.dennyzhang.com/shellcheck/ | ||
## More reading: https://www.dennyzhang.com/shellcheck/ | ||
## | ||
## -- | ||
## Created : <2017-04-02> | ||
## Updated: Time-stamp: <2017-07-14 10:31:25> | ||
## Updated: Time-stamp: <2017-07-21 15:35:06> | ||
##------------------------------------------------------------------- | ||
import argparse | ||
import sys | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/hostsfile_issues/ | ||
Read more: https://www.dennyzhang.com/hostsfile_issues/ |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/haproxy_stats/ | ||
Read more: https://www.dennyzhang.com/haproxy_stats/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,11 @@ | |
## Author : Denny <[email protected]> | ||
## Description : A Python module to parse haproxy stats | ||
## | ||
## More reading: http://www.dennyzhang.com/haproxy_stats/ | ||
## More reading: https://www.dennyzhang.com/haproxy_stats/ | ||
## | ||
## -- | ||
## Created : <2016-10-04> | ||
## Updated: Time-stamp: <2017-06-30 23:24:44> | ||
## Updated: Time-stamp: <2017-07-21 15:35:06> | ||
##------------------------------------------------------------------- | ||
import parse_haproxy_stats | ||
import datetime | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,11 @@ | |
## Author : Denny <[email protected]> | ||
## Description : A Python module to parse haproxy stats | ||
## | ||
## More reading: http://www.dennyzhang.com/haproxy_stats/ | ||
## More reading: https://www.dennyzhang.com/haproxy_stats/ | ||
## | ||
## -- | ||
## Created : <2016-10-04> | ||
## Updated: Time-stamp: <2017-06-30 23:24:44> | ||
## Updated: Time-stamp: <2017-07-21 15:35:05> | ||
##------------------------------------------------------------------- | ||
# Name haproxy status output field by field | ||
HEADER_FIELD_NAMES = 'pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,chkfail,chkdown,lastchg,downtime,qlimit,pid,iid,sid,throttle,lbtot,tracked,type,rate,rate_lim,rate_max,check_status,check_code,check_duration,hrsp_1xx,hrsp_2xx,hrsp_3xx,hrsp_4xx,hrsp_5xx,hrsp_other,hanafail,req_rate,req_rate_max,req_tot,cli_abrt,srv_abrt,comp_in,comp_out,comp_byp,comp_rsp,lastsess,last_chk,last_agt,qtime,ctime,rtime,ttime,' | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/selenium_docker/ | ||
Read more: https://www.dennyzhang.com/selenium_docker/ |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Read more: http://www.dennyzhang.com/nmap_port_scan/ | ||
Read more: https://www.dennyzhang.com/nmap_port_scan/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,10 @@ | |
## File : tcp_port_scan.py | ||
## Author : DennyZhang.com <[email protected]> | ||
## Description : | ||
## More reading: http://www.dennyzhang.com/nmap_port_scan/ | ||
## More reading: https://www.dennyzhang.com/nmap_port_scan/ | ||
## -- | ||
## Created : <2016-01-15> | ||
## Updated: Time-stamp: <2017-06-30 23:25:57> | ||
## Updated: Time-stamp: <2017-07-21 15:35:05> | ||
##------------------------------------------------------------------- | ||
import argparse | ||
import subprocess | ||
|