日常的工作需要Looking Glass 加快查修問題的速度,除了BGP網路外,還有一般的專線跟上網線路,都會需要類似BGP Looking Glass Server的功能,想把它整合成統一的Ping Server,目前使用了Open Source的BGP Looking Glass程式,再稍微修改一下程式後,就可以達到想要的功能,以下為在CentOS上面建置的方式
Step 1:先到https://github.com/Cougar/lg ,先照網站上面的介紹,捉取程式
yum install git
git config --global url."https://".insteadOf git://
git clone https://github.com/Cougar/lg.git
Step 2:安裝必要的環境程式
yum install wget perl-Net-Telnet perl-Net-Telnet-Cisco perl-XML-Parser httpd
yum install gcc* perl-CPAN
yum install perl*
yum install mtr
yum install perl-DB_File
安裝perl的外掛,要用cpanm 安裝,後面CGI程式會到用,沒安裝會無法執行主程式,會一直跳Perl執行錯的error log
cpanm Net::SSH::Perl
cpanm Net::Telnet::Perl
Step 3:將git捉下來的程式放到WEB執行的目錄,並設定好對應的Apache的權限
mkdir /var/www/html/lg
cd /var/www/html/lg
cp /root/lg-1.9/lg.cgi .
cp /root/lg-1.9/favicon.ico .
cp /root/lg-1.9/lg.conf .
(繼續閱讀...)
2020年2月9日
2019年11月9日
Smokeping整合Slack發送告警訊息
Smokeping工具,安裝的方式可參考官網,目前實作用Slack發出告警訊息
依照個人安裝的目錄,調整相關的設定檔路徑即可
vi /usr/local/smokeping/etc/slack_notify.sh
#!/bin/bash
function send_alert {
# Send a SmokePing status alert to the slack channel
alertname="$1"
target="$2"
losspattern="$3"
rtt="$4"
hostname="$5"
(繼續閱讀...)
依照個人安裝的目錄,調整相關的設定檔路徑即可
vi /usr/local/smokeping/etc/slack_notify.sh
#!/bin/bash
function send_alert {
# Send a SmokePing status alert to the slack channel
alertname="$1"
target="$2"
losspattern="$3"
rtt="$4"
hostname="$5"
(繼續閱讀...)
2019年10月5日
Juniper 高階SRX Cluster Login Other RE方式
適用於高階SRX 的型號如3000系列或是5000系列
(繼續閱讀...)
{primary:node0} user@SRX01-LAB-DC> start shell % rlogin -Jk -T node1 --- JUNOS 15.1X49-D170.4 built 2019-02-22 23:02:01 UTC {secondary:node1} user@SRX02-LAB-DC>
適用於一般低階SRX 的型號(通用指令)
{primary:node0} user@SRX01-LAB-DC> request routing-engine login node 1 --- JUNOS 15.1X49-D170.4 built 2019-02-22 23:02:01 UTC {secondary:node1} user@SRX02-LAB-DC>
2019年8月3日
Cisco 3850X IP SLA send syslog config
ip sla 1
icmp-echo 192.168.99.205
threshold 500
timeout 500
frequency 1
ip sla 2
icmp-echo 192.168.99.201
threshold 500
timeout 500
frequency 1
ip sla 3
icmp-echo 192.168.99.197
threshold 500
timeout 500
frequency 1
(繼續閱讀...)
icmp-echo 192.168.99.205
threshold 500
timeout 500
frequency 1
ip sla 2
icmp-echo 192.168.99.201
threshold 500
timeout 500
frequency 1
ip sla 3
icmp-echo 192.168.99.197
threshold 500
timeout 500
frequency 1
(繼續閱讀...)
2019年7月21日
Juniper OSPF traceoptions
set protocols ospf traceoptions file ospf.log
set protocols ospf traceoptions flag database-description
set protocols ospf traceoptions flag event
set protocols ospf traceoptions flag error
set protocols ospf traceoptions flag lsa-request
(繼續閱讀...)
set protocols ospf traceoptions flag database-description
set protocols ospf traceoptions flag event
set protocols ospf traceoptions flag error
set protocols ospf traceoptions flag lsa-request
(繼續閱讀...)
2019年6月27日
Juniper SRX Monitor Traffic
Host:
root# run monitor traffic interface ge-0/0/x matching "host 10.130.38.94" no-resolve
Protocol:
root# run monitor traffic interface ge-0/0/x matching arp
Port:
root# run monitor traffic interface ge-0/0/x matching "port 22"
IP address:
root# run monitor traffic interface ge-0/0/x matching "host 10.130.38.94" no-resolve detail
A network:
root# run monitor traffic interface ge-0/0/x matching "net 225.1.1.0/24" no-resolve detail
TCP port 179:
root# run monitor traffic interface ge-0/0/x matching "tcp port 179"
(繼續閱讀...)
root# run monitor traffic interface ge-0/0/x matching "host 10.130.38.94" no-resolve
Protocol:
root# run monitor traffic interface ge-0/0/x matching arp
Port:
root# run monitor traffic interface ge-0/0/x matching "port 22"
IP address:
root# run monitor traffic interface ge-0/0/x matching "host 10.130.38.94" no-resolve detail
A network:
root# run monitor traffic interface ge-0/0/x matching "net 225.1.1.0/24" no-resolve detail
TCP port 179:
root# run monitor traffic interface ge-0/0/x matching "tcp port 179"
(繼續閱讀...)
2018年6月12日
股票配息
| 中華電信(2412) 股利政策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 4.80 | 0.00 | 0.00 | 0.00 | 4.80 |
| 中鋼(2002) 股利政策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 0.88 | 0.00 | 0.00 | 0.00 | 0.88 |
| 裕民(2606) 股 利 政 策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 1.20 | 0.00 | 0.00 | 0.00 | 1.20 |
| 長興(1717) 股利政策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 0.50 | 0.70 | 0.00 | 0.70 | 1.20 |
| 遠東新(1402) 股利政策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 1.20 | 0.00 | 0.00 | 0.00 | 1.20 |
| 亞泥(1102) 股利政策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 1.20 | 0.00 | 0.00 | 0.00 | 1.20 |
| 台灣大(3045) 股利政策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 5.60 | 0.00 | 0.00 | 0.00 | 5.60 |
| 合庫金(5880) 股利政策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 0.75 | 0.30 | 0.00 | 0.30 | 1.05 |
| 第一金(2892) 股利政策 |
| 年 度 | 現 金 股 利 | 盈 餘 配 股 | 公 積 配 股 | 股 票 股 利 | 合 計 |
| 106 | 0.90 | 0.10 | 0.00 | 0.10 | 1.00 |
訂閱:
文章 (Atom)