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

(繼續閱讀...)

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"

(繼續閱讀...)

2018年6月12日

股票配息

中華電信(2412) 股利政策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1064.800.000.000.004.80
中鋼(2002) 股利政策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1060.880.000.000.000.88
裕民(2606) 股 利 政 策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1061.200.000.000.001.20
長興(1717) 股利政策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1060.500.700.000.701.20
遠東新(1402) 股利政策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1061.200.000.000.001.20
亞泥(1102) 股利政策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1061.200.000.000.001.20
台灣大(3045) 股利政策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1065.600.000.000.005.60
合庫金(5880) 股利政策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1060.750.300.000.301.05
第一金(2892) 股利政策
年 度現 金 股 利盈 餘 配 股公 積 配 股股 票 股 利合 計
1060.900.100.000.101.00
(繼續閱讀...)

2018年5月5日

Linux ICMP 監控Script

每秒發送1個ICMP封包,加上時間標記並記錄下來
[root@Localhost ~]# vi ping_check.sh
#!/bin/bash

DATE=$(date +"%d.%m.%Y %T")
SHORT_DATE=$(date +"%d.%m.%Y")

echo
echo "Pinging host " $@
echo

HOST=$@


ping $HOST | while read PONG
do
        grep -q ttl <<< "$PONG"

        if [ $? -eq 0 ]; then

                echo "`date`: $PONG"
                echo "`date`: $PONG" &>> ping_check_$SHORT_DATE.log

        else

                echo "`date`: ping failed, $HOST host is DOWN!" &>> ping_check_$SHORT_DATE.log
                echo "$PONG" &>> ping_check_$SHORT_DATE.log
        fi
done
(繼續閱讀...)

2018年3月16日

Cisco 2960X NetFlow設定

flow record NETFLOW-RECORD
 match ipv4 tos
 match ipv4 protocol
 match ipv4 source address
 match ipv4 destination address
 match transport source-port
 match transport destination-port
 collect transport tcp flags
 collect interface input
 collect counter bytes long
 collect counter packets long
 collect counter bytes permanent
 collect counter packets permanent
 collect timestamp sys-uptime first
 collect timestamp sys-uptime last
!
flow exporter NETFLOW-EXPORTER
 destination 192.168.88.100
 source Vlan300
 transport udp 9996
!
flow monitor NETFLOW-MONITOR
 exporter NETFLOW-EXPORTER
 cache timeout active 60
 record NETFLOW-RECORD
!
sampler NETFLOW-FLOWSAMPLER
 mode random 1 out-of 500
!
interface GigabitEthernet1/0/1
 ip flow monitor NETFLOW-MONITOR sampler NETFLOW-FLOWSAMPLER input

(繼續閱讀...)

2018年3月8日

Splunk整合Slack發送即時警示訊息

Splunk也可以跟Slack整合即時發送告警訊息,設定方式如下

Step1:先到下方Splunk網頁去捉取Slack Notification Alert應用套件安裝
https://splunkbase.splunk.com/app/2878/

Step2:安裝完成後,在應用套件-->Slack Alerts-->設定  ,將申請好的Slack API Webhook網址貼上去,並存檔,申請API的方式可參考上篇文章連結







Step3:在Splunk頁面-->警示-->設定即時警示動作 ,選擇觸發動作為Slack
照需求選好要發送的頻道,訊息內容的地方,可以個人需求填入,也可以將警示的結果用Splunk定義好的變數參數代入,變數代表的內容可以Splunk網站的這個連結
我使用的變數如下
$server.serverName$:bangbang:$name$:$result._raw$

(繼續閱讀...)

2018年2月28日

Cacti整合Slack發送告警訊息

Slack目前支援使用API或是Webhook的方式來發送訊息到指定的Channel中,Cacti只要稍為調整一下tholdhold的程式後,便可以經由Slack來發送告警訊息並且推播到手機中。下面介紹如何透過Slack Webhook的方式來傳送告警訊息。

一、申請好Slack的帳號,在Slack的網站裡面點選進入APP&Custom Integrations ->Build->Make a Custom Integration 新增 Incoming WebHooks,新增想要送的channels,申請完可以取得Webhook URL

(繼續閱讀...)

Copyright © 2009 New Life in Taipei All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.