<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3296003435031025495</id><updated>2025-06-23T21:30:55.946+08:00</updated><category term="Cisco"/><category term="Linux"/><category term="Windows"/><category term="工作"/><category term="文章分享"/><category term="RouterOS"/><category term="Juniper"/><category term="投資理財"/><category term="Taipei"/><category term="lyrics"/><category term="環島旅行"/><category term="單車"/><category term="News"/><category term="讀書心得"/><category term="Splunk"/><category term="法律"/><category term="Brocade"/><category term="FORTINET"/><category term="IPv6"/><category term="NfSen"/><category term="Security"/><category term="TV"/><category term="攝影"/><category term="英文"/><title type='text'>New Life in Taipei</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>236</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-8436643121369891272</id><published>2022-09-03T12:58:00.004+08:00</published><updated>2022-09-03T12:58:49.503+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="RouterOS"/><title type='text'>RouterOS CPU效能監控發送即時告警</title><content type='html'>&lt;p&gt;CPU效能監控發送即時告警，DeviceAverageLoadThreshold設定為CPU平均用量超過40%，送出Slack告警通知&lt;/p&gt;&lt;p&gt;/system scheduler&lt;/p&gt;&lt;p&gt;add interval=5m name=CPUOverloadCheck on-event=&quot;:local ScriptName \&quot;CPUOverloadCheck\&quot;;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:local ScriptRunning [system script job find where script=\$ScriptName];\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:if (\$ScriptRunning) do={\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; :log info \&quot;The script \$ScriptName cannot be run, the script is already running (Change the NumberOfMeasurements to redu\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ce the script)\&quot;;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n} else={\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; /system script run \$ScriptName;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n}&quot; policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;/system script&lt;/p&gt;&lt;p&gt;add dont-require-permissions=yes name=CPUOverloadCheck owner=wallacelocal policy=\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source=&quot;:local &lt;span style=&quot;color: red;&quot;&gt;DeviceAverageLoadThreshold 40&lt;/span&gt;;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:local NumberOfMeasurements 5;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:local Time [/system clock get time];\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:local Date [/system clock get date];\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:local Load 0;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:local Message \&quot;\&quot;;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:for Measurement from=1 to=\$NumberOfMeasurements do={\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; :local CPULoad [/system resource get cpu-load];\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; :set Load (\$Load + \$CPULoad);\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; :set Message (\$Message&amp;nbsp; . [:tostr \$CPULoad]&amp;nbsp; . \&quot;% \&quot;);\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; :delay 5s;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n}\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n:local AverageCPULoad (\$Load / \$NumberOfMeasurements);\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \nif (\$AverageCPULoad &amp;gt; \$DeviceAverageLoadThreshold) do={\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; :log warning \&quot;Average CPU load = \$AverageCPULoad%\&quot;;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; :set Message \&quot;CPU utilization exceeded \$DeviceAverageLoadThreshold% threshold. Result of \$NumberOfMeasurements times C\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; PU load measurements: \$Message\&quot;;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n&amp;nbsp; &amp;nbsp; :local MessageText \&quot;CPU Average Overload \$AverageCPULoad%. \$Message\&quot;;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n\t/tool fetch mode=https url=\&quot;https://hooks.slack.com/services/AAAZ0S4ZZ/B5EJGGGER/3427P7uGAGAbiYC\&quot;&amp;nbsp; http-method=p\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ost&amp;nbsp; http-data=\&quot;payload={\\\&quot;text\\\&quot;: \\\&quot;\$MessageText\\\&quot;,\\\&quot;channel\\\&quot;:\\\&quot;circuit-alert\\\&quot;,\\\&quot;username\\\&quot;:\\\&quot;\$[/sy\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; stem identity get name]\\\&quot;,\\\&quot;icon_url\\\&quot;:\\\&quot;https://spy-family.net/assets/img/special/episode11/01.png\\\&quot;}\&quot;\r\&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; \n}&quot;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/8436643121369891272/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/8436643121369891272?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8436643121369891272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8436643121369891272'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2022/09/routeros-cpu.html' title='RouterOS CPU效能監控發送即時告警'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-6905632407549330598</id><published>2022-08-26T15:53:00.002+08:00</published><updated>2022-08-26T15:53:25.429+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="RouterOS"/><title type='text'>RouterOS SCP備份Script</title><content type='html'>&lt;p&gt;&amp;nbsp;#For SCP Backup&lt;br /&gt;/system backup save name=full&lt;br /&gt;:local strid (:put ([/system identity get name] . &quot;.backup&quot;));&lt;br /&gt;:put $strid;&lt;br /&gt;/tool fetch upload=yes url=&quot;sftp://10.77.21.41/home/autobackup/ROS-Backup/$strid&quot; user=autobackup&amp;nbsp;password=dafsdfXX13X src-path=full.backup src-address=10.33.41.26&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/6905632407549330598/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/6905632407549330598?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/6905632407549330598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/6905632407549330598'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2022/08/routeros-scpscript.html' title='RouterOS SCP備份Script'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-810515877035339413</id><published>2022-08-10T09:39:00.005+08:00</published><updated>2022-08-10T09:50:18.663+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="工作"/><title type='text'>Cacti 指令加入監控device</title><content type='html'>&lt;p&gt;先用下方指令找出對應的template ID的對應&lt;/p&gt;&lt;p&gt;php -q /var/www/html/cacti/cli/add_graph_template.php --list-hosts&lt;/p&gt;&lt;p&gt;php -q /var/www/html/cacti/cli/add_tree.php --list-hosts&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUWk3iMFxpkOjdGbrfEOYmjrp9DAGtQR_WEAGRXWNZIA1VBrVMNKRKGq8ArJtzYTcoxc1JHsQZ7xNLrOdSXcltc8WXC6-aU3xx1n3bUrYAEtJ8xewlOozy94x6zt-y8y6ilpyi-9aHR5lXUQge-Dk4vwy_VF1R1j7QSKNHkSsSO2lmJzIvJJqjiOhNQ/s1499/CCC.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;549&quot; data-original-width=&quot;1499&quot; height=&quot;234&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUWk3iMFxpkOjdGbrfEOYmjrp9DAGtQR_WEAGRXWNZIA1VBrVMNKRKGq8ArJtzYTcoxc1JHsQZ7xNLrOdSXcltc8WXC6-aU3xx1n3bUrYAEtJ8xewlOozy94x6zt-y8y6ilpyi-9aHR5lXUQge-Dk4vwy_VF1R1j7QSKNHkSsSO2lmJzIvJJqjiOhNQ/w640-h234/CCC.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;建立設備清單對應表&lt;br /&gt;[root@LAB&amp;nbsp;~]# vi ROSID&lt;br /&gt;10.233.88.21 ROS-CHT-03-DCLAB&lt;br /&gt;10.233.88.22 ROS-CHT-04-DCLAB&lt;br /&gt;10.233.88.23 ROS-CHT-05-DCLAB&lt;br /&gt;10.233.88.24 ROS-TFN-17-DCLAB&lt;br /&gt;10.233.88.25 ROS-TFN-18-DCLAB&lt;br /&gt;10.233.88.26 ROS-TFN-19-DCLAB&lt;br /&gt;10.233.88.27 ROS-TFN-20-DCLAB&lt;br /&gt;10.233.88.28 ROS-TFN-21-DCLAB&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div&gt;建立一組Script讀入指定的設備清單&lt;br /&gt;[root@LAB ~]#vi autoROS.sh&lt;br /&gt;#!/bin/sh&lt;br /&gt;while read IP HOST&lt;br /&gt;do&lt;br /&gt;&amp;nbsp; &amp;nbsp; php /var/www/html/cacti/cli/add_device.php --description=${HOST} --ip=${IP} --community=XXXZZZZ --&lt;span style=&quot;color: red;&quot;&gt;template=13&lt;/span&gt;;&lt;br /&gt;done &amp;lt; /root/&lt;span style=&quot;color: red;&quot;&gt;ROSID&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;最後執行 Script即完成&lt;/div&gt;&lt;div&gt;[root@LAB ~]#chmod +x autoROS.sh&lt;br /&gt;[root@LAB ~]#sh autoROS.sh&lt;br /&gt;&lt;b&gt;&lt;br /&gt;還有其它更進階的用法，例如連圖片Graph也加上，更多指令用法可參考&lt;/b&gt;&lt;br /&gt;https://files.cacti.net/docs/html/index.html&lt;br /&gt;https://files.cacti.net/docs/html/cli_add_device.html&lt;br /&gt;https://files.cacti.net/docs/html/cli_add_graph_template.html&lt;br /&gt;https://files.cacti.net/docs/html/cli_add_data_query.html&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjCQofPNgx7IsHhHxW86HA3jDHRYw1qK1f2LVDiJRRZCtwuojOArPMSdiINe3LVTwif7xb77kmmFELlJfCEd5aDPfjnDLWPI9CXn-1Ls6TgGexWFhFOjJMsHlYIkQlx92_IPRwmIrHbkyCwznEdbdZE4xBGSe2BNuMYDNnJk3Kpcku5Zgwg0wxL9-uY2A&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;682&quot; data-original-width=&quot;544&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjCQofPNgx7IsHhHxW86HA3jDHRYw1qK1f2LVDiJRRZCtwuojOArPMSdiINe3LVTwif7xb77kmmFELlJfCEd5aDPfjnDLWPI9CXn-1Ls6TgGexWFhFOjJMsHlYIkQlx92_IPRwmIrHbkyCwznEdbdZE4xBGSe2BNuMYDNnJk3Kpcku5Zgwg0wxL9-uY2A=w509-h640&quot; width=&quot;509&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/810515877035339413/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/810515877035339413?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/810515877035339413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/810515877035339413'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2022/08/cacti-device.html' title='Cacti 指令加入監控device'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUWk3iMFxpkOjdGbrfEOYmjrp9DAGtQR_WEAGRXWNZIA1VBrVMNKRKGq8ArJtzYTcoxc1JHsQZ7xNLrOdSXcltc8WXC6-aU3xx1n3bUrYAEtJ8xewlOozy94x6zt-y8y6ilpyi-9aHR5lXUQge-Dk4vwy_VF1R1j7QSKNHkSsSO2lmJzIvJJqjiOhNQ/s72-w640-h234-c/CCC.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-1708525308682744534</id><published>2021-10-24T23:00:00.010+08:00</published><updated>2021-10-29T12:54:47.800+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="工作"/><title type='text'>ElastiFlow + Grafana 分析流量應用</title><content type='html'>&lt;div class=&quot;separator&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;工作早期使用的Neflow分析軟體NfSen太舊了(官方已無更新)，加上新版的瀏覽器無法完全支援，索性將全部的Netflow網管主機換成比較新的分析軟體&lt;/span&gt;&lt;a href=&quot;https://github.com/robcowart/elastiflow&quot; style=&quot;font-family: inherit;&quot; target=&quot;_blank&quot;&gt;ElastiFlow&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;來收集資料，然後再用 &lt;/span&gt;&lt;a href=&quot;https://grafana.com/&quot; style=&quot;font-family: inherit;&quot; target=&quot;_blank&quot;&gt;Grafana&lt;/a&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; 去畫出自己想要的圖型分析跟告警發送。目前官方ElastiFlow Open Source的版本到4.0.1之後，就變成了收費軟體了，基於使用上的彈性，所以還是使用該版本做為使用。&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;以下為安裝的方式，會使用docker的方式來安裝ELK軟體，然後手動安裝Grafana軟體，並在做完必要的設定佈署後，會將Kibana給停用，節省主機的效能資源，因為是3種服務都安裝在同一台的方式，所以硬體效能不能太差(官方有建議的Flow per second對應的硬體規格)，以下為使用12 core 、46G RAM、1T HD的方式佈署。&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;先安裝Docker軟體&lt;br /&gt;&lt;span lang=&quot;EN-US&quot;&gt;yum install -y
yum-utils device-mapper-persistent-data lvm2&lt;br /&gt;yum-config-manager --add-repo &lt;a href=&quot;https://download.docker.com/linux/centos/docker-ce.repo&quot;&gt;https://download.docker.com/linux/centos/docker-ce.repo&lt;/a&gt;&lt;br /&gt;yum makecache fast&lt;br /&gt;yum install docker-ce&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;確認安裝是否成功，並將服務加到開機會自動啟動&lt;br /&gt;&lt;span lang=&quot;EN-US&quot;&gt;docker --version&lt;br /&gt;&lt;span lang=&quot;EN-US&quot;&gt;sudo systemctl enable
docker.service&lt;br /&gt;
sudo systemctl start docker.service&lt;br /&gt;
sudo systemctl status docker.service&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;安裝&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Docker Compose，之後可以用YAML 檔案來定義服務&lt;br /&gt;curl -L &quot;&lt;a href=&quot;https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname&quot;&gt;https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname&lt;/a&gt;
-s)-$(uname -m)&quot; -o /usr/local/bin/docker-compose&lt;br /&gt;&lt;br /&gt;sudo chmod +x /usr/local/bin/docker-compose&lt;br /&gt;檢查安裝是否有成功&lt;br /&gt;docker-compose -v&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;接著照著&lt;/span&gt;&lt;/span&gt;ElastiFlow官方文件上面的建議，定義好YAML 檔案與優化Linux主機的UDP的效能&lt;br /&gt;編輯vi /etc/sysctl.d/87-elastiflow.conf ，然後加入官方的建議&lt;a href=&quot;https://github.com/robcowart/elastiflow/tree/master/sysctl.d&quot;&gt;UDP設定值&lt;/a&gt;&amp;nbsp;，接著照著主機的效能規格去定義好相關的YAML檔案來使用Docker來啟動ELK服務收集Netflow資料&lt;br /&gt;vi docker-compose.yml&amp;nbsp; ，紅色的地方照實際需求修改對應的設定值&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;pre style=&quot;background-color: #f8f8f8; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 11px; line-height: 1.7; margin-bottom: 10px; margin-top: 10px; overflow-wrap: break-word; overflow: auto; padding: 11px 16px; word-break: break-all;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;version: &#39;3&#39;

services:
  elastiflow-elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
    container_name: elastiflow-elasticsearch
    &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;restart: &#39;always&#39;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 131072
        hard: 131072
      nproc: 8192
      fsize: -1
    network_mode: host
    volumes:
      # 使用下面命令建立數據目錄(把Netflow檔案放在Docker的外層本機目錄中)
      # mkdir /qyt_elastiflow &amp;amp;&amp;amp; chown -R 1000:1000 /qyt_elastiflow
      &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;- /qyt_elastiflow:/usr/share/elasticsearch/data&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
    environment:
      # JVM Heap size
      #   - 照使用的規格定義JVM的可用的Ram Size
      #   - 此處設定為25G
      &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ES_JAVA_OPTS: &#39;-Xms25g -Xmx25g&#39;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
      cluster.name: elastiflow
      bootstrap.memory_lock: &#39;true&#39;
      network.host: 0.0.0.0
      http.port: 9200
      discovery.type: &#39;single-node&#39;
      indices.query.bool.max_clause_count: 8192
      search.max_buckets: 250000
      action.destructive_requires_name: &#39;true&#39;

  elastiflow-kibana:
    image: docker.elastic.co/kibana/kibana:7.8.1
    container_name: elastiflow-kibana
    restart: &#39;no&#39;
    depends_on:
      - elastiflow-elasticsearch
    network_mode: host
    environment:
      SERVER_HOST: 0.0.0.0
      SERVER_PORT: 5601
      SERVER_MAXPAYLOADBYTES: 8388608

      &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ELASTICSEARCH_HOSTS: &quot;http://127.0.0.1:9200&quot;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
      ELASTICSEARCH_REQUESTTIMEOUT: 132000
      ELASTICSEARCH_SHARDTIMEOUT: 120000

      KIBANA_DEFAULTAPPID: &quot;dashboard/653cf1e0-2fd2-11e7-99ed-49759aed30f5&quot;
      KIBANA_AUTOCOMPLETETIMEOUT: 3000
      KIBANA_AUTOCOMPLETETERMINATEAFTER: 2500000

      LOGGING_DEST: stdout
      LOGGING_QUIET: &#39;false&#39;

  elastiflow-logstash:
    image: robcowart/elastiflow-logstash:4.0.1
    container_name: elastiflow-logstash
    &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;restart: &#39;always&#39;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
    depends_on:
      - elastiflow-elasticsearch
    network_mode: host
    environment:
      # JVM Heap size - this MUST be at least 3GB (4GB preferred)
      &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;LS_JAVA_OPTS: &#39;-Xms5g -Xmx5g&#39;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;

      # ElastiFlow global configuration
      ELASTIFLOW_AGENT_ID: elastiflow
      ELASTIFLOW_GEOIP_CACHE_SIZE: 16384
      ELASTIFLOW_GEOIP_LOOKUP: &#39;true&#39;
      ELASTIFLOW_ASN_LOOKUP: &#39;true&#39;
      ELASTIFLOW_OUI_LOOKUP: &#39;false&#39;
      ELASTIFLOW_POPULATE_LOGS: &#39;true&#39;
      ELASTIFLOW_KEEP_ORIG_DATA: &#39;true&#39;
      ELASTIFLOW_DEFAULT_APPID_SRCTYPE: &#39;__UNKNOWN&#39;

      # Name resolution option
&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;      ELASTIFLOW_RESOLVE_IP2HOST: &#39;false&#39;
      ELASTIFLOW_NAMESERVER: &#39;127.0.0.1&#39;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
      ELASTIFLOW_DNS_HIT_CACHE_SIZE: 25000
      ELASTIFLOW_DNS_HIT_CACHE_TTL: 900
      ELASTIFLOW_DNS_FAILED_CACHE_SIZE: 75000
      ELASTIFLOW_DNS_FAILED_CACHE_TTL: 3600

      &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ELASTIFLOW_ES_HOST: &#39;127.0.0.1:9200&#39;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
      &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ELASTIFLOW_NETFLOW_IPV4_PORT: 2055&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
      ELASTIFLOW_NETFLOW_UDP_WORKERS: 2
      ELASTIFLOW_NETFLOW_UDP_QUEUE_SIZE: 4096
      ELASTIFLOW_NETFLOW_UDP_RCV_BUFF: 33554432

      &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ELASTIFLOW_SFLOW_IPV4_PORT: 6343&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
      ELASTIFLOW_SFLOW_UDP_WORKERS: 2
      ELASTIFLOW_SFLOW_UDP_QUEUE_SIZE: 4096
      ELASTIFLOW_SFLOW_UDP_RCV_BUFF: 33554432

      &lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;ELASTIFLOW_IPFIX_UDP_IPV4_PORT: 4739&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;background-color: transparent; border-radius: 4px; box-sizing: border-box; color: #333333; font-family: SFMono-Regular, Menlo, Monaco, Consolas, &amp;quot;liberation mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace; font-size: 13px; margin: 0px; overflow-wrap: break-word; padding: 0px; word-break: inherit;&quot;&gt;
      ELASTIFLOW_IPFIX_UDP_WORKERS: 2
      ELASTIFLOW_IPFIX_UDP_QUEUE_SIZE: 4096
      ELASTIFLOW_IPFIX_UDP_RCV_BUFF: 33554432&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;接著在Linux上面先設定好NetFlow存放的外層目錄&lt;/div&gt;&lt;div&gt;mkdir /qyt_elastiflow &amp;amp;&amp;amp; chown -R 1000:1000 /qyt_elastiflow&lt;br /&gt;接著佈署容器，等待一段時間後、可瀏覽器中進入Kibana圖形化界面&lt;br /&gt;docker-compose up -d&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN9GDFmwLe6Ege6c-Kx3UHpx28_j9InUy80kex4KB6x4HutWw2bi_nnOikVq4DBrm62PVdSKNYAOSeDf1_zgTS5XwLfFQhBjgRya864sTvwh-ugvIfPs1ijE7Nhg0j4KELvgfaRyz-pYUa/&quot; style=&quot;clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;589&quot; data-original-width=&quot;1398&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN9GDFmwLe6Ege6c-Kx3UHpx28_j9InUy80kex4KB6x4HutWw2bi_nnOikVq4DBrm62PVdSKNYAOSeDf1_zgTS5XwLfFQhBjgRya864sTvwh-ugvIfPs1ijE7Nhg0j4KELvgfaRyz-pYUa/w640-h270/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;因為目前還沒有Netflow (UDP-2055)或是Sflow(UDP-6343)或是IPFX(UDP-4739)的資料丟入，所以會顯示無資料，此時需要去網路設備上面設定相關的Flow Exporter的發送設定，可參考先前文章的設定，LAB環境是使用RouterOS&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR-m3dO4wbt3gCP_Dl9KHZMQcw0euYYStF4RTTY47khW1OejD-mJeSETwT88XRMgqAumjsi7hH_kRjOL8TIheYtLlGXEWma6X6VbJjx0pbC3hM5i01lSQDMGvGxYz__uv_1V7yBYnSOyjJ/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;823&quot; data-original-width=&quot;1125&quot; height=&quot;468&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR-m3dO4wbt3gCP_Dl9KHZMQcw0euYYStF4RTTY47khW1OejD-mJeSETwT88XRMgqAumjsi7hH_kRjOL8TIheYtLlGXEWma6X6VbJjx0pbC3hM5i01lSQDMGvGxYz__uv_1V7yBYnSOyjJ/w640-h468/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;在Kibana建立對應的索引&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWkjYtSomiSDWZ5LP8HlXhk4wgacc80K5Ru-bLkKzM2jOLuD1N1dmopLCkNJDPaaFNePhgDAbT6oPgKsT9uJil3IxpoQqhhQfO_wsmrdzhTR6ISufn_BjCyGbGSDhC-7r0wRq4Y2pUJ827/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;946&quot; data-original-width=&quot;346&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWkjYtSomiSDWZ5LP8HlXhk4wgacc80K5Ru-bLkKzM2jOLuD1N1dmopLCkNJDPaaFNePhgDAbT6oPgKsT9uJil3IxpoQqhhQfO_wsmrdzhTR6ISufn_BjCyGbGSDhC-7r0wRq4Y2pUJ827/w235-h640/image.png&quot; width=&quot;235&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;建立index pattern&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbBxJL28P6CzFx_S1A6Kb3yYiQ9z1ILG-wsLZ3KaQ2lSnMN1rufD66jvjxjFt1NNDboJsM72i6qUKih7aLMb9NI6FhQqwaLwJwbTIp2oYDnVNbw17ef9PDeXcEhOAL_vEJlD7votrN6GId/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;645&quot; data-original-width=&quot;1411&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbBxJL28P6CzFx_S1A6Kb3yYiQ9z1ILG-wsLZ3KaQ2lSnMN1rufD66jvjxjFt1NNDboJsM72i6qUKih7aLMb9NI6FhQqwaLwJwbTIp2oYDnVNbw17ef9PDeXcEhOAL_vEJlD7votrN6GId/w640-h292/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;名字取為elastiflow-4.0.1-*&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1wrLJDABln-U7v2w4iVkGH3nue0l0MpE-fgpPxFQgxn3gK_98Fzjs0iylpT2TchFQqHzMrj-R50jxQDdHklsESTJN82nredg0Lek8TRNsqSBOicRIgwoKbJBTLg6DEIAM0Ly-UqlyVuXB/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;503&quot; data-original-width=&quot;1373&quot; height=&quot;234&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1wrLJDABln-U7v2w4iVkGH3nue0l0MpE-fgpPxFQgxn3gK_98Fzjs0iylpT2TchFQqHzMrj-R50jxQDdHklsESTJN82nredg0Lek8TRNsqSBOicRIgwoKbJBTLg6DEIAM0Ly-UqlyVuXB/w640-h234/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;接著選@timestamp 做為index的分類名&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFO7XhIPwlkNNL_4GV6hDf6IKfMC25G1Ev7K-_N7ZtpsJcG5PQ3O1pdpTmg7vcM9OZrLm6u6GcsTCyD-2ZNOS7v5yl6MXbe4ucUh5RIWTQvVgORmzAOgvdI95Zh5-jq7rUWlzLmpyxIGyA/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;548&quot; data-original-width=&quot;1418&quot; height=&quot;248&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFO7XhIPwlkNNL_4GV6hDf6IKfMC25G1Ev7K-_N7ZtpsJcG5PQ3O1pdpTmg7vcM9OZrLm6u6GcsTCyD-2ZNOS7v5yl6MXbe4ucUh5RIWTQvVgORmzAOgvdI95Zh5-jq7rUWlzLmpyxIGyA/w640-h248/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import elastiflow.kibana.7.8.x.ndjson 的內建面板(之後會用Grafana取代，非必要動作)&lt;br /&gt;檔案從&lt;a href=&quot;https://github.com/robcowart/elastiflow/tree/master/kibana&quot; target=&quot;_blank&quot;&gt;這邊&lt;/a&gt;捉取&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0y8Vb75rIsAIbpDJgGvzTAe6ckw71WyytAb78ZnFzQfwCEDBt-5qHR2W9tseCNzplajZn5nSIKGdJHhyphenhyphen-JSyTyiuwnChOxXsGDhBO0h-AGJXvAFo0LDrM6BfgI332ocpfy1YYX1vomX04/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;703&quot; data-original-width=&quot;1409&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0y8Vb75rIsAIbpDJgGvzTAe6ckw71WyytAb78ZnFzQfwCEDBt-5qHR2W9tseCNzplajZn5nSIKGdJHhyphenhyphen-JSyTyiuwnChOxXsGDhBO0h-AGJXvAFo0LDrM6BfgI332ocpfy1YYX1vomX04/w640-h320/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;匯入完成後，可以在界面中看到多個dashboards信息&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAcfmFgUtf59wQgSg2OrvLBfNtnhMvsWJInRpZ-FL6KH-mB8ernqVKjWtMPDFCbSDqhEN0pBVDWIsrL6N3VBffFw1xSK633q958feNXuarZn6Si65Zv4uoK1R7SPx7i5XQ3gciQpBrxHCD/&quot; style=&quot;clear: left; display: inline; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;51&quot; data-original-width=&quot;446&quot; height=&quot;46&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAcfmFgUtf59wQgSg2OrvLBfNtnhMvsWJInRpZ-FL6KH-mB8ernqVKjWtMPDFCbSDqhEN0pBVDWIsrL6N3VBffFw1xSK633q958feNXuarZn6Si65Zv4uoK1R7SPx7i5XQ3gciQpBrxHCD/w400-h46/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqM_83Cz-KmjMDqqr-oF-SsFLo3RopJwUUeZtmjz0TjX4ejd_nRFVu2jDzz86FU-VbJQCRAovBgJ2gpu7aDMekfvLrhK_5IBUBE072KH-4GvsTTXizgK_J3TnWKuRNQ6kzcbV-GL7CRA7R/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;758&quot; data-original-width=&quot;1700&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqM_83Cz-KmjMDqqr-oF-SsFLo3RopJwUUeZtmjz0TjX4ejd_nRFVu2jDzz86FU-VbJQCRAovBgJ2gpu7aDMekfvLrhK_5IBUBE072KH-4GvsTTXizgK_J3TnWKuRNQ6kzcbV-GL7CRA7R/w640-h286/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;接著在Linux上面先設定好需要的本機ACL&lt;/div&gt;&lt;div&gt;給本機自己讀取ElasticSearch&lt;/div&gt;&lt;div&gt;&lt;div&gt;firewall-cmd --permanent --zone=public --add-rich-rule=&quot;rule family=&quot;ipv4&quot; source address=&quot;192.168.88.5/32&quot; port port=&quot;9200&quot; protocol=&quot;tcp&quot; accept&quot;&lt;/div&gt;&lt;div&gt;給之後Grafana讀取ElasticSearch&lt;/div&gt;&lt;div&gt;firewall-cmd --permanent --zone=public --add-rich-rule=&quot;rule family=&quot;ipv4&quot; source address=&quot;192.168.88.5/32&quot; port port=&quot;9200&quot; protocol=&quot;tcp&quot; accept&quot;&lt;br /&gt;給第一次做import面板使用Kibana UI&lt;/div&gt;&lt;div&gt;firewall-cmd --permanent --zone=public --add-rich-rule=&quot;rule family=&quot;ipv4&quot; source address=&quot;192.168.88.0/24&quot; port port=&quot;5601&quot; protocol=&quot;tcp&quot; accept&quot;&lt;/div&gt;&lt;div&gt;給NetFlow、Sflow、IPFX收取資料的服務端口&lt;/div&gt;&lt;div&gt;firewall-cmd --permanent --add-port=2055/udp&amp;nbsp;&lt;/div&gt;&lt;div&gt;firewall-cmd --permanent --add-port=6343/udp&amp;nbsp;&lt;/div&gt;&lt;div&gt;firewall-cmd --permanent --add-port=4739/udp&amp;nbsp;&lt;/div&gt;&lt;div&gt;重新讀入新的ACL清單&lt;/div&gt;&lt;div&gt;firewall-cmd --reload&lt;/div&gt;&lt;div&gt;firewall-cmd&amp;nbsp; --list-all --permanent&lt;/div&gt;&lt;/div&gt;&lt;div&gt;接著透過Kibana做index資料存放天數的設定，可照實際硬碟空間與每日的NetFlow資料量設定&lt;br /&gt;此處建立一組lifecycle的規則叫做elastiflow&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnRNJUl9uVNRFC0zaMfJJa7UovElzJc8-ZyDD1yaJIbBQUZlVHuEA1QOEEH6bofMTj8xTblkO9t6_86pKZadhr7ZDHKnveWj7qxNDAt3OAuWFTc-vFajm5dPsby8AvwDbc73RwMkAcBwI_/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;756&quot; data-original-width=&quot;1835&quot; height=&quot;264&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnRNJUl9uVNRFC0zaMfJJa7UovElzJc8-ZyDD1yaJIbBQUZlVHuEA1QOEEH6bofMTj8xTblkO9t6_86pKZadhr7ZDHKnveWj7qxNDAt3OAuWFTc-vFajm5dPsby8AvwDbc73RwMkAcBwI_/w640-h264/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYnTVdifjPoyeSWnyZYeR34-lTFAbPAsJE8KPTGZcUW1_PcDTJfTKsit1hwe7ZFyrKnkTXtu4E7XNIyv9_egodk8oepPxNfJclZjExbts1xPJwQNK7sqAvU9ro-kEiiiCFIhpZFH_psCEU/&quot; style=&quot;clear: left; display: inline; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;817&quot; data-original-width=&quot;1515&quot; height=&quot;346&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYnTVdifjPoyeSWnyZYeR34-lTFAbPAsJE8KPTGZcUW1_PcDTJfTKsit1hwe7ZFyrKnkTXtu4E7XNIyv9_egodk8oepPxNfJclZjExbts1xPJwQNK7sqAvU9ro-kEiiiCFIhpZFH_psCEU/w640-h346/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;接著回到Index Management頁面，確定相關的狀態是否都為正常&lt;br /&gt;因為只有一台ElastiSearch，要改一下shards與replicas的數量如下，不然不會顯示Green狀態&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;number_of_shards&quot;: &quot;1&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;number_of_replicas&quot;: &quot;0&quot;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHBLK0ujs90YFy4s_BiC-IBpcBoN6nrcg_hPqV8D1vlh1HG8Hh5wxhyTtaN9rebQO2jqtRyC0SXiMXwxlawXyfOnWBu3SwyZa5XXmab-uOWUx0d39-1PmBDqHt5oRqqQztIQ2GAtf96CUZ/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;833&quot; data-original-width=&quot;1909&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHBLK0ujs90YFy4s_BiC-IBpcBoN6nrcg_hPqV8D1vlh1HG8Hh5wxhyTtaN9rebQO2jqtRyC0SXiMXwxlawXyfOnWBu3SwyZa5XXmab-uOWUx0d39-1PmBDqHt5oRqqQztIQ2GAtf96CUZ/w640-h280/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;將全部的容器都給開機的指令&lt;/div&gt;&lt;div&gt;docker-compose up -d&lt;br /&gt;將全部的容器都給關機的指令&lt;br /&gt;docker-compose stop&lt;/div&gt;&lt;div&gt;查詢目前使用中容器的指令&lt;br /&gt;docker ps -a&lt;br /&gt;查出目前執行中的容器的CONTAINER ID，並上網捉取GeoIP的資料庫放到本機中&lt;br /&gt;更新一下&lt;a href=&quot;https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en&quot; target=&quot;_blank&quot;&gt;GeoIP的資料庫&lt;/a&gt;到新版，用docker指令放到容器裡面的目錄&lt;br /&gt;&lt;div&gt;docker cp GeoLite2-ASN.mmdb af9ba8d2e4f9:/etc/logstash/elastiflow/geoipdbs/GeoLite2-ASN.mmdb&lt;/div&gt;&lt;div&gt;docker cp GeoLite2-City.mmdb af9ba8d2e4f9:/etc/logstash/elastiflow/geoipdbs/GeoLite2-City.mmdb&lt;/div&gt;&lt;/div&gt;&lt;div&gt;接著進入elastiflow-logstash的容器裡去調整shards與replicas的數量&lt;/div&gt;&lt;div&gt;docker exec -it 7e3dd0e3d558 /bin/bash&lt;br /&gt;在容器裡面修改confg檔&lt;br /&gt;vi templates/elastiflow.template.json&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jxonLX_k_4hP-p0bC58NoqrTRsCk4Fsp7a9XymrMXZKX-ZvCVe4ouAcb7E5uGocIMN1_yo1yAF-knrcxdBbM3O_4jYIhhcdit8-WIblw1SrpDERhi8ix12fZeOvftxxC5ZZY5rTYNrpq/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;801&quot; data-original-width=&quot;751&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jxonLX_k_4hP-p0bC58NoqrTRsCk4Fsp7a9XymrMXZKX-ZvCVe4ouAcb7E5uGocIMN1_yo1yAF-knrcxdBbM3O_4jYIhhcdit8-WIblw1SrpDERhi8ix12fZeOvftxxC5ZZY5rTYNrpq/w375-h400/image.png&quot; width=&quot;375&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;存檔後退出，再重新reload容器重帶服務後，設定便會生效&lt;/div&gt;&lt;div&gt;docker-compose stop&lt;/div&gt;&lt;div&gt;docker-compose up -d&lt;br /&gt;docker ps -a&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3njylwkAvCYigoGFp-qb4i7YWYi8f3ojNrkBik7jFm6HobPuOdZV1FVF2bIrlSGte72gXFA8YG10sVMKQUPNYbVrCHG7xvbrmOpUvoINlum3z6_o_ESHGmnoxwEvYpgKRAJUCVOrKlqEN/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;119&quot; data-original-width=&quot;1761&quot; height=&quot;44&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3njylwkAvCYigoGFp-qb4i7YWYi8f3ojNrkBik7jFm6HobPuOdZV1FVF2bIrlSGte72gXFA8YG10sVMKQUPNYbVrCHG7xvbrmOpUvoINlum3z6_o_ESHGmnoxwEvYpgKRAJUCVOrKlqEN/w640-h44/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;接著要使用Grafana來取代Kibana的畫圖功能，主要是Grafana可以做更好的圖表呈現與帳號的權限管理，在Kibana上面，這些都需要另外付費xpack授權才可以使用，Grafana的安裝方式如下&lt;/div&gt;&lt;div&gt;&lt;div&gt;先新增Grafana Repository&lt;/div&gt;&lt;div&gt;vi /etc/yum.repos.d/grafana.repo&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[grafana]&lt;/div&gt;&lt;div&gt;name = grafana&lt;/div&gt;&lt;div&gt;baseurl = https://packages.grafana.com/oss/rpm&lt;/div&gt;&lt;div&gt;repo_gpgcheck = 1&lt;/div&gt;&lt;div&gt;enabled = 1&lt;/div&gt;&lt;div&gt;gpgcheck = 1&lt;/div&gt;&lt;div&gt;gpgkey = http://packages.grafana.com/gpg.key&lt;/div&gt;&lt;div&gt;sslverify = 1&lt;/div&gt;&lt;div&gt;sslcacert = /etc/pki/tls/certs/ca-bundle.crt&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;安裝Grafana&lt;/div&gt;&lt;div&gt;yum install grafana&lt;/div&gt;&lt;div&gt;啟動grafana服務&lt;/div&gt;&lt;div&gt;systemctl daemon-reload&lt;/div&gt;&lt;div&gt;systemctl start grafana-server&lt;/div&gt;&lt;div&gt;查詢grafana服務狀態&lt;/div&gt;&lt;div&gt;systemctl status grafana-server&lt;/div&gt;&lt;div&gt;設定開機時自動啟動grafana服務&lt;/div&gt;&lt;div&gt;systemctl enable grafana-server.service&lt;/div&gt;&lt;div&gt;因為會使用Grafana來發送告警，所以需要先安裝告警發送的外掛&lt;/div&gt;&lt;div&gt;grafana-cli plugins install grafana-image-renderer&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;yum install -y&amp;nbsp; alsa-lib.x86_64 atk.x86_64 cups-libs.x86_64 gtk3.x86_64 ipa-gothic-fonts libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXrandr.x86_64 libXScrnSaver.x86_64 libXtst.x86_64 pango.x86_64 xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-cyrillic xorg-x11-fonts-misc xorg-x11-fonts-Type1 xorg-x11-utils&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;yum update nss -y&lt;/div&gt;&lt;div&gt;service grafana-server restart&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;接著就能開啟瀏覽器輸入http://&amp;lt;IP_Address&amp;gt;:3000登入，預設的帳號密碼都是admin&lt;/div&gt;&lt;div&gt;&lt;div&gt;先對Grafana做一下設定config參數調整&lt;/div&gt;&lt;div&gt;&lt;div&gt;vi /etc/grafana/grafana.ini&amp;nbsp; (調整基本環境參數)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#################################### Server ####################################&lt;/div&gt;&lt;div&gt;[server]&lt;/div&gt;&lt;div&gt;# Protocol (http, https, h2, socket)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;protocol = https&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# The ip address to bind to, empty will bind to all interfaces&lt;/div&gt;&lt;div&gt;;http_addr =&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# The http port&amp;nbsp; to use&lt;/div&gt;&lt;div&gt;;http_port = 3000&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# The public facing domain name used to access grafana from a browser&lt;/div&gt;&lt;div&gt;domain = 192.168.88.5&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;# https certs &amp;amp; key file&lt;/div&gt;&lt;div&gt;cert_file = /etc/grafana/cert.pem&lt;/div&gt;&lt;div&gt;cert_key = /etc/grafana/key.pem&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#################################### Security ####################################&lt;/div&gt;&lt;div&gt;[security]&lt;/div&gt;&lt;div&gt;# disable creation of admin user on first start of grafana&lt;/div&gt;&lt;div&gt;;disable_initial_admin_creation = false&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# default admin user, created on startup&lt;/div&gt;&lt;div&gt;;admin_user = admin&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: red;&quot;&gt;#改掉預設建立的密碼&lt;/span&gt;&lt;/div&gt;&lt;div&gt;# default admin password, can be changed before first start of grafana,&amp;nbsp; or in profile settings&lt;/div&gt;&lt;div&gt;;admin_password = LAB58TT78V9XXX&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# used for signing&lt;/div&gt;&lt;div&gt;;secret_key = AA2YcXXXTIGTY1LOhoPsMBB&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#################################### Analytics ####################################&lt;/div&gt;&lt;div&gt;[analytics]&lt;/div&gt;&lt;div&gt;# Server reporting, sends usage counters to stats.grafana.org every 24 hours.&lt;/div&gt;&lt;div&gt;# No ip addresses are being tracked, only simple counters to track&lt;/div&gt;&lt;div&gt;# running instances, dashboard and error counts. It is very helpful to us.&lt;/div&gt;&lt;div&gt;# Change this option to false to disable reporting.&lt;/div&gt;&lt;div&gt;reporting_enabled = false&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#################################### Auth LDAP ##########################&lt;/div&gt;&lt;div&gt;[auth.ldap]&lt;/div&gt;&lt;div&gt;enabled = true&lt;/div&gt;&lt;div&gt;config_file = /etc/grafana/ldap.toml&lt;/div&gt;&lt;div&gt;allow_sign_up = true&lt;/div&gt;&lt;div&gt;#;enabled = false&lt;/div&gt;&lt;div&gt;#;config_file = /etc/grafana/ldap.toml&lt;/div&gt;&lt;div&gt;#;allow_sign_up = true&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#################################### SMTP / Emailing ##########################&lt;/div&gt;&lt;div&gt;[smtp]&lt;/div&gt;&lt;div&gt;enabled = true&lt;/div&gt;&lt;div&gt;host = smtp.hinet.net:25&lt;/div&gt;&lt;div&gt;;user =&lt;/div&gt;&lt;div&gt;# If the password contains # or ; you have to wrap it with triple quotes. Ex &quot;&quot;&quot;#password;&quot;&quot;&quot;&lt;/div&gt;&lt;div&gt;;password =&lt;/div&gt;&lt;div&gt;;cert_file =&lt;/div&gt;&lt;div&gt;;key_file =&lt;/div&gt;&lt;div&gt;;skip_verify = false&lt;/div&gt;&lt;div&gt;from_address = NetFlow-LAB@LAB.com&lt;/div&gt;&lt;div&gt;from_name = NetFlow-LAB&lt;/div&gt;&lt;div&gt;# EHLO identity in SMTP dialog (defaults to instance_name)&lt;/div&gt;&lt;div&gt;ehlo_identity = LAB.com&lt;/div&gt;&lt;div&gt;# SMTP startTLS policy (defaults to &#39;OpportunisticStartTLS&#39;)&lt;/div&gt;&lt;div&gt;;startTLS_policy = NoStartTLS&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#################################### Logging ##########################&lt;/div&gt;&lt;div&gt;[log]&lt;/div&gt;&lt;div&gt;# Either &quot;console&quot;, &quot;file&quot;, &quot;syslog&quot;. Default is console and&amp;nbsp; file&lt;/div&gt;&lt;div&gt;# Use space to separate multiple modes, e.g. &quot;console file&quot;&lt;/div&gt;&lt;div&gt;;mode = console file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Either &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot;, &quot;critical&quot;, default is &quot;info&quot;&lt;/div&gt;&lt;div&gt;level = debug&lt;/div&gt;&lt;div&gt;#;level = info&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug&lt;/div&gt;&lt;div&gt;;filters =&lt;/div&gt;&lt;div&gt;filters = ldap:debug&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#################################### Grafana Image Renderer Plugin ##########################&lt;/div&gt;&lt;div&gt;[plugin.grafana-image-renderer]&lt;/div&gt;&lt;div&gt;# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.&lt;/div&gt;&lt;div&gt;# See ICU’s metaZones.txt (https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt) for a list of supported&lt;/div&gt;&lt;div&gt;# timezone IDs. Fallbacks to TZ environment variable if not set.&lt;/div&gt;&lt;div&gt;;rendering_timezone =&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Instruct headless browser instance to use a default language when not provided by Grafana, e.g. when rendering panel image of alert.&lt;/div&gt;&lt;div&gt;# Please refer to the HTTP header Accept-Language to understand how to format this value, e.g. &#39;fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5&#39;.&lt;/div&gt;&lt;div&gt;;rendering_language =&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Instruct headless browser instance to use a default device scale factor when not provided by Grafana, e.g. when rendering panel image of alert.&lt;/div&gt;&lt;div&gt;# Default is 1. Using a higher value will produce more detailed images (higher DPI), but will require more disk space to store an image.&lt;/div&gt;&lt;div&gt;;rendering_viewport_device_scale_factor =&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Instruct headless browser instance whether to ignore HTTPS errors during navigation. Per default HTTPS errors are not ignored. Due to&lt;/div&gt;&lt;div&gt;# the security risk it&#39;s not recommended to ignore HTTPS errors.&lt;/div&gt;&lt;div&gt;#若有使用https的話，這個地方要改成true略過&lt;/div&gt;&lt;div&gt;rendering_ignore_https_errors = true&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Instruct headless browser instance whether to capture and log verbose information when rendering an image. Default is false and will&lt;/div&gt;&lt;div&gt;# See ICU’s metaZones.txt (https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt) for a list of supported&lt;/div&gt;&lt;div&gt;# timezone IDs. Fallbacks to TZ environment variable if not set.&lt;/div&gt;&lt;div&gt;;rendering_timezone =&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Instruct headless browser instance to use a default language when not provided by Grafana, e.g. when rendering panel image of alert.&lt;/div&gt;&lt;div&gt;# Please refer to the HTTP header Accept-Language to understand how to format this value, e.g. &#39;fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5&#39;.&lt;/div&gt;&lt;div&gt;;rendering_language =&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Instruct headless browser instance to use a default device scale factor when not provided by Grafana, e.g. when rendering panel image of alert.&lt;/div&gt;&lt;div&gt;# Default is 1. Using a higher value will produce more detailed images (higher DPI), but will require more disk space to store an image.&lt;/div&gt;&lt;div&gt;;rendering_viewport_device_scale_factor =&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Instruct headless browser instance whether to ignore HTTPS errors during navigation. Per default HTTPS errors are not ignored. Due to&lt;/div&gt;&lt;div&gt;# the security risk it&#39;s not recommended to ignore HTTPS errors.&lt;/div&gt;&lt;div&gt;#若有使用https的話，這個地方要改成true略過&lt;/div&gt;&lt;div&gt;rendering_ignore_https_errors = true&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;vi /etc/grafana/ldap.toml&amp;nbsp; &amp;nbsp;(調整ldap的認證環境參數)&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;依照需求設定對應的設定，可&lt;a href=&quot;https://www.tpisoftware.com/tpu/articleDetails/1265&quot; target=&quot;_blank&quot;&gt;參考&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;設定完成後，重帶Grafana服務&lt;/div&gt;&lt;div&gt;service grafana-server stop&lt;/div&gt;&lt;div&gt;service grafana-server start&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;上面設定完成後便可以登入Grafana，此時已將登入網頁設定改成了https://IP:3000，開始先指定好要使用的Data Source，這裡為讀取ElasticFlow存在ELK的NetFlow資料&lt;br /&gt;從Configuration&amp;nbsp; &amp;gt;&amp;gt; add data source&amp;nbsp; (選Elasticsearch格式)&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicSEpCWim8ajAWDSTzOnc3prPvVY2uZtw0X4y4v78jZKyYJ43Pet_1r8C-JYgxs5Vuv_c-vfTte2S-p8kLOc3rs5LYJMRQorXShSAqp8vXvB9hOfyINNTuTeshzFz_YOShgCJ4MeobqSAP/&quot; style=&quot;clear: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;827&quot; data-original-width=&quot;953&quot; height=&quot;555&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicSEpCWim8ajAWDSTzOnc3prPvVY2uZtw0X4y4v78jZKyYJ43Pet_1r8C-JYgxs5Vuv_c-vfTte2S-p8kLOc3rs5LYJMRQorXShSAqp8vXvB9hOfyINNTuTeshzFz_YOShgCJ4MeobqSAP/w640-h555/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;選好後送出存檔測試讀取Data Source，若有出現Index OK. Time field name OK的訊息，代表已可讀入資料，剩下的就是照需要的條件，在Grafana裡面拉出自己需要的圖型分析介面&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMa5weoeGOOnYcNRKN02pNMiWypKRqihZf_i7TvolptMlm93kSXz0HT7AtSzUgG1yPUEoFHHN6zNP7eRUl7vJ1f_1Qo2ILv0yjwbBhZfkV1gD69pVBUHGpxPKLveTmAwAUWefrS55CgZxX/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;861&quot; data-original-width=&quot;1893&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMa5weoeGOOnYcNRKN02pNMiWypKRqihZf_i7TvolptMlm93kSXz0HT7AtSzUgG1yPUEoFHHN6zNP7eRUl7vJ1f_1Qo2ILv0yjwbBhZfkV1gD69pVBUHGpxPKLveTmAwAUWefrS55CgZxX/w640-h292/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;至於圖型分析的條件式要怎麼來跟應用，可以參考原本這組ElastiFlow軟體作業建立在Kibana面板裡面的語法設定，基本上只要熟悉ElasticSearch的API查詢語法與網路流量的單位換算，花點時間就可以把整個圖型分析給拉完了，成果如下圖&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHdBm_ioj4z-tXaNUcm1kFdJz8cj5DjjM-SX-jnH_8s48nQcbIoWjeJgHpnznNrwk8r4VqljHEmZwGSlIf_hcxh8mmYaV98Vuj-PK75NReijssJeHhL5LAtdUHCP7ntH7vKJwj0EGFXL6t/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;516&quot; data-original-width=&quot;1920&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHdBm_ioj4z-tXaNUcm1kFdJz8cj5DjjM-SX-jnH_8s48nQcbIoWjeJgHpnznNrwk8r4VqljHEmZwGSlIf_hcxh8mmYaV98Vuj-PK75NReijssJeHhL5LAtdUHCP7ntH7vKJwj0EGFXL6t/w640-h172/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji1SrA4AMbhFimp6cjCJbobVVo-TEj_vLUDNI5lZkF4kdQ4Qp9FG1E4ojLFgBkSFo-JqMj0rUEedK3q53qu65uhOOaCtAH6G6O8N6ica0y7-nAlyXTi9daUnz5M60wpywPUDOFDlTiMyxZ/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;902&quot; data-original-width=&quot;1920&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji1SrA4AMbhFimp6cjCJbobVVo-TEj_vLUDNI5lZkF4kdQ4Qp9FG1E4ojLFgBkSFo-JqMj0rUEedK3q53qu65uhOOaCtAH6G6O8N6ica0y7-nAlyXTi9daUnz5M60wpywPUDOFDlTiMyxZ/w640-h300/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc-KSmC2O13hIez6HLgyOGO-nXd3tscklVXzJKF9pcwpa0Yy3pCTiWGHAE9diK04KuIdSSVeYZenKvHpW52mRI3RRNaZfx2QcDv9DLFRaVspR4pNQOdRgyY7ILCh8cXJ1JN5x_mlX_gHGh/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;902&quot; data-original-width=&quot;1920&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc-KSmC2O13hIez6HLgyOGO-nXd3tscklVXzJKF9pcwpa0Yy3pCTiWGHAE9diK04KuIdSSVeYZenKvHpW52mRI3RRNaZfx2QcDv9DLFRaVspR4pNQOdRgyY7ILCh8cXJ1JN5x_mlX_gHGh/w640-h300/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhywWa1LiuAGKHEkSkHm0ofHceSLwbahxleKK5o_dqx_1kjBjCFjZC2x51bTGhIUH8fTEWhaNJIvp_EYgDYlh3iMaZ4m6jOGUs-2Dn9zi7m2BTYez3OhprgGzUdrcxzkpAJCmoXzDGe1yI6/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;902&quot; data-original-width=&quot;1920&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhywWa1LiuAGKHEkSkHm0ofHceSLwbahxleKK5o_dqx_1kjBjCFjZC2x51bTGhIUH8fTEWhaNJIvp_EYgDYlh3iMaZ4m6jOGUs-2Dn9zi7m2BTYez3OhprgGzUdrcxzkpAJCmoXzDGe1yI6/w640-h300/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgio0gjhZbfdxaJfP2pcTtNP1ZOGdM80UcRfqxBKx0b40NCcQkGXWA_PJcjMPukNv3MInslG27szmR0a8TC1LWfbyTXiC4Ge41WPWxSf8tDk-n32v0ns3REF-RGfIezv_JUqDmu12Y_DSM1/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;902&quot; data-original-width=&quot;1920&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgio0gjhZbfdxaJfP2pcTtNP1ZOGdM80UcRfqxBKx0b40NCcQkGXWA_PJcjMPukNv3MInslG27szmR0a8TC1LWfbyTXiC4Ge41WPWxSf8tDk-n32v0ns3REF-RGfIezv_JUqDmu12Y_DSM1/w640-h300/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtWJ2dmvpeEiw0HkpwoFaZpw4ZY2K9thD1rSVtT3JiC7OSg4IHT6EGuE7eWiFDFaHy0211U5IbsynUSBIJUh8AOOekcYVXWmWHlymIqvdpVbyxWZCvQddLdsyr9gLto8oBofLxser1OGq_/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;902&quot; data-original-width=&quot;1920&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtWJ2dmvpeEiw0HkpwoFaZpw4ZY2K9thD1rSVtT3JiC7OSg4IHT6EGuE7eWiFDFaHy0211U5IbsynUSBIJUh8AOOekcYVXWmWHlymIqvdpVbyxWZCvQddLdsyr9gLto8oBofLxser1OGq_/w640-h300/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq_NxtVzOThMkYMoSvAUnqho4LYXyIhdlK873fSM4Fu6bwwxDMPAOpUnlQl7uxSFbUDBMQiQvWWgzmcLR4AiiF0K_DN-pY9nomOcEVaOJS2PrAIqABDfoiirJGiUUl7GK-bYBG0YLcELZk/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1080&quot; data-original-width=&quot;1920&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq_NxtVzOThMkYMoSvAUnqho4LYXyIhdlK873fSM4Fu6bwwxDMPAOpUnlQl7uxSFbUDBMQiQvWWgzmcLR4AiiF0K_DN-pY9nomOcEVaOJS2PrAIqABDfoiirJGiUUl7GK-bYBG0YLcELZk/w640-h360/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;也可以建立查詢用的面板，Grafana面板客製化彈性很高，依照個人需求拉出要的格式即可&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfMsLXK1C5cqvL54ZDVjp79ROTr5FgH0KfNl0PAVGdHkvpu5-jrqlRaOWxiTlN2q0dirZYYhgUyr5-hPZEITIAtfmf-SqTFEIwLiM1b0SdnLT9BvcR6e4Th0_AM4J8HIOg0seSatgHoXQu/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;825&quot; data-original-width=&quot;1919&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfMsLXK1C5cqvL54ZDVjp79ROTr5FgH0KfNl0PAVGdHkvpu5-jrqlRaOWxiTlN2q0dirZYYhgUyr5-hPZEITIAtfmf-SqTFEIwLiM1b0SdnLT9BvcR6e4Th0_AM4J8HIOg0seSatgHoXQu/w640-h276/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;如果建立好圖型樣版的話，想備份的話，面板備份的目錄是存在下面的路徑&lt;/div&gt;&lt;div&gt;/var/lib/grafana&lt;/div&gt;&lt;div&gt;最後再寫支監控Grafana服務用的Script來監控服務即完成&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@LAB-NetFlow ~]# vi grfana-process-monitor.sh&lt;/div&gt;&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;div&gt;smokeping_status=`ps aux | grep grafana-server | grep -v grep | wc -l `&lt;/div&gt;&lt;div&gt;if [ ${smokeping_status} = 0 ]; then&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; echo &quot;Grafana-Services 服務異常，請檢查&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; data=&#39;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;username&quot;: &quot;&#39;${HOSTNAME}&#39;&quot;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;icon_url&quot;: &quot;https://dyltqmyl993wv.cloudfront.net/assets/stacks/grafana-image-renderer/img/grafana-image-renderer-stack-220x234.png&quot;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;attachments&quot;: [&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Grafana服務狀態 : 狀態異常&quot;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;color&quot;: &quot;#ff0000&quot;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;text&quot;: &quot; 請檢查&#39;${HOSTNAME}&#39; Grafana Process狀態&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;channel&quot;: &quot;#LAB-alert&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&#39;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; echo $data&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; curl -X POST -H &quot;Content-type: application/json&quot; --data &quot;$data&quot; https://hooks.slack.com/services/ZZAAXXZZ/CCCCGBBBGGGGGLF9ADGGDDDDDD&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; exit 2&lt;/div&gt;&lt;div&gt;else&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; echo &quot;Grafana-Services 服務正常運作中&quot;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; exit 0&lt;/div&gt;&lt;div&gt;fi&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;另外，先前說過只要Grafana的圖型完成後，便不需要Kibana了，所以可以將容器中的Kibana停用與移掉相關的ACL&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;停用單一容器服務(先找出對應的容器ID)&lt;br /&gt;docker stop ed0a8690d562&lt;/div&gt;&lt;div&gt;移掉Kibana用的本機ACL&lt;/div&gt;&lt;div&gt;firewall-cmd --permanent --zone=public --remove-rich-rule=&quot;rule family=&quot;ipv4&quot; source address=&quot;192.168.88.0/24&quot; port port=&quot;5601&quot; protocol=&quot;tcp&quot; accept&quot;&lt;/div&gt;&lt;div&gt;&lt;div&gt;firewall-cmd --reload&lt;/div&gt;&lt;div&gt;firewall-cmd&amp;nbsp; --list-all --permanent&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;另外Grafana面板或是設定檔想要複製到別台機器上使用的話，下面為主要的目錄與Config位置&lt;/div&gt;&lt;div&gt;&lt;div&gt;/var/lib/grafana/grafana.db&lt;/div&gt;&lt;div&gt;/etc/grafana/grafana.ini&lt;/div&gt;&lt;div&gt;/etc/grafana/ldap.toml&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;以上即完成整個ElastiFlow與Grafana的安裝與設定&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/1708525308682744534/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/1708525308682744534?isPopup=true' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/1708525308682744534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/1708525308682744534'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2021/10/elastiflow-grafana.html' title='ElastiFlow + Grafana 分析流量應用'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN9GDFmwLe6Ege6c-Kx3UHpx28_j9InUy80kex4KB6x4HutWw2bi_nnOikVq4DBrm62PVdSKNYAOSeDf1_zgTS5XwLfFQhBjgRya864sTvwh-ugvIfPs1ijE7Nhg0j4KELvgfaRyz-pYUa/s72-w640-h270-c/image.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-3945375448517636853</id><published>2021-08-21T18:52:00.002+08:00</published><updated>2021-08-21T18:52:23.327+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="工作"/><title type='text'>監控Linux Process異常時發告警</title><content type='html'>&lt;p&gt;近期有個工作上的需求，需要監控Linux主機上的某個服務是否有異常，並且需要在異常時發出告警通知，所以寫了shell script來監控，下面的範例是監控Smokeping的Process是否還有在正常運作，並在異常時發出Slack的通知訊息&lt;/p&gt;&lt;p&gt;範例如下，存檔後放到排程每五分鐘監控一次即可&lt;/p&gt;&lt;p&gt;#!/bin/bash&lt;/p&gt;&lt;p&gt;smokeping_status=`ps aux | grep FPing | grep -v grep | wc -l `&lt;/p&gt;&lt;p&gt;if [ ${smokeping_status} = 0 ]; then&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; echo &quot;Smokeping-Services 服務異常，請檢查&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; data=&#39;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;username&quot;: &quot;&#39;${HOSTNAME}&#39;&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;icon_url&quot;: &quot;https://www.iconninja.com/files/916/202/326/ping-icon.png&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;attachments&quot;: [&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Smokeping服務狀態 : 狀態異常&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;color&quot;: &quot;#ff0000&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;text&quot;: &quot; 請檢查&#39;${HOSTNAME}&#39; Smokeping Process狀態&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;channel&quot;: &quot;#alert-monitor&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&#39;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; echo $data&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; curl -X POST -H &quot;Content-type: application/json&quot; --data &quot;$data&quot; https://hooks.slack.com/services/A8CKZ8G2C/A6FJBJKTYM/GaFDyZpDc79U3LABX79a3e&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; exit 2&lt;/p&gt;&lt;p&gt;else&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; echo &quot;Smokeping-Services 服務正常運作中&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; exit 0&lt;/p&gt;&lt;p&gt;fi&lt;/p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;div&gt;最後的監測結果如下&lt;/div&gt;&lt;div&gt;異常時發出Slack告警&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwD8G4uPeH_JUxoMal80Oio5ZXi7yd-NznTQ4bg0j6BbMIMBMcJPKo6teYuNHbeMQhYj7VnCswML9YgqBp01h5iOn2dCFpzCWX-9iP-_ebUbuvsMUmvAl8VgTI8-_GX9f-549lwzkyNwBe/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;94&quot; data-original-width=&quot;593&quot; height=&quot;51&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwD8G4uPeH_JUxoMal80Oio5ZXi7yd-NznTQ4bg0j6BbMIMBMcJPKo6teYuNHbeMQhYj7VnCswML9YgqBp01h5iOn2dCFpzCWX-9iP-_ebUbuvsMUmvAl8VgTI8-_GX9f-549lwzkyNwBe/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;正常時，文字顯示狀態正常&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6iyjXNuFuL7mrUJ6NMs-IydGLxRj0-fQ9KYfaqMG6tKXeT_sWmeUIDr0M4-629H38nHtALG1LY5GgXbCnOpXitXdTHk8WzfWm2A8GEASoqD98KDyUatouRwstOPqC9KtIbq7wSWTiRYZ/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;71&quot; data-original-width=&quot;936&quot; height=&quot;24&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA6iyjXNuFuL7mrUJ6NMs-IydGLxRj0-fQ9KYfaqMG6tKXeT_sWmeUIDr0M4-629H38nHtALG1LY5GgXbCnOpXitXdTHk8WzfWm2A8GEASoqD98KDyUatouRwstOPqC9KtIbq7wSWTiRYZ/&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/3945375448517636853/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/3945375448517636853?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/3945375448517636853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/3945375448517636853'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2021/08/linux-process.html' title='監控Linux Process異常時發告警'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwD8G4uPeH_JUxoMal80Oio5ZXi7yd-NznTQ4bg0j6BbMIMBMcJPKo6teYuNHbeMQhYj7VnCswML9YgqBp01h5iOn2dCFpzCWX-9iP-_ebUbuvsMUmvAl8VgTI8-_GX9f-549lwzkyNwBe/s72-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-1372418520677482729</id><published>2021-01-15T21:59:00.004+08:00</published><updated>2021-01-15T22:01:46.369+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Cacti發送Slack告警訊息到不同頻道</title><content type='html'>&lt;p&gt;Cacti發送Slack告警訊息到不同頻道的方式，基本上也是寫程式去做正規化表示式的過濾與條件式的判斷，前置作業可以參考先前寫的&lt;a href=&quot;http://tanzih.blogspot.com/2018/02/cactislackcactus.html&quot; target=&quot;_blank&quot;&gt;Cacti整合Slack發送告警訊息&lt;/a&gt;，接著要把thold_functions.php第2847行裡面的 escapeshellarg($message)改成escapeshellarg($subject) ，先改好讓發送的訊息內容為郵件的標題，這樣比較方便程式去做正規化表示式的過濾與條件式的判斷。&lt;/p&gt;&lt;p&gt;接著編輯這個檔案&lt;br /&gt;[root@Localhost ~]#vi /var/www/html/cacti/plugins/thold/slack.php&amp;nbsp;&amp;nbsp;&lt;br /&gt;新版的程式內容如下，依照個人需求，改到自己需要發送的頻道即可。&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;程式如下&lt;/p&gt;&lt;p&gt;&amp;lt;?php&lt;/p&gt;&lt;p&gt;/*&lt;br /&gt;以下程式字串條件式判斷式，是使用正規化表示式與模糊比對的方式設計的，依照Cacti告警標題設計好的比對順序發送到特定頻道&lt;br /&gt;*/&lt;/p&gt;&lt;p&gt;//定義此區Cacti發送的圖示與帶入的發送名字&lt;/p&gt;&lt;p&gt;$username = &quot;Cacti-TEST(網管系統)&quot; ;&lt;/p&gt;&lt;p&gt;$icon_emoji = &quot;:lion_face:&quot; ;&lt;/p&gt;&lt;p&gt;//以下程式段落為針對資安設備IPS與WAF的字串過濾，並發送到專用的資安設備告警頻道(#test-security)&lt;/p&gt;&lt;p&gt;//此處的比對[**有分**大小寫]&lt;/p&gt;&lt;p&gt;if (preg_match(&quot;/(WAF)|(IPS)|(SMS)|(waf)|(ips)|(sms)/&quot;, $argv[1])) {&lt;/p&gt;&lt;p&gt;$data = array(&quot;username&quot; =&amp;gt; &quot;$username&quot;,&quot;icon_emoji&quot; =&amp;gt; &quot;$icon_emoji&quot; ,&quot;text&quot; =&amp;gt; &quot;$argv[1]&quot; ,&quot;channel&quot; =&amp;gt; &quot;&lt;span style=&quot;color: red;&quot;&gt;#test-security&lt;/span&gt;&quot;);&lt;/p&gt;&lt;p&gt;$data_string = json_encode($data);&lt;/p&gt;&lt;p&gt;$url = &quot;https://hooks.slack.com/services/RBCD0S7D/BHB4TGXQ/faBCfqYN5IkupUY3AKG&quot;;&lt;/p&gt;&lt;p&gt;$c = curl_init();&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_URL, $url);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_CUSTOMREQUEST, &quot;POST&quot;);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_POSTFIELDS, $data_string);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_HTTPHEADER, array(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &#39;Content-Type: application/json&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &#39;Content-Length: &#39; . strlen($data_string))&lt;/p&gt;&lt;p&gt;);&lt;/p&gt;&lt;p&gt;echo curl_exec($c);&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;//以下程式段落針對線路有關的字串過濾，並發送到專用的線路告警頻道(#test-circuit)&lt;/p&gt;&lt;p&gt;//此處的比對[**不分**大小寫]&lt;/p&gt;&lt;p&gt;elseif (preg_match(&quot;/(海纜)|(流量)|(公網)|(對點IP)|(P2P)|(IPsec)|(avg)|(OSPF)|(專線)|(BGP)|(Loopback)|(線路)|(上網)/i&quot;, $argv[1])) {&lt;/p&gt;&lt;p&gt;$data = array(&quot;username&quot; =&amp;gt; &quot;$username&quot;,&quot;icon_emoji&quot; =&amp;gt; &quot;$icon_emoji&quot; ,&quot;text&quot; =&amp;gt; &quot;$argv[1]&quot; ,&quot;channel&quot; =&amp;gt; &quot;&lt;span style=&quot;color: red;&quot;&gt;#test-circuit&lt;/span&gt;&quot;);&lt;/p&gt;&lt;p&gt;$data_string = json_encode($data);&lt;/p&gt;&lt;p&gt;$url = &quot;https://hooks.slack.com/services/RBCD0S7D/BHB4TGXQ/faBCfqYN5IkupUY3AKG&quot;;&lt;/p&gt;&lt;p&gt;$c = curl_init();&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_URL, $url);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_CUSTOMREQUEST, &quot;POST&quot;);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_POSTFIELDS, $data_string);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_HTTPHEADER, array(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &#39;Content-Type: application/json&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &#39;Content-Length: &#39; . strlen($data_string))&lt;/p&gt;&lt;p&gt;);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;echo curl_exec($c);&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;//以下程式段落為如果上面字串都不符合的話，就發送到原本預設的頻道(#test-channel)&lt;/p&gt;&lt;p&gt;else{&lt;/p&gt;&lt;p&gt;$data = array(&quot;username&quot; =&amp;gt; &quot;$username&quot;,&quot;icon_emoji&quot; =&amp;gt; &quot;$icon_emoji&quot; ,&quot;text&quot; =&amp;gt; &quot;$argv[1]&quot; ,&quot;channel&quot; =&amp;gt; &quot;&lt;span style=&quot;color: red;&quot;&gt;#test-channel&lt;/span&gt;&quot;);&lt;/p&gt;&lt;p&gt;$data_string = json_encode($data);&lt;/p&gt;&lt;p&gt;$url = &quot;https://hooks.slack.com/services/RBCD0S7D/BHB4TGXQ/faBCfqYN5IkupUY3AKG&quot;;&lt;/p&gt;&lt;p&gt;$c = curl_init();&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_URL, $url);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_CUSTOMREQUEST, &quot;POST&quot;);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_POSTFIELDS, $data_string);&lt;/p&gt;&lt;p&gt;curl_setopt($c, CURLOPT_HTTPHEADER, array(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &#39;Content-Type: application/json&#39;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &#39;Content-Length: &#39; . strlen($data_string))&lt;/p&gt;&lt;p&gt;);&lt;/p&gt;&lt;p&gt;echo curl_exec($c);&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;?&amp;gt;&lt;/p&gt;&lt;p&gt;最後要測試程式的字串過濾是否正確的話，可以直接對程式帶入tholdhold送出來帶入的引數$argv[1] 來測試發送結果&lt;/p&gt;&lt;p&gt;[root@Localhost ~]# php /var/www/html/cacti/plugins/thold/slack.php &quot;&lt;span style=&quot;color: red;&quot;&gt;想要發送的文字&lt;/span&gt;&quot;&lt;/p&gt;&lt;p&gt;符合預期的話，就代表正規化語法正確與程式的判斷式正確，可以拆開很多不同的頻道發告警，只要把想拆開的條件再用php的條件判斷語句再加入即可&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/1372418520677482729/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/1372418520677482729?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/1372418520677482729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/1372418520677482729'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2021/01/cactislack.html' title='Cacti發送Slack告警訊息到不同頻道'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-1986134531174351629</id><published>2020-04-27T23:05:00.000+08:00</published><updated>2020-04-27T23:05:40.651+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Linux TCP 連線數優化Script</title><content type='html'>Linux TCP 連線數優化Script如下&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
#!/bin/sh&lt;br /&gt;#&lt;span style=&quot;color: red;&quot;&gt;TCP Setting Tuning&lt;/span&gt;&lt;br /&gt;sysctl -w net.core.rmem_max=33554432&lt;br /&gt;sysctl -w net.core.wmem_max=33554432&lt;br /&gt;sysctl -w net.ipv4.tcp_rmem=&#39;4096 87380 33554432&#39;&lt;br /&gt;sysctl -w net.ipv4.tcp_wmem=&#39;4096 65536 33554432&#39;&lt;br /&gt;sysctl -w net.ipv4.tcp_syncookies=1&lt;br /&gt;sysctl -w net.ipv4.tcp_mem=&#39;50576 64768 98152&#39;&lt;br /&gt;sysctl -w net.core.netdev_max_backlog=&lt;wbr&gt;&lt;/wbr&gt;2500&lt;br /&gt;sysctl -w net.netfilter.nf_conntrack_&lt;wbr&gt;&lt;/wbr&gt;max=1048576&lt;br /&gt;sysctl -p&lt;br /&gt;if cat /etc/sysctl.conf | grep &quot;net.&quot; ; then&lt;br /&gt;&amp;nbsp; echo &quot;tcp tuning is exist&quot;&lt;br /&gt;else&lt;br /&gt;&amp;nbsp; echo &quot;net.core.rmem_max = 33554432&quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;&amp;nbsp; echo &quot;net.core.wmem_max = 33554432&quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;&amp;nbsp; echo &quot;net.ipv4.tcp_rmem = 4096 87380 33554432&quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;&amp;nbsp; echo &quot;net.ipv4.tcp_wmem = 4096 65536 33554432&quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;&amp;nbsp; echo &quot;net.ipv4.tcp_syncookies = 1&quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;&amp;nbsp; echo &quot;net.ipv4.tcp_mem = 50576 64768 98152&quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;&amp;nbsp; echo &quot;net.core.netdev_max_backlog = 10000 &quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;&amp;nbsp; echo &quot;net.core.somaxconn=10000 &quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;&amp;nbsp; echo &quot;net.netfilter.nf_conntrack_&lt;wbr&gt;&lt;/wbr&gt;max = 1048576&quot; &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;fi&lt;br /&gt;#&lt;span style=&quot;color: red;&quot;&gt;Maximum TCP Session&lt;/span&gt;&lt;br /&gt;if cat /etc/security/limits.conf | grep &quot;soft nproc&quot; ; then&lt;br /&gt;&amp;nbsp; echo &quot;tcp session setting is exist&quot;&lt;br /&gt;else&lt;br /&gt;&amp;nbsp; echo &quot;* soft nproc 10000&quot; &amp;gt;&amp;gt; /etc/security/limits.conf&lt;br /&gt;&amp;nbsp; echo &quot;* hard nproc 10000&quot; &amp;gt;&amp;gt; /etc/security/limits.conf&lt;br /&gt;&amp;nbsp; echo &quot;* soft nofile 5000&quot; &amp;gt;&amp;gt; /etc/security/limits.conf&lt;br /&gt;&amp;nbsp; echo &quot;* hard nofile 5000&quot; &amp;gt;&amp;gt; /etc/security/limits.conf&lt;br /&gt;fi&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/1986134531174351629/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/1986134531174351629?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/1986134531174351629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/1986134531174351629'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2020/04/linux-tcp-script.html' title='Linux TCP 連線數優化Script'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-7531176965763174860</id><published>2020-02-09T21:33:00.000+08:00</published><updated>2020-02-09T21:43:10.539+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Juniper"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>BGP Looking Glass Server</title><content type='html'>日常的工作需要Looking Glass 加快查修問題的速度，除了BGP網路外，還有一般的專線跟上網線路，都會需要類似BGP Looking Glass Server的功能，想把它整合成統一的Ping Server，目前使用了Open Source的&lt;a href=&quot;https://github.com/Cougar/lg&quot; target=&quot;_blank&quot;&gt;BGP Looking Glass&lt;/a&gt;程式，再稍微修改一下程式後，就可以達到想要的功能，以下為在CentOS上面建置的方式&lt;br /&gt;
&lt;br /&gt;
Step 1：先到&lt;a href=&quot;https://github.com/Cougar/lg&quot;&gt;https://github.com/Cougar/lg&lt;/a&gt;&amp;nbsp;，先照網站上面的介紹，捉取程式&lt;br /&gt;
yum install git&lt;br /&gt;
git config --global url.&quot;https://&quot;.insteadOf git://&lt;br /&gt;
git clone https://github.com/Cougar/lg.git&lt;br /&gt;
&lt;br /&gt;
Step 2：安裝必要的環境程式&lt;br /&gt;
yum install wget perl-Net-Telnet perl-Net-Telnet-Cisco perl-XML-Parser httpd&lt;br /&gt;
yum install gcc* perl-CPAN&lt;br /&gt;
yum install perl*&lt;br /&gt;
yum install mtr&lt;br /&gt;
yum install perl-DB_File&lt;br /&gt;
安裝perl的外掛，要用cpanm 安裝，後面CGI程式會到用，沒安裝會無法執行主程式，會一直跳Perl執行錯的error log&lt;br /&gt;
cpanm Net::SSH::Perl&lt;br /&gt;
cpanm Net::Telnet::Perl&lt;br /&gt;
&lt;br /&gt;
Step 3：將git捉下來的程式放到WEB執行的目錄，並設定好對應的Apache的權限&lt;br /&gt;
mkdir /var/www/html/lg&lt;br /&gt;
cd /var/www/html/lg&lt;br /&gt;
cp /root/lg-1.9/lg.cgi .&lt;br /&gt;
cp /root/lg-1.9/favicon.ico .&lt;br /&gt;
cp /root/lg-1.9/lg.conf .&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Step 4：確保/var/www/html/lg可讀，並且lg.cgi這支程式可以執行&lt;br /&gt;
chmod 644 *&lt;br /&gt;
chmod 755 lg.cgi&lt;br /&gt;
另外修改一下/var/www/html/lg/lg.cgi這支程式的第26行，原作者這個地方少了my 兩個字，導致未來執行lg.cgi會有錯，先修正如下&lt;br /&gt;
&lt;span style=&quot;color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;my $configfile = &quot;lg.conf&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Step 5：調整Apache設定&lt;br /&gt;
vi /etc/httpd/conf/httpd.conf&lt;br /&gt;
加入以下設定&lt;br /&gt;
Alias /lg/favicon.ico &quot;/var/www/html/lg/favicon.ico&quot;&lt;br /&gt;
ScriptAlias /lg &quot;/var/www/html/lg/lg.cgi&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;directory html=&quot;&quot; lg=&quot;&quot; var=&quot;&quot; www=&quot;&quot;&gt;&lt;/directory&gt;&lt;br /&gt;
AllowOverride None&lt;br /&gt;
AddHandler fcgid-script cgi-script .fcgi .cgi&lt;br /&gt;
Options +ExecCGI&lt;br /&gt;
AddHandler cgi-script .cgi&lt;br /&gt;
DirectoryIndex lg.cgi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 6：依照實際需求調整Looking Glass設定檔，加入需要的Router IP登入資訊&lt;br /&gt;
vi /var/www/html/lg/lg.conf&lt;br /&gt;
建議另外開一個專用的ssh帳號，並限制好可以輸入的指令權限，以免有資安上的疑慮&lt;br /&gt;
以下為Junos的限制方式&lt;br /&gt;
set system login class looking-glass permissions view-configuration&lt;br /&gt;
set system login class looking-glass allow-commands &quot;(show)|(ping)|(traceroute)&quot;&lt;br /&gt;
set system login class looking-glass deny-commands &quot;(clear)|(file)|(file show)|(help)|(load)|(monitor)|(op)|(request)|(save)|(set)|(start)|(test)&quot;&lt;br /&gt;
&lt;br /&gt;
set system login user Test uid 2000&lt;br /&gt;
set system login user Test&amp;nbsp;class looking-glass&lt;br /&gt;
set system login user Test&amp;nbsp;authentication encrypted-password &quot;$XfnbAZ60Iq8375TmTU0&quot;&lt;br /&gt;
&lt;br /&gt;
Step 7：原本cgi程式裡面的內容是給JunOS、Zebra、Cisco IOS的Router使用，為了要把Linux主機的MTR的traceroute與ping整合進去Looking Glass，需要稍微修改一下原本的CGI 程式裡面的zebra的指令，改成給不同台的Linux主機使用，並加入Junos可以用loopback IP做Ping與Traceroute的來源IP&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;zebra&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ipv4&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;bgp&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show ip bgp %s&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;advertised-routes&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show ip bgp neighbors %s advertised-routes&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;summary&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show ip bgp summary&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ping&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ping %s -c 15 -w 1000&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;trace&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;mtr %s --report -c 5 --report-wide --no-dns&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ipv6&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;bgp&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show bgp ipv6 %s&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;advertised-routes&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show bgp ipv6 neighbors %s advertised-routes&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;summary&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show bgp ipv6 summary&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ping&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ping ipv6 %s&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;trace&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;traceroute ipv6 %s&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;junos&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ipv4&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;trace&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;traceroute %s as-number-lookup interface lo0 inet&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ipv6&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;trace&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;traceroute %s interface lo0 inet&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ipv46&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;bgp&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show bgp %s&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;advertised-routes&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show route advertising-protocol bgp %s &quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;summary&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;show bgp summary&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ping&quot;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;ping %s interface lo0 inet count 50 rapid&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
並且調整把三個地方的my $remotecmd = &quot;$command; quit&quot;;&lt;br /&gt;
改成my $remotecmd = &quot;$command; exit&quot;;&lt;br /&gt;
另外再把MTR與Traceroute的權限打開給受限制的低權限的ssh帳號&lt;br /&gt;
setcap cap_net_raw=pe /bin/traceroute&lt;br /&gt;
setcap cap_net_raw=pe /usr/sbin/mtr&lt;br /&gt;
ln -s /usr/sbin/mtr /usr/local/bin/mtr&lt;br /&gt;
chmod o+s /usr/sbin/mtr&lt;br /&gt;
&lt;br /&gt;
Step 8：最後調整一下lg.conf裡面的一些網頁顯示的方式與圖片與Log位置&lt;br /&gt;
vi /var/www//html/lg/lg.conf&lt;br /&gt;
mkdir /var/www/html/images&lt;br /&gt;
cp logo.png /var/www/html/images/logo.png&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
指定好程式的log目錄&lt;/div&gt;
&lt;div&gt;
touch /var/log/lg.log&lt;/div&gt;
&lt;div&gt;
chown apache:apache /var/log/lg.log&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Step 9：打開網頁測試&amp;nbsp; http://IP/lg.cgi&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisuCbjS6C73-wKjsibX74VnyaM0Ktu34g5TV9v3zp9-uw_5w1JnUA5uIXZn-z4nNMtAnewlff7Y1mMGbV0Q-Mbyqk3IhGx683EIVIzRxfHhSiqsXxbCOdqD_MkSmzKlsAfyedv-HDtbPYo/s1600/ping.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;414&quot; data-original-width=&quot;1037&quot; height=&quot;127&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisuCbjS6C73-wKjsibX74VnyaM0Ktu34g5TV9v3zp9-uw_5w1JnUA5uIXZn-z4nNMtAnewlff7Y1mMGbV0Q-Mbyqk3IhGx683EIVIzRxfHhSiqsXxbCOdqD_MkSmzKlsAfyedv-HDtbPYo/s320/ping.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWODz2aec06XKEkk6j0VSIvLH40pbe51As6K6sBam08Dxa9dVeFwZHMoTnXNeJEnyLhRGblWeIfplgQGZkkhobotce4Uh132kdGy9KogSECy7-nwZfQcb4HG8atZbZrl3n0fwbkGF0E0Uh/s1600/ping2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;430&quot; data-original-width=&quot;1600&quot; height=&quot;85&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWODz2aec06XKEkk6j0VSIvLH40pbe51As6K6sBam08Dxa9dVeFwZHMoTnXNeJEnyLhRGblWeIfplgQGZkkhobotce4Uh132kdGy9KogSECy7-nwZfQcb4HG8atZbZrl3n0fwbkGF0E0Uh/s320/ping2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
後記：實際建置時遇到不少的perl問題，可以到APACHE的error log裡面去找出異常的CGI執行行數的error log，然後再安裝對應的perl 套件&lt;br /&gt;
cat /var/log/httpd/error_log&lt;br /&gt;cat /var/log/lg.log&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/7531176965763174860/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/7531176965763174860?isPopup=true' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/7531176965763174860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/7531176965763174860'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2020/02/bgp-looking-glass-server.html' title='BGP Looking Glass Server'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisuCbjS6C73-wKjsibX74VnyaM0Ktu34g5TV9v3zp9-uw_5w1JnUA5uIXZn-z4nNMtAnewlff7Y1mMGbV0Q-Mbyqk3IhGx683EIVIzRxfHhSiqsXxbCOdqD_MkSmzKlsAfyedv-HDtbPYo/s72-c/ping.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-3589386161073032139</id><published>2019-11-09T11:34:00.000+08:00</published><updated>2019-11-09T11:49:12.177+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Smokeping整合Slack發送告警訊息</title><content type='html'>&lt;a href=&quot;https://oss.oetiker.ch/smokeping/&quot; target=&quot;_blank&quot;&gt;Smokeping工具&lt;/a&gt;，安裝的方式可參考官網，目前實作用Slack發出告警訊息&lt;br /&gt;
依照個人安裝的目錄，調整相關的設定檔路徑即可&lt;br /&gt;
&lt;b&gt;vi /usr/local/smokeping/etc/slack_notify.sh&lt;/b&gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
function send_alert {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # Send a SmokePing status alert to the slack channel&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; alertname=&quot;$1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; target=&quot;$2&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; losspattern=&quot;$3&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; rtt=&quot;$4&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; hostname=&quot;$5&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; case &quot;${alertname}&quot; in&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; someloss)&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; #not ideal but will continue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; color=&quot;good&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; highloss)&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; #we will live&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; color=&quot;warning&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; majorloss)&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; #this is real bad.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; color=&quot;danger&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; *)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;Unsupported loss alert name&quot;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;losspattern=$(echo $losspattern | rev | cut -d&#39;,&#39; -f 1 | rev)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; echo &quot;Sending Slack alert, Alert: $alertname, Target: $target, Loss Pattern: $losspattern, RTT: $rtt, Hostname: $hostname&quot; &amp;gt;&amp;gt; /tmp/smokeping.log&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; data=&#39;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;username&quot;: &quot;&lt;span style=&quot;color: red;&quot;&gt;MYLAB-Smokeping&lt;/span&gt;&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;icon_url&quot;: &quot;&lt;span style=&quot;color: red;&quot;&gt;https://a.slack-edge.com/production-standard-emoji-assets/10.2/google-large/1f383@2x.png&lt;/span&gt;&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;attachments&quot;: [&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Alert type : &#39;${alertname}&#39;&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;color&quot;: &quot;&#39;${color}&#39;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;text&quot;: &quot; &quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;fields&quot;: [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Packet Source&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;value&quot;: &quot;&#39;${HOSTNAME}&#39;&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;short&quot;: &quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Packet Destination&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;value&quot;: &quot;&#39;${target}&#39;(&#39;${hostname}&#39;)&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;short&quot;: &quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Packet Loss (%)&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;value&quot;: &quot;&#39;${losspattern}&#39;&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;short&quot;: &quot;true&quot;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;},&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;title&quot;: &quot;Graph&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;value&quot;: &quot;&lt;span style=&quot;color: red;&quot;&gt;http://192.88.34.54/smokeping?target=&#39;${target}&#39;&lt;/span&gt;&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;short&quot;: &quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;channel&quot;: &quot;&lt;span style=&quot;color: red;&quot;&gt;#mytest-channel&lt;/span&gt;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&#39;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; echo $data&lt;br /&gt;
&amp;nbsp; &amp;nbsp; curl -X POST -H &quot;Content-type: application/json&quot; --data &quot;$data&quot; &lt;span style=&quot;color: red;&quot;&gt;https://hooks.slack.com/services/T9DKZ0S4Q/A1EJ51GEB/x1d4B7uGhbpZn7L7KAbiN5sV&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
send_alert &quot;$1&quot; &quot;$2&quot; &quot;$3&quot; &quot;$4&quot; &quot;$5&quot;&lt;br /&gt;
&lt;br /&gt;
exit 0&lt;br /&gt;
&lt;br /&gt;
存檔後離開，並將檔案改成可執行檔&lt;br /&gt;
&lt;b&gt;chmod +x /usr/local/smokeping/etc/slack_notify.sh&lt;/b&gt;&lt;br /&gt;
調整Smokeping的設定檔的告警值&lt;br /&gt;
&lt;b&gt;vi /usr/local/smokeping/etc/config&lt;/b&gt;&lt;br /&gt;
*** General ***&lt;br /&gt;
owner&amp;nbsp; &amp;nbsp; =LAB-TEST&lt;br /&gt;
contact&amp;nbsp; = LAB-TEST@LAB-TEST.com&lt;br /&gt;
mailhost = my.mail.host&lt;br /&gt;
sendmail = /usr/sbin/sendmail&lt;br /&gt;
# NOTE: do not put the Image Cache below cgi-bin&lt;br /&gt;
# since all files under cgi-bin will be executed ... this is not&lt;br /&gt;
# good for images.&lt;br /&gt;
imgcache = /usr/local/smokeping/cache&lt;br /&gt;
imgurl&amp;nbsp; &amp;nbsp;= cache&lt;br /&gt;
datadir&amp;nbsp; = /usr/local/smokeping/data&lt;br /&gt;
piddir&amp;nbsp; = /usr/local/smokeping/var&lt;br /&gt;
cgiurl&amp;nbsp; &amp;nbsp;= http://192.88.34.54/smokeping.cgi&lt;br /&gt;
smokemail = /usr/local/smokeping/etc/smokemail.dist&lt;br /&gt;
tmail = /usr/local/smokeping/etc/tmail.dist&lt;br /&gt;
# specify this to get syslog logging&lt;br /&gt;
syslogfacility = local0&lt;br /&gt;
# each probe is now run in its own process&lt;br /&gt;
# disable this to revert to the old behaviour&lt;br /&gt;
# concurrentprobes = no&lt;br /&gt;
&lt;br /&gt;
*** Alerts ***&lt;br /&gt;
#不用Email發送，而是在原本的信箱後面，加上&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;| &lt;/span&gt;後調用Script執行檔案&lt;br /&gt;
&lt;br /&gt;
to = &lt;span style=&quot;color: red;&quot;&gt;|/usr/local/smokeping/etc/slack_notify.sh&lt;/span&gt;&lt;br /&gt;
from = LAB-TEST@LAB-TEST.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
+rttdetect&lt;br /&gt;
type = rtt&lt;br /&gt;
# in milliseconds&lt;br /&gt;
pattern = &amp;gt;2100,&amp;gt;2100,&amp;gt;2100&lt;br /&gt;
comment = There is a serious connectivity issue with this node&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;+someloss&lt;/span&gt;&lt;br /&gt;
type = loss&lt;br /&gt;
# in percent&lt;br /&gt;
pattern = &amp;gt;0%&amp;lt;=25%,*12*,&amp;gt;0%&amp;lt;=25%,*12*,&amp;gt;0%&amp;lt;=25%&lt;br /&gt;
comment = loss 3 times&amp;nbsp; in a row&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;+highloss&lt;/span&gt;&lt;br /&gt;
type = loss&lt;br /&gt;
# in percent&lt;br /&gt;
pattern = &amp;gt;25%&amp;lt;=50%,*12*,&amp;gt;25%&amp;lt;=50%,*12*,&amp;gt;25%&amp;lt;=50%&lt;br /&gt;
comment = loss 3 times&amp;nbsp; in a row&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;+majorloss&lt;/span&gt;&lt;br /&gt;
type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = loss&lt;br /&gt;
pattern&amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;gt;50%&lt;br /&gt;
edgetrigger = yes&lt;br /&gt;
comment&amp;nbsp; &amp;nbsp; &amp;nbsp;= host down&lt;br /&gt;
&lt;br /&gt;
*** Database ***&lt;br /&gt;
&lt;br /&gt;
step&amp;nbsp; &amp;nbsp; &amp;nbsp;= 60&lt;br /&gt;
pings&amp;nbsp; &amp;nbsp; = 20&lt;br /&gt;
&lt;br /&gt;
# consfn mrhb steps total&lt;br /&gt;
&lt;br /&gt;
AVERAGE&amp;nbsp; 0.5&amp;nbsp; &amp;nbsp;1&amp;nbsp; 1008&lt;br /&gt;
AVERAGE&amp;nbsp; 0.5&amp;nbsp; 12&amp;nbsp; 4320&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MIN&amp;nbsp; 0.5&amp;nbsp; 12&amp;nbsp; 4320&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MAX&amp;nbsp; 0.5&amp;nbsp; 12&amp;nbsp; 4320&lt;br /&gt;
AVERAGE&amp;nbsp; 0.5 144&amp;nbsp; &amp;nbsp;720&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MAX&amp;nbsp; 0.5 144&amp;nbsp; &amp;nbsp;720&lt;br /&gt;
&amp;nbsp; &amp;nbsp; MIN&amp;nbsp; 0.5 144&amp;nbsp; &amp;nbsp;720&lt;br /&gt;
&lt;br /&gt;
*** Presentation ***&lt;br /&gt;
charset = utf-8&lt;br /&gt;
template = /usr/local/smokeping/etc/basepage.html.dist&lt;br /&gt;
&lt;br /&gt;
+ charts&lt;br /&gt;
&lt;br /&gt;
menu = Charts&lt;br /&gt;
title = The most interesting destinations&lt;br /&gt;
&lt;br /&gt;
++ stddev&lt;br /&gt;
sorter = StdDev(entries=&amp;gt;4)&lt;br /&gt;
title = Top Standard Deviation&lt;br /&gt;
menu = Std Deviation&lt;br /&gt;
format = Standard Deviation %f&lt;br /&gt;
&lt;br /&gt;
++ max&lt;br /&gt;
sorter = Max(entries=&amp;gt;5)&lt;br /&gt;
title = Top Max Roundtrip Time&lt;br /&gt;
menu = by Max&lt;br /&gt;
format = Max Roundtrip Time %f seconds&lt;br /&gt;
&lt;br /&gt;
++ loss&lt;br /&gt;
sorter = Loss(entries=&amp;gt;5)&lt;br /&gt;
title = Top Packet Loss&lt;br /&gt;
menu = Loss&lt;br /&gt;
format = Packets Lost %f&lt;br /&gt;
&lt;br /&gt;
++ median&lt;br /&gt;
sorter = Median(entries=&amp;gt;5)&lt;br /&gt;
title = Top Median Roundtrip Time&lt;br /&gt;
menu = by Median&lt;br /&gt;
format = Median RTT %f seconds&lt;br /&gt;
&lt;br /&gt;
+ overview&lt;br /&gt;
&lt;br /&gt;
width = 600&lt;br /&gt;
height = 50&lt;br /&gt;
range = 10h&lt;br /&gt;
&lt;br /&gt;
+ detail&lt;br /&gt;
&lt;br /&gt;
width = 600&lt;br /&gt;
height = 200&lt;br /&gt;
unison_tolerance = 2&lt;br /&gt;
&lt;br /&gt;
&quot;Last 3 Hours&quot;&amp;nbsp; &amp;nbsp; 3h&lt;br /&gt;
&quot;Last 30 Hours&quot;&amp;nbsp; &amp;nbsp;30h&lt;br /&gt;
&quot;Last 10 Days&quot;&amp;nbsp; &amp;nbsp; 10d&lt;br /&gt;
&quot;Last 400 Days&quot;&amp;nbsp; &amp;nbsp;400d&lt;br /&gt;
&lt;br /&gt;
#+ hierarchies&lt;br /&gt;
#++ owner&lt;br /&gt;
#title = Host Owner&lt;br /&gt;
#++ location&lt;br /&gt;
#title = Location&lt;br /&gt;
&lt;br /&gt;
*** Probes ***&lt;br /&gt;
&lt;br /&gt;
+ FPing&lt;br /&gt;
&lt;br /&gt;
binary = /usr/local/sbin/fping&lt;br /&gt;
&lt;br /&gt;
+ DNS&lt;br /&gt;
&lt;br /&gt;
binary = /usr/bin/dig # mandatory&lt;br /&gt;
&lt;br /&gt;
+ Curl&lt;br /&gt;
&amp;nbsp;# probe-specific variables&lt;br /&gt;
binary = /usr/bin/curl&lt;br /&gt;
forks = 5&lt;br /&gt;
offset = 50%&lt;br /&gt;
step = 60&lt;br /&gt;
&lt;br /&gt;
*** Slaves ***&lt;br /&gt;
secrets=/usr/local/smokeping/etc/smokeping_secrets.dist&lt;br /&gt;
+boomer&lt;br /&gt;
display_name=boomer&lt;br /&gt;
color=0000ff&lt;br /&gt;
&lt;br /&gt;
+slave2&lt;br /&gt;
display_name=another&lt;br /&gt;
color=00ff00&lt;br /&gt;
&lt;br /&gt;
*** Targets ***&lt;br /&gt;
&lt;br /&gt;
probe = FPing&lt;br /&gt;
&lt;br /&gt;
menu = Top&lt;br /&gt;
title = Network Latency Grapher&lt;br /&gt;
remark = Welcome to the SmokePing website of TEST-LAB Company. \&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Here you will learn all about the latency of our network.&lt;br /&gt;
&lt;br /&gt;
+ Local_GW&lt;br /&gt;
menu = Local_GW&lt;br /&gt;
title = Local_GW&lt;br /&gt;
host = 192.88.34.254&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;alerts = someloss,highloss,majorloss&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
+TEST-Monitor-01&lt;br /&gt;
menu = TEST-Monitor-01&lt;br /&gt;
title = TEST-Monitor-01&lt;br /&gt;
&lt;br /&gt;
++Ping_TEST-IP-1&lt;br /&gt;
title = 168.95.1.1&lt;br /&gt;
host = 168.95.1.1&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;alerts = someloss,highloss,majorloss&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
++Ping_TEST-IP-2&lt;br /&gt;
title = 8.8.8.8&lt;br /&gt;
host = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;alerts = someloss,highloss,majorloss&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
存檔後離開，當有發生someloss,highloss,majorloss等級的掉包率時，便可發出Slack告警到指定的#channel裡面&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcE8n3G2RLSUNMlMZ4lbNIjmv1BpgnFZAZ-eu_7tVfpilh9WNGoADGeRpxZLuY8338YPykHpP7sIDMW8GstErhWLQtw2c4Erf-yByei6r76eiv43G_wLV98z8b0Ltj3mWKErDCrPsnoRJ1/s1600/LOSS-1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;646&quot; data-original-width=&quot;1041&quot; height=&quot;247&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcE8n3G2RLSUNMlMZ4lbNIjmv1BpgnFZAZ-eu_7tVfpilh9WNGoADGeRpxZLuY8338YPykHpP7sIDMW8GstErhWLQtw2c4Erf-yByei6r76eiv43G_wLV98z8b0Ltj3mWKErDCrPsnoRJ1/s400/LOSS-1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiauPzM5SM42Qq6Fzlq6mWx4livkokgiyttEBTaffGzuxPDOFLM_ek9iUe-5wcZxhYiiGUoiYqcgzv_XOV7ToVDCmepNBpwwNhTqOgmQoOzayDhUCPq71KFV4DkdJsPQtmlEtfQdeuwVyPO/s1600/LOSS02.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;288&quot; data-original-width=&quot;1107&quot; height=&quot;103&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiauPzM5SM42Qq6Fzlq6mWx4livkokgiyttEBTaffGzuxPDOFLM_ek9iUe-5wcZxhYiiGUoiYqcgzv_XOV7ToVDCmepNBpwwNhTqOgmQoOzayDhUCPq71KFV4DkdJsPQtmlEtfQdeuwVyPO/s400/LOSS02.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/3589386161073032139/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/3589386161073032139?isPopup=true' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/3589386161073032139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/3589386161073032139'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2019/11/smokepingslack.html' title='Smokeping整合Slack發送告警訊息'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcE8n3G2RLSUNMlMZ4lbNIjmv1BpgnFZAZ-eu_7tVfpilh9WNGoADGeRpxZLuY8338YPykHpP7sIDMW8GstErhWLQtw2c4Erf-yByei6r76eiv43G_wLV98z8b0Ltj3mWKErDCrPsnoRJ1/s72-c/LOSS-1.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-572700394561012720</id><published>2019-10-05T00:12:00.000+08:00</published><updated>2019-10-05T00:12:20.496+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Juniper"/><title type='text'>Juniper 高階SRX Cluster Login Other RE方式</title><content type='html'>適用於高階SRX 的型號如3000系列或是5000系列&lt;br /&gt;
&lt;pre style=&quot;background: rgb(245, 245, 245); border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; line-height: 1.42857; margin-bottom: 10px; max-width: 100%; outline: 0px; overflow-wrap: break-word; overflow: auto; padding: 9.5px; vertical-align: baseline; word-break: break-all;&quot;&gt;&lt;span style=&quot;font-family: Monaco, Menlo, Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #333333;&quot;&gt;{primary:node0}
user@SRX01-LAB-DC&amp;gt; start shell 
% &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;rlogin -Jk -T node1&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;
 
--- JUNOS 15.1X49-D170.4 built 2019-02-22 23:02:01 UTC
{secondary:node1}
user@SRX02-LAB-DC&amp;gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 13px; white-space: pre-wrap;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
適用於一般低階SRX 的型號(通用指令)&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background: rgb(245, 245, 245); border-radius: 4px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; line-height: 1.42857; margin-bottom: 10px; max-width: 100%; outline: 0px; overflow-wrap: break-word; overflow: auto; padding: 9.5px; vertical-align: baseline; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Monaco, Menlo, Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;b&gt;{primary:node0}
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;user@SRX01-LAB-DC&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: Monaco, Menlo, Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;b&gt;&amp;gt; request routing-engine login node 1          
 
--- JUNOS 15.1X49-D170.4 built 2019-02-22 23:02:01 UTC
{secondary:node1}
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;font-family: Monaco, Menlo, Consolas, &amp;quot;Courier New&amp;quot;, monospace; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt;user@SRX02-LAB-DC&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: Monaco, Menlo, Consolas, Courier New, monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;b&gt;&amp;gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/572700394561012720/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/572700394561012720?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/572700394561012720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/572700394561012720'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2019/10/juniper-srx-cluster-login-other-re.html' title='Juniper 高階SRX Cluster Login Other RE方式'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-7561063643182472144</id><published>2019-08-03T14:15:00.000+08:00</published><updated>2019-08-03T14:15:03.287+08:00</updated><title type='text'>Cisco 3850X IP SLA send syslog config</title><content type='html'>&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;icmp-echo 192.168.99.205&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;threshold 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;timeout 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;frequency 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla 2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;icmp-echo 192.168.99.201&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;threshold 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;timeout 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;frequency 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla 3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;icmp-echo 192.168.99.197&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;threshold 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;timeout 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;frequency 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla 4&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;icmp-echo 192.168.99.193&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;threshold 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;timeout 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;frequency 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla 5&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;icmp-echo 192.168.99.189&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;threshold 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;timeout 500&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;frequency 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla reaction-configuration 1 react timeout threshold-type immediate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla reaction-configuration 2 react timeout threshold-type immediate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla reaction-configuration 3 react timeout threshold-type immediate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla reaction-configuration 4 react timeout threshold-type immediate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla reaction-configuration 5 react timeout threshold-type immediate&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla logging traps&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla enable reaction-alerts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;track 1 ip sla 1 reachability&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;track 2 ip sla 2 reachability&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;track 3 ip sla 3 reachability&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;track 4 ip sla 4 reachability&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;track 5 ip sla 5 reachability&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla schedule 1 life forever start-time now&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla schedule 2 life forever start-time now&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla schedule 3 life forever start-time now&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla schedule 4 life forever start-time now&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;ip sla schedule 5 life forever start-time now&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyCci0pm6K1xWx4rcS1vDXCqw9-S4dTs-LgTJNJKjOGm2vYb_rX6jUhNNBlcft1Oz3WSa9tFvw7Pkpka8N3p-_WJEbMdQlTIkE5yzASj3_2bSwoH_FrX-_R7zVkMQivcq9ygGO0_nfosu/s1600/ipslashuumar.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;749&quot; data-original-width=&quot;1070&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyCci0pm6K1xWx4rcS1vDXCqw9-S4dTs-LgTJNJKjOGm2vYb_rX6jUhNNBlcft1Oz3WSa9tFvw7Pkpka8N3p-_WJEbMdQlTIkE5yzASj3_2bSwoH_FrX-_R7zVkMQivcq9ygGO0_nfosu/s320/ipslashuumar.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSvTyhaf9lW4w-_Uml2jlg-_nSOZZMXctfuHmH5DJOeop8hatmFdZaQiCjVRWOQdmewSloRaZIAehet_ZLtGnr1eo16KY2GsDMWrCn3ctxvHAqVdIFRR7Cxay5tkqVmXNcu1x-pHvI0v1t/s1600/LOGLG.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;151&quot; data-original-width=&quot;1456&quot; height=&quot;33&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSvTyhaf9lW4w-_Uml2jlg-_nSOZZMXctfuHmH5DJOeop8hatmFdZaQiCjVRWOQdmewSloRaZIAehet_ZLtGnr1eo16KY2GsDMWrCn3ctxvHAqVdIFRR7Cxay5tkqVmXNcu1x-pHvI0v1t/s320/LOGLG.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/7561063643182472144/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/7561063643182472144?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/7561063643182472144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/7561063643182472144'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2019/08/cisco-3850x-ip-sla-send-syslog-config.html' title='Cisco 3850X IP SLA send syslog config'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyCci0pm6K1xWx4rcS1vDXCqw9-S4dTs-LgTJNJKjOGm2vYb_rX6jUhNNBlcft1Oz3WSa9tFvw7Pkpka8N3p-_WJEbMdQlTIkE5yzASj3_2bSwoH_FrX-_R7zVkMQivcq9ygGO0_nfosu/s72-c/ipslashuumar.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-6141802153989363355</id><published>2019-07-21T18:09:00.001+08:00</published><updated>2019-07-29T13:12:53.782+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Juniper"/><title type='text'>Juniper OSPF traceoptions</title><content type='html'>set protocols ospf traceoptions file ospf.log&lt;br /&gt;
set protocols ospf traceoptions flag database-description&lt;br /&gt;
set protocols ospf traceoptions flag event&lt;br /&gt;
set protocols ospf traceoptions flag error&lt;br /&gt;
set protocols ospf traceoptions flag lsa-request&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcLdq_7zaUdURUPA2upHxF8sXDrJq_1NyLYcVu-1GhPfr3sWK5QFIitusHKiDQaeJGEfotnZLqCJojS0LgAd1iK5Efu7B78QB7lziatNFADcxfAa93yZvALsFvJPb-9Nx4ZvhSWOUrzUyP/s1600/ospf-log.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;568&quot; data-original-width=&quot;1600&quot; height=&quot;226&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcLdq_7zaUdURUPA2upHxF8sXDrJq_1NyLYcVu-1GhPfr3sWK5QFIitusHKiDQaeJGEfotnZLqCJojS0LgAd1iK5Efu7B78QB7lziatNFADcxfAa93yZvALsFvJPb-9Nx4ZvhSWOUrzUyP/s640/ospf-log.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
其它OSPF狀態檢查&lt;br /&gt;
show log ospf.log&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
show ospf database&lt;/div&gt;
&lt;div&gt;
show ospf interface&lt;/div&gt;
&lt;div&gt;
show ospf route&lt;/div&gt;
&lt;div&gt;
show route protocol ospf&lt;/div&gt;
&lt;div&gt;
show ospf statistics&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/6141802153989363355/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/6141802153989363355?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/6141802153989363355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/6141802153989363355'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2019/07/juniper-ospf-traceoptions.html' title='Juniper OSPF traceoptions'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcLdq_7zaUdURUPA2upHxF8sXDrJq_1NyLYcVu-1GhPfr3sWK5QFIitusHKiDQaeJGEfotnZLqCJojS0LgAd1iK5Efu7B78QB7lziatNFADcxfAa93yZvALsFvJPb-9Nx4ZvhSWOUrzUyP/s72-c/ospf-log.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-1083327656117806098</id><published>2019-06-27T21:36:00.002+08:00</published><updated>2019-06-27T21:36:48.858+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Juniper"/><title type='text'>Juniper SRX Monitor Traffic</title><content type='html'>Host:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching &quot;host 10.130.38.94&quot; no-resolve&lt;br /&gt;
&lt;br /&gt;
Protocol:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching arp&lt;br /&gt;
&lt;br /&gt;
Port:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching &quot;port 22&quot;&lt;br /&gt;
&lt;br /&gt;
IP address:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching &quot;host 10.130.38.94&quot; no-resolve detail&lt;br /&gt;
&lt;br /&gt;
A network:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching &quot;net 225.1.1.0/24&quot; no-resolve detail&lt;br /&gt;
&lt;br /&gt;
TCP port 179:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching &quot;tcp port 179&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
UDP port 646:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching &quot;udp port 646&quot;&lt;br /&gt;
&lt;br /&gt;
Increase the size of capture:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching arp size 1500&lt;br /&gt;
&lt;br /&gt;
Save the capture to a file:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching arp write-file capture.pcap &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; write-file is a hidden command so type it out&lt;br /&gt;
&lt;br /&gt;
Matching &quot;not tcp port 3128” and matching tcp port 23&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching &quot;not tcp port 3128 and tcp port 23&quot;&lt;br /&gt;
&lt;br /&gt;
Matching BDPUs&lt;br /&gt;
monitor traffic interface ge-0/0/1 no-resolve size 1500 layer2-headers matching &quot;ether dst 01:80:c2:00:00:00&quot;&lt;br /&gt;
&lt;br /&gt;
A more complicated combination but might be useful in some cases:&lt;br /&gt;
root# run monitor traffic interface ge-0/0/x matching &quot;arp or (icmp and host 3.3.3.2)&quot;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/1083327656117806098/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/1083327656117806098?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/1083327656117806098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/1083327656117806098'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2019/06/juniper-srx-monitor-traffic_27.html' title='Juniper SRX Monitor Traffic'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-8215839512043188290</id><published>2018-06-12T21:55:00.001+08:00</published><updated>2018-06-12T21:55:52.067+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="投資理財"/><title type='text'>股票配息</title><content type='html'>&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;中華電信(2412) 股利政策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;4.80&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;4.80&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;中鋼(2002) 股利政策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.88&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.88&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;裕民(2606) 股 利 政 策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.20&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.20&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;長興(1717) 股利政策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.50&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.70&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.70&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.20&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;遠東新(1402) 股利政策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.20&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.20&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;亞泥(1102) 股利政策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.20&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.20&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;台灣大(3045) 股利政策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;5.60&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;5.60&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;合庫金(5880) 股利政策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.75&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.30&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.30&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.05&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; height: 23px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;400&quot;&gt;第一金(2892) 股利政策&lt;/td&gt;&lt;td align=&quot;right&quot; class=&quot;tt&quot; style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 16pt; margin: 0px; padding: 0px; vertical-align: middle;&quot; width=&quot;5&quot;&gt;&lt;br style=&quot;margin: 0px; padding: 0px;&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; style=&quot;background-color: #fec003; color: black; font-family: &amp;quot;Lucida Grande&amp;quot;, &amp;quot;Lucida Sans Unicode&amp;quot;, sans-serif; font-size: 12px; line-height: 21px; margin: 0px; padding: 0px;&quot;&gt;&lt;tbody style=&quot;margin: 0px; padding: 0px;&quot;&gt;
&lt;tr bgcolor=&quot;#FFF0C1&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;年　度&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;現 金 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;盈 餘 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;公 積 配 股&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;股 票 股 利&lt;/td&gt;&lt;td align=&quot;center&quot; class=&quot;ttt&quot; style=&quot;font-family: 新細明體; font-size: 12pt; line-height: 18pt; margin: 0px; padding: 0px; vertical-align: middle;&quot;&gt;合　計&lt;/td&gt;&lt;/tr&gt;
&lt;tr bgcolor=&quot;#FFFFFF&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;&lt;td align=&quot;center&quot; height=&quot;25&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;106&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.90&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.10&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.00&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;0.10&lt;/td&gt;&lt;td align=&quot;center&quot; style=&quot;margin: 0px; padding: 0px;&quot;&gt;1.00&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/8215839512043188290/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/8215839512043188290?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8215839512043188290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8215839512043188290'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2018/06/blog-post.html' title='股票配息'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-4042840051746703217</id><published>2018-05-05T11:11:00.002+08:00</published><updated>2018-05-05T11:11:31.849+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Linux ICMP 監控Script</title><content type='html'>每秒發送1個ICMP封包，加上時間標記並記錄下來&lt;br /&gt;[root@Localhost ~]# vi ping_check.sh&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
DATE=$(date +&quot;%d.%m.%Y %T&quot;)&lt;br /&gt;
SHORT_DATE=$(date +&quot;%d.%m.%Y&quot;)&lt;br /&gt;
&lt;br /&gt;
echo&lt;br /&gt;
echo &quot;Pinging host &quot; $@&lt;br /&gt;
echo&lt;br /&gt;
&lt;br /&gt;
HOST=$@&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ping $HOST | while read PONG&lt;br /&gt;
do&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; grep -q ttl &amp;lt;&amp;lt;&amp;lt; &quot;$PONG&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ $? -eq 0 ]; then&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;`date`: $PONG&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;`date`: $PONG&quot; &amp;amp;&amp;gt;&amp;gt; ping_check_$SHORT_DATE.log&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;`date`: ping failed, $HOST host is DOWN!&quot; &amp;amp;&amp;gt;&amp;gt; ping_check_$SHORT_DATE.log&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;$PONG&quot; &amp;amp;&amp;gt;&amp;gt; ping_check_$SHORT_DATE.log&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;br /&gt;
done&lt;br /&gt;
&lt;div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKbix0Yv0q-Vbt7RiJkqVhUfTVq-_6CnKKkbrvx7HIzv0FgKJoGaGwjgOXR50hH4dA8RHN-0XplXY_ysEZUbGJrE8cnmD2JbQ5x_LqENFgc9rpNIglMyA0oNP0zTojLYkMnvwh04garWnr/s1600/123.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;549&quot; data-original-width=&quot;960&quot; height=&quot;227&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKbix0Yv0q-Vbt7RiJkqVhUfTVq-_6CnKKkbrvx7HIzv0FgKJoGaGwjgOXR50hH4dA8RHN-0XplXY_ysEZUbGJrE8cnmD2JbQ5x_LqENFgc9rpNIglMyA0oNP0zTojLYkMnvwh04garWnr/s400/123.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
[root@Localhost ~]#chmod +x ping_check.sh&lt;br /&gt;[root@Localhost ~]#sh ping_check.sh google.com&lt;br /&gt;執行後的Log格式顯示如下&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyznyCduCsLOXx0ghSPQ2ydTLhMjix0L4nmBxGR8-e1RRYtJwXirmAXZBR0n3nNQ2LFfmXACakisirEQYHrKbV-nExgp80xLylQvh3pJ_Y-eaVK4O6QuhcfAHTv5SmSlHShDJudPzplyAZ/s1600/333.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;363&quot; data-original-width=&quot;1216&quot; height=&quot;118&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyznyCduCsLOXx0ghSPQ2ydTLhMjix0L4nmBxGR8-e1RRYtJwXirmAXZBR0n3nNQ2LFfmXACakisirEQYHrKbV-nExgp80xLylQvh3pJ_Y-eaVK4O6QuhcfAHTv5SmSlHShDJudPzplyAZ/s400/333.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
若系統帳號登出後，要再背景執行的話，要再加上nohup指令執行即可&lt;br /&gt;[root@Localhost ~]#nohup sh ping_check.sh google.com&amp;nbsp;&amp;amp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/4042840051746703217/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/4042840051746703217?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/4042840051746703217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/4042840051746703217'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2018/05/linux-icmp-script.html' title='Linux ICMP 監控Script'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKbix0Yv0q-Vbt7RiJkqVhUfTVq-_6CnKKkbrvx7HIzv0FgKJoGaGwjgOXR50hH4dA8RHN-0XplXY_ysEZUbGJrE8cnmD2JbQ5x_LqENFgc9rpNIglMyA0oNP0zTojLYkMnvwh04garWnr/s72-c/123.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-7322597089461703810</id><published>2018-03-16T21:56:00.002+08:00</published><updated>2018-03-16T21:56:50.247+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cisco"/><title type='text'>Cisco 2960X NetFlow設定</title><content type='html'>flow record NETFLOW-RECORD&lt;br /&gt;
&amp;nbsp;match ipv4 tos&lt;br /&gt;
&amp;nbsp;match ipv4 protocol&lt;br /&gt;
&amp;nbsp;match ipv4 source address&lt;br /&gt;
&amp;nbsp;match ipv4 destination address&lt;br /&gt;
&amp;nbsp;match transport source-port&lt;br /&gt;
&amp;nbsp;match transport destination-port&lt;br /&gt;
&amp;nbsp;collect transport tcp flags&lt;br /&gt;
&amp;nbsp;collect interface input&lt;br /&gt;
&amp;nbsp;collect counter bytes long&lt;br /&gt;
&amp;nbsp;collect counter packets long&lt;br /&gt;
&amp;nbsp;collect counter bytes permanent&lt;br /&gt;
&amp;nbsp;collect counter packets permanent&lt;br /&gt;
&amp;nbsp;collect timestamp sys-uptime first&lt;br /&gt;
&amp;nbsp;collect timestamp sys-uptime last&lt;br /&gt;
!&lt;br /&gt;
flow exporter NETFLOW-EXPORTER&lt;br /&gt;
&amp;nbsp;destination 192.168.88.100&lt;br /&gt;
&amp;nbsp;source Vlan300&lt;br /&gt;
&amp;nbsp;transport udp 9996&lt;br /&gt;
!&lt;br /&gt;
flow monitor NETFLOW-MONITOR&lt;br /&gt;
&amp;nbsp;exporter NETFLOW-EXPORTER&lt;br /&gt;
&amp;nbsp;cache timeout active 60&lt;br /&gt;
&amp;nbsp;record NETFLOW-RECORD&lt;br /&gt;
!&lt;br /&gt;
sampler NETFLOW-FLOWSAMPLER&lt;br /&gt;
&amp;nbsp;mode random 1 out-of 500&lt;br /&gt;
!&lt;br /&gt;
interface GigabitEthernet1/0/1&lt;br /&gt;
&amp;nbsp;ip flow monitor NETFLOW-MONITOR sampler NETFLOW-FLOWSAMPLER input&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
參考連結&lt;br /&gt;
&lt;a href=&quot;https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960x/software/15-2_2_e/fnf/configuration_guide/b_fnf_1522e_2960x_cg/b_fnf_32se_3850_cg_chapter_010.html&quot;&gt;https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960x/software/15-2_2_e/fnf/configuration_guide/b_fnf_1522e_2960x_cg/b_fnf_32se_3850_cg_chapter_010.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/7322597089461703810/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/7322597089461703810?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/7322597089461703810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/7322597089461703810'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2018/03/cisco-2960x-netflow.html' title='Cisco 2960X NetFlow設定'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-990160761820825732</id><published>2018-03-08T22:04:00.001+08:00</published><updated>2018-03-08T22:04:11.847+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Splunk"/><title type='text'>Splunk整合Slack發送即時警示訊息</title><content type='html'>&lt;span style=&quot;color: black;&quot;&gt;&lt;a href=&quot;https://www.splunk.com/zh-hant_cn&quot; target=&quot;_blank&quot;&gt;Splunk&lt;/a&gt;也可以跟&lt;a href=&quot;https://slack.com/&quot; target=&quot;_blank&quot;&gt;Slack&lt;/a&gt;整合即時發送告警訊息&lt;/span&gt;，設定方式如下&lt;br /&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: black;&quot;&gt;Step1：先到下方Splunk網頁去捉取&lt;/span&gt;Slack Notification Alert應用套件安裝&lt;br /&gt;
&lt;a href=&quot;https://splunkbase.splunk.com/app/2878/&quot;&gt;https://splunkbase.splunk.com/app/2878/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step2：安裝完成後，在應用套件--&amp;gt;Slack Alerts--&amp;gt;設定&amp;nbsp; ，將申請好的Slack API Webhook網址貼上去，並存檔，申請API的方式可參考&lt;a href=&quot;http://tanzih.blogspot.tw/2018/02/cactislackcactus.html&quot; target=&quot;_blank&quot;&gt;上篇文章連結&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9rbks8bYGB8b_2Gopm59jVbPekURKweoXUcRlVLTP7ZPPRmnT4K5PuohkxkN8vJr_CXgPOWBzKNtD6hg1HEO1xVPKJfTXCvaxX9sjQV8W45N4SI4DM_iMhzkkBLWM0MQh22z2xGOPj8fm/s1600/HHH.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;267&quot; data-original-width=&quot;960&quot; height=&quot;110&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9rbks8bYGB8b_2Gopm59jVbPekURKweoXUcRlVLTP7ZPPRmnT4K5PuohkxkN8vJr_CXgPOWBzKNtD6hg1HEO1xVPKJfTXCvaxX9sjQV8W45N4SI4DM_iMhzkkBLWM0MQh22z2xGOPj8fm/s400/HHH.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;Step3：在Splunk頁面--&amp;gt;警示--&amp;gt;設定即時警示動作 ，選擇觸發動作為Slack&lt;br /&gt;照需求選好要發送的頻道，訊息內容的地方，可以個人需求填入，也可以將警示的結果用Splunk定義好的變數參數代入，變數代表的內容可以Splunk網站的&lt;a href=&quot;http://docs.splunk.com/Documentation/Splunk/6.1.2/Alert/Setupalertactions#Email_notification&quot; target=&quot;_blank&quot;&gt;這個連結&lt;/a&gt;&lt;br /&gt;我使用的變數如下&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;$server.serverName$:bangbang:$name$:$result._raw$&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil4XNjFuNwj1Htkaj-_2mzIWPcd4gflJkDLW88dgIqpaRSpeOwBbt17oLTkpj0THSEOXp2GSsI-Mx00lWMipQeWIEUXleNeix48DpoembRfSbqSe5Lw6GMBCmjoWQ5dEZYPATBkQii87Rt/s1600/HHH.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;658&quot; data-original-width=&quot;793&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil4XNjFuNwj1Htkaj-_2mzIWPcd4gflJkDLW88dgIqpaRSpeOwBbt17oLTkpj0THSEOXp2GSsI-Mx00lWMipQeWIEUXleNeix48DpoembRfSbqSe5Lw6GMBCmjoWQ5dEZYPATBkQii87Rt/s320/HHH.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Step 4：產生一筆告警，讓Splunk透由Slack API發送推播訊息到手機裡，效果如下&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6mMWytlo5acxtuQXRYH6Q4-WX0lR9-d6-Wq3n5SOTp2XchAJIyB_sW_jYY3_50E2RqS0Q7YjAFJrmpiApCD4yGZTUKALzwIa5QHQN7HhaKtAUE5Nmf2d-zAMFuzDpWnwyae-u478u5dGF/s1600/LLL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;900&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6mMWytlo5acxtuQXRYH6Q4-WX0lR9-d6-Wq3n5SOTp2XchAJIyB_sW_jYY3_50E2RqS0Q7YjAFJrmpiApCD4yGZTUKALzwIa5QHQN7HhaKtAUE5Nmf2d-zAMFuzDpWnwyae-u478u5dGF/s640/LLL.jpg&quot; width=&quot;360&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/990160761820825732/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/990160761820825732?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/990160761820825732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/990160761820825732'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2018/03/splunkslack.html' title='Splunk整合Slack發送即時警示訊息'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9rbks8bYGB8b_2Gopm59jVbPekURKweoXUcRlVLTP7ZPPRmnT4K5PuohkxkN8vJr_CXgPOWBzKNtD6hg1HEO1xVPKJfTXCvaxX9sjQV8W45N4SI4DM_iMhzkkBLWM0MQh22z2xGOPj8fm/s72-c/HHH.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-355469824682789282</id><published>2018-02-28T17:20:00.000+08:00</published><updated>2018-02-28T17:32:20.928+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="工作"/><title type='text'>Cacti整合Slack發送告警訊息</title><content type='html'>&lt;a href=&quot;https://slack.com/&quot; target=&quot;_blank&quot;&gt;Slack&lt;/a&gt;目前支援使用&lt;a href=&quot;https://api.slack.com/web&quot; target=&quot;_blank&quot;&gt;API&lt;/a&gt;或是&lt;a href=&quot;https://api.slack.com/incoming-webhooks&quot; target=&quot;_blank&quot;&gt;Webhook&lt;/a&gt;的方式來發送訊息到指定的Channel中，Cacti只要稍為調整一下tholdhold的程式後，便可以經由Slack來發送告警訊息並且推播到手機中。下面介紹如何透過Slack Webhook的方式來傳送告警訊息。&lt;br /&gt;
&lt;br /&gt;
一、申請好Slack的帳號，在Slack的網站裡面點選進入APP&amp;amp;Custom Integrations -&amp;gt;Build-&amp;gt;Make a Custom Integration 新增 Incoming WebHooks，新增想要送的channels，申請完可以取得Webhook URL&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCRpD6RkD5ASJklDzeECPxgL1Oh5Lz8GljTWwnK2cBHSqQBXmvvYjiS6vjE_K-uLt584_rxhWJWj8H_hXOAU18C2m4HVIjrfr9vbwRXVkJLuAY_ftYETtDXoxq1IyzkuuTzbHhHyiMOv61/s1600/WWW.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;351&quot; data-original-width=&quot;980&quot; height=&quot;142&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCRpD6RkD5ASJklDzeECPxgL1Oh5Lz8GljTWwnK2cBHSqQBXmvvYjiS6vjE_K-uLt584_rxhWJWj8H_hXOAU18C2m4HVIjrfr9vbwRXVkJLuAY_ftYETtDXoxq1IyzkuuTzbHhHyiMOv61/s400/WWW.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;二、先在Cacti裡面用Curl指令測試上面產生的Webhook URL來發送訊息到#random頻道做測試&lt;br /&gt;
curl -X POST --data-urlencode &#39;payload={&quot;channel&quot;: &quot;#random&quot;, &quot;username&quot;: &quot;Cacti-Slack-LAB&quot;, &quot;text&quot;: &quot;This is posted to #alert and comes from a bot named webhookbot.&quot;, &quot;icon_emoji&quot;: &quot;:bear:&quot;}&#39; https://hooks.slack.com/services/A3DBDQ74Z/A9C2K15GD/cf23G7uCET2Y2FLK9ABiY52X&lt;br /&gt;
發送成功的話，在#random頻道裡會收到相關通知訊息&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbqb8HiIMCsfVsM82ZUHVEQGHAqS7yWtEqvHNWMDJy7W1LfFGmDhdbrvvSM7wfVGLhI1dNsWtehxNqO0jeiAHSQSBTY9bHR6piEnw-7UkBiVpXOlM_VOnSX97s7oNY46Be1HTf4NJmFLXQ/s1600/DDD.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;132&quot; data-original-width=&quot;631&quot; height=&quot;82&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbqb8HiIMCsfVsM82ZUHVEQGHAqS7yWtEqvHNWMDJy7W1LfFGmDhdbrvvSM7wfVGLhI1dNsWtehxNqO0jeiAHSQSBTY9bHR6piEnw-7UkBiVpXOlM_VOnSX97s7oNY46Be1HTf4NJmFLXQ/s400/DDD.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
三、Slack是用json的格式來發訊，需要先在Cacti裝一下php-pecl-json&lt;br /&gt;
[root@Localhost ~]#yum install -y php-pecl-json&lt;br /&gt;
裝完要restart httpd服務&lt;br /&gt;
&lt;br /&gt;
四、在Cacti的tholdhold安裝目錄下建立一支php程式名叫slack.php&lt;br /&gt;
[root@Localhost ~]#vi /var/www/html/cacti/plugins/thold/slack.php&lt;br /&gt;
PHP程式內容如下，下面紅色的地方可自訂發訊人的名稱與圖示&lt;br /&gt;
$data = array(&quot;username&quot; =&amp;gt; &quot;&lt;span style=&quot;color: red;&quot;&gt;Cacti-Slack-LAB&lt;/span&gt;&quot;,&quot;icon_emoji&quot; =&amp;gt; &quot;&lt;span style=&quot;color: red;&quot;&gt;:cactus:&lt;/span&gt;&quot; ,&quot;text&quot; =&amp;gt; &quot;$argv[1]&quot;);&lt;br /&gt;
$data_string = json_encode($data);&lt;br /&gt;
$url = &quot;https://hooks.slack.com/services/A3DBDQ74Z/A9C2K15GD/cf23G7uCET2Y2FLK9ABiY52X&quot;;&lt;br /&gt;
$c = curl_init();&lt;br /&gt;
curl_setopt($c, CURLOPT_URL, $url);&lt;br /&gt;
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($c, CURLOPT_CUSTOMREQUEST, &quot;POST&quot;);&lt;br /&gt;
curl_setopt($c, CURLOPT_POSTFIELDS, $data_string);&lt;br /&gt;
curl_setopt($c, CURLOPT_HTTPHEADER, array(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;Content-Type: application/json&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;Content-Length: &#39; . strlen($data_string))&lt;br /&gt;
);&lt;br /&gt;
echo curl_exec($c);&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFAZrMTk8bKfxOYK3cA5oiHsE8pr9yQw0Qx4x0KFPvClfwq1PChKtk2uW9jomXaSTUke_9WosfEifIHOjxZjngJmtv45OJEJfJKcnYrKK7RR9TNo4vnMkfOG7zdc3T8rCXeVRr-P4qjFBe/s1600/CCC.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;508&quot; data-original-width=&quot;1392&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFAZrMTk8bKfxOYK3cA5oiHsE8pr9yQw0Qx4x0KFPvClfwq1PChKtk2uW9jomXaSTUke_9WosfEifIHOjxZjngJmtv45OJEJfJKcnYrKK7RR9TNo4vnMkfOG7zdc3T8rCXeVRr-P4qjFBe/s640/CCC.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
五、接著調整修改thold_functions.php這隻程式，找到大約在2836行的附近找到&lt;br /&gt;
function thold_mail($to, $from, $subject, $message, $filename, $headers = &#39;&#39;)&lt;br /&gt;
然後移動到function 的最尾端可以看到return &#39;&#39;; 接著在return &#39;&#39;;前加入&lt;br /&gt;
$sms = shell_exec(&#39;php /usr/share/cacti/plugins/thold/slack.php &#39; .escapeshellarg($message).&#39;&#39;);&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdfCa2XplHl41qT_gu22Tpxk-rhqn8gn3VcAcUlgW6jfddxKpqAJX6zzRBhUWfAfvWro9uaRikts2eiKoPifw0X2q1jCrvP2eCiviaF6ak-G0wHCk4Pi0K3ayvzo8mymXHI-KCSRCqOu_y/s1600/GGG.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;414&quot; data-original-width=&quot;1600&quot; height=&quot;163&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdfCa2XplHl41qT_gu22Tpxk-rhqn8gn3VcAcUlgW6jfddxKpqAJX6zzRBhUWfAfvWro9uaRikts2eiKoPifw0X2q1jCrvP2eCiviaF6ak-G0wHCk4Pi0K3ayvzo8mymXHI-KCSRCqOu_y/s640/GGG.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
六、接著在Cacti裡產生相關的up/down或是tholdhold告警測試，Slack通知結果如下&lt;br /&gt;
Web通知效果&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfrDrwkKeVLwOWyI2VEfZ5fZvE7T_d-5VX9WSAaOgULLBBxSDX9RDnvM5QFUelyyPP3pWm7y4NUvuHXaUhUMND-1SMvFItcN9d2LppokqjV5xXh8Vp_-Vcq4ex6aFZuzWlZRZvp7i3rEXS/s1600/uuu.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;407&quot; data-original-width=&quot;1600&quot; height=&quot;101&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfrDrwkKeVLwOWyI2VEfZ5fZvE7T_d-5VX9WSAaOgULLBBxSDX9RDnvM5QFUelyyPP3pWm7y4NUvuHXaUhUMND-1SMvFItcN9d2LppokqjV5xXh8Vp_-Vcq4ex6aFZuzWlZRZvp7i3rEXS/s400/uuu.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
手機APP通知效果&lt;br /&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqJ5NykDs_L8tbf_cngLBbDP4rTe0yh694n-CowTmTPsZGaFprX7D7iqva9n6Nx-_F_QkfgH34-7GeTQDqR2Nn9q6XyFKcXGD03T3Rs4b2CXaDomKOCNo9oGM_n6HfwJx2P8B54yVWj3a1/s1600/S__7946341.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;900&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqJ5NykDs_L8tbf_cngLBbDP4rTe0yh694n-CowTmTPsZGaFprX7D7iqva9n6Nx-_F_QkfgH34-7GeTQDqR2Nn9q6XyFKcXGD03T3Rs4b2CXaDomKOCNo9oGM_n6HfwJx2P8B54yVWj3a1/s320/S__7946341.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
七、若要讓手機收到即時推播訊息的話，需要在Channel頻道與手機APP上面做以下設定&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;div&gt;
Automaticall disable notifycation from那邊不要去打勾，不然特定時間會收不到&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWJHPNGQrcSM4-qnU9MTDyQwyuL2o37dORsMHU7p2R7Alrrkcr5BnKILgHfUCxMdIbvf6ih6xC-_8jb5LOb63z3HCb4OU3wzQQR2sjVjX31wjfDw-hTvMYerwBjmai-CkSi2ohbZxMehj0/s1600/TT.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;868&quot; data-original-width=&quot;1103&quot; height=&quot;251&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWJHPNGQrcSM4-qnU9MTDyQwyuL2o37dORsMHU7p2R7Alrrkcr5BnKILgHfUCxMdIbvf6ih6xC-_8jb5LOb63z3HCb4OU3wzQQR2sjVjX31wjfDw-hTvMYerwBjmai-CkSi2ohbZxMehj0/s320/TT.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
選All new messages&amp;nbsp; 跟Notify Me on Mobile&amp;nbsp; As quicky as possible&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3o78qoI7qmHPh-5b_mC3JGSYiTqQM8xvb4NvmRYq6mNdkBgziuyJguKgFMQXoJuWMAfx6DGmqP-Gw8LMCgqKpCml9y5lNPDxGv930RIOGhwPrbbyC5ix5Zjhf-fgBPraBgfkVFh50npH/s1600/PPP.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;960&quot; data-original-width=&quot;540&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF3o78qoI7qmHPh-5b_mC3JGSYiTqQM8xvb4NvmRYq6mNdkBgziuyJguKgFMQXoJuWMAfx6DGmqP-Gw8LMCgqKpCml9y5lNPDxGv930RIOGhwPrbbyC5ix5Zjhf-fgBPraBgfkVFh50npH/s320/PPP.jpg&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
調整完以上設定之後，便可以即時收到tholdhold傳到Slack的通知，即便發信的SMTP的主機異常，或是公司的Mail Server有問題時，都不影響告警的發送。&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;最後用下面這張圖來代表工程師的無奈與心酸XDD~~&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMPtaRzpmmmtzQbZwc70A79CdSP_VxyNSZZ52FyrAh6N7fzwXJtxlT_Vv0o5v1pmkSCN9G1hheSsdq3HJcgmktuZtOURB2h5vufqe8qVQLwoipiAuJ3XKC7o72uLEotxic2nkkaPSJ1FHE/s1600/Always_on_Call.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;947&quot; data-original-width=&quot;947&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMPtaRzpmmmtzQbZwc70A79CdSP_VxyNSZZ52FyrAh6N7fzwXJtxlT_Vv0o5v1pmkSCN9G1hheSsdq3HJcgmktuZtOURB2h5vufqe8qVQLwoipiAuJ3XKC7o72uLEotxic2nkkaPSJ1FHE/s400/Always_on_Call.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/355469824682789282/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/355469824682789282?isPopup=true' title='6 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/355469824682789282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/355469824682789282'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2018/02/cactislackcactus.html' title='Cacti整合Slack發送告警訊息'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCRpD6RkD5ASJklDzeECPxgL1Oh5Lz8GljTWwnK2cBHSqQBXmvvYjiS6vjE_K-uLt584_rxhWJWj8H_hXOAU18C2m4HVIjrfr9vbwRXVkJLuAY_ftYETtDXoxq1IyzkuuTzbHhHyiMOv61/s72-c/WWW.png" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-6391496819465948417</id><published>2018-02-02T16:58:00.001+08:00</published><updated>2018-02-02T17:02:50.555+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cisco"/><title type='text'>Cisco NX-OS CLI - Part2</title><content type='html'>&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;center&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Cisco IOS CLI&lt;/i&gt;&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;center&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Cisco NX-OS CLI&lt;/i&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring a Routed Interface&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;interface gigabitethernet 1/1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;ip address 192.168.1.1 255.255.255.0&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no shutdown&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface ethernet 1/1&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
ip address 192.168.1.1/24&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring a Switched Interface (VLAN 10)&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;vlan 10&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: white;&quot;&gt;interface gigabitethernet 1/1&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;switchport&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;switchport mode access&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport access vlan 10&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no shutdown&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;vlan 10&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;
interface ethernet 1/1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport mode access&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport access vlan 10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring a Switched Virtual Interface (SVI)&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;Cisco IOS Software does not have the ability to enable or disable SVI interfaces using the feature command.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: white;&quot;&gt;interface vlan 10&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;ip address 192.168.1.1 255.255.255.0&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no shutdown&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;feature interface-vlan&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;
interface vlan 10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
ip address 192.168.1.1./24&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring a Switched Trunk Interface&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;interface GigabitEthernet 1/1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;switchport&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;switchport trunk encapsulation dot1q&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;switchport trunk native vlan 2&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport trunk allowed vlan 10,20&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport mode trunk&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no shutdown&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface ethernet 1/1&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport mode trunk&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport trunk allowed vlan 10,20&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport trunk native vlan 2&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring a Routed Trunk Sub-Interface&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;interface gigabitethernet 1/1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no switchport&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no shutdown&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
interface gigabitethernet1/1.10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
encapsulation dot1Q 10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
ip address 192.168.1.1 255.255.255.0&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no shutdown&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface ethernet 1/1&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no switchport&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;
interface ethernet 1/1.10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
encapsulation dot1q 10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
ip address 192.168.1.1/24&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring a Loopback Interface&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;interface loopback 1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;ip address 192.168.1.1 255.255.255.255&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no shutdown&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface loopback 1&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
ip address 192.168.1.1/32&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring a Tunnel Interface&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;Cisco IOS Software does not have the ability to enable or disable Tunnel interfaces using the feature command.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: white;&quot;&gt;interface Tunnel 1&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;ip address 192.168.1.1 255.255.255.0&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;tunnel source 172.16.1.1&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
tunnel destination 172.16.2.1&lt;/div&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;no shutdown&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;feature tunnel&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;
interface tunnel 1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
ip address 192.168.1.1/24&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
tunnel source 172.16.1.1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
tunnel destination 172.16.2.1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring an Interface Description&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;interface gigabitethernet 1/1&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;description Test Interface&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface ethernet 1/1&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
description Test Interface&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring Jumbo Frames&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;interface gigabitethernet 1/1&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;mtu 9216&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface ethernet 1/1&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
mtu 9216&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring Multiple Interfaces (Examples)&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;interface range gigabitethernet 1/1-2&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;or&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;interface range gigabitethernet 1/1, gigabitethernet 2/1&lt;/span&gt;&lt;/div&gt;
&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface ethernet 1/1-2&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
or&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
interface ethernet 1/1, ethernet 2/1&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring Port Profiles&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Cisco IOS Software does not have the ability to configure port profiles.&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;port-profile type ethernet Email-Template&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
switchport access vlan 10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
spanning-tree port type edge&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
no shutdown&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
description Email Server Port&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
state enabled&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;
interface ethernet 2/1-48&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
inherit port-profile Email-Template&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;TDR Cable Diagnostics&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;test cable-diagnostics tdr interface gigabitethernet 1/1&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;test cable-diagnostics tdr interface etherent 1/1&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring the Interface Locator-LED (Beacon)&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Cisco IOS Software does not have the ability to enable a located-led per interface.&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface ethernet 1/1&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
beacon&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring a Nexus 2000(FEX) Host Interface&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Cisco IOS Software does not have the ability to connect a Nexus 2000(FEX).&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface ethernet 101/1/1&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 12.7px; line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 12.7px; line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;b style=&quot;font-size: medium;&quot;&gt;Verification Command Comparison&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 12.7px; line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
The following table lists some useful&amp;nbsp;&lt;b&gt;show&lt;/b&gt;&amp;nbsp;commands for verifying the status and troubleshooting an interface.&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 12.7px; line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;325&quot;&gt;&lt;b&gt;Cisco NX-OS Interface&lt;/b&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;325&quot;&gt;&lt;b&gt;Cisco IOS Software Interface&lt;/b&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;500&quot;&gt;&lt;b&gt;Command Description&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface&lt;/td&gt;&lt;td&gt;Displays the status and statistics for all interfaces or a specific interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface ethernet&lt;/b&gt;&amp;nbsp;&lt;i&gt;&lt;x x=&quot;&quot;&gt;&lt;/x&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays the status and statistics for a FEX host interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface ethernet&lt;/b&gt;&amp;nbsp;&lt;i&gt;&lt;x x=&quot;&quot;&gt;&lt;/x&gt;&lt;/i&gt;&amp;nbsp;&lt;b&gt;cable-diagnostics tdr&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show cable-diagnostics tdr interface&amp;nbsp;&lt;i&gt;type &lt;x x=&quot;&quot;&gt;&lt;/x&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Displays TDR test results&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface brief&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays a brief list of the interfaces (type, mode, status, speed, MTU)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface capabilities&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface capabilities&lt;/td&gt;&lt;td&gt;Displays interface capabilities&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface counters&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface counters&lt;/td&gt;&lt;td&gt;Displays interface counters (input/output unicast, multicast &amp;amp; broadcast)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface debounce&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface debounce&lt;/td&gt;&lt;td&gt;Displays the de-bounce status and time in ms for all interfaces&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface description&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface description&lt;/td&gt;&lt;td&gt;Displays all interfaces with configured descriptions&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface ethernet&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface ethernet&lt;/td&gt;&lt;td&gt;Displays status and statistics for a specific interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface fex-fabric&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays FEX fabric interface status&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface flowcontrol&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface flowcontrol&lt;/td&gt;&lt;td&gt;Displays Flow Control (802.1p) status and state for all interfaces&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface loopback&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface loopback&lt;/td&gt;&lt;td&gt;Displays status and statistics for a specific loopback interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface mac-address&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays all interfaces and their associated MAC Addresses&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface mgmt&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays status and statistics for the management interface located on the supervisor&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface port-channel&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface port-channel&lt;/td&gt;&lt;td&gt;Displays status and statistics for a specific port-channel&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface priority-flow-control&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays PFC information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface pruning&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface pruning&lt;/td&gt;&lt;td&gt;Displays trunk interfaces VTP pruning information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface snmp-ifindex&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays SNMP interface index&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface status&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface status&lt;/td&gt;&lt;td&gt;Displays all interfaces and their current status&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface switchport&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface switchport&lt;/td&gt;&lt;td&gt;Displays a list of all interfaces that are configured as switchports&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface transceiver&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface transceiver&lt;/td&gt;&lt;td&gt;Displays a list of all interfaces and optic information (calibrations, details)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface trunk&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface trunk&lt;/td&gt;&lt;td&gt;Displays a list of all interfaces configured as trunks&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface tunnel&lt;/b&gt;&amp;nbsp;&lt;i&gt;&amp;lt;#&amp;gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;show interface tunnel&amp;nbsp;&lt;i&gt;&amp;lt;#&amp;gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Displays status and statistics for a specific tunnel interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface vlan&lt;/b&gt;&amp;nbsp;&lt;i&gt;&amp;lt;#&amp;gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;show interface vlan&amp;nbsp;&lt;i&gt;&amp;lt;#&amp;gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Displays status and statistics for a specific VLAN interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show port-profile&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays all port profile information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show port-profile brief&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays brief port profile information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show port-profile expand-interface&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays active profile configuration applied to an interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show port-profile name&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays specific port profile&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show port-profile sync-status&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays interfaces out of sync with port profiles&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show port-profile usage&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays interfaces inherited to a port profile&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/6391496819465948417/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/6391496819465948417?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/6391496819465948417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/6391496819465948417'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2018/02/cisco-nx-os-cli-part2.html' title='Cisco NX-OS CLI - Part2'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-5937355282548583223</id><published>2018-02-02T16:55:00.001+08:00</published><updated>2018-02-02T16:59:19.553+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cisco"/><title type='text'>Cisco NX-OS CLI - Part1</title><content type='html'>&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;center&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Cisco IOS CLI&lt;/i&gt;&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;center&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;i&gt;Cisco NX-OS CLI&lt;/i&gt;&lt;/span&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Default User Prompt&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;c6500&amp;gt;&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;n7000#&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Entering Configuration Mode&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;c6500# configure terminal&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;n7000# configure terminal&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Saving the Running Config to the Startup Config (nvram)&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;c6500# write memory&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;or&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
c6500# copy running-config startup-config&lt;/div&gt;
&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;n7000# copy running-config startup-config&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Erasing the startup config (nvram)&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;c6500# write erase&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;n7000# write erase&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Installing a License&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Cisco IOS Software does not require a license file installation.&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;n7000# install license bootflash:license_file.lic&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Interface Naming Convention&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;interface Ethernet 1/1&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;interface FastEthernet 1/1&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
interface GigabitEthernet 1/1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
interface TenGigabitEthernet 1/1&lt;/div&gt;
&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;interface Ethernet 1/1&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Default VRF Configuration (management)&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Cisco IOS Software doesn’t enable VRFs by default.&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;vrf context management&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring the Software Image Boot Variables&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;boot system flash sup-bootdisk:s72033-ipservicesk9_wan-mz.122-33.SXH1.bin&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;boot kickstart bootflash:/n7000-s1-kickstart.4.0.4.bin sup-1&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
boot system bootflash:/n7000-s1-dk9.4.0.4.bin sup-1&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
boot kickstart bootflash:/n7000-s1-kickstart.4.0.4.bin sup-2&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
boot system bootflash:/n7000-s1-dk9.4.0.4.bin sup-2&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Enabling Features&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Cisco IOS Software does not have the functionality to enable or disable features.&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;feature ospf&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Enabling TELNET (SSHv2 is recommended)&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;Cisco IOS Software enables TELNET by default.&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;feature telnet&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring the Console Timeout&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;line console 0&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;exec-timeout 15 0&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
login&lt;/div&gt;
&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;line console&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
exec-timeout 15&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Configuring the VTY Timeout and Session Limit&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;6&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(237, 145, 33);&quot; width=&quot;475&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;&lt;b&gt;line vty 0 9&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;color: white;&quot;&gt;session-limit 10&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: white;&quot;&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
exec-timeout 15 0&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
login&lt;/div&gt;
&lt;/span&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;line vty&lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
session-limit 10&lt;/div&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
exec-timeout 15&lt;/div&gt;
&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 12.7px; line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 12.7px; line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Verification Command Comparison&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 12.7px; line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
The following table compares some useful&amp;nbsp;&lt;b&gt;show&lt;/b&gt;&amp;nbsp;commands for verifying the initial system startup and running configuration.&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: sans-serif; font-size: 12.7px; line-height: 1.5em; margin-bottom: 0.5em; margin-top: 0.4em;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;2&quot; style=&quot;background-color: white; color: black; font-family: sans-serif; font-size: 12.7px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;225&quot;&gt;&lt;b&gt;Cisco NX-OS&lt;/b&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;225&quot;&gt;&lt;b&gt;Cisco IOS Software&lt;/b&gt;&lt;/th&gt;&lt;th align=&quot;left&quot; style=&quot;background: rgb(153, 204, 255);&quot; width=&quot;475&quot;&gt;&lt;b&gt;Command Description&lt;/b&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show running-config&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show running-config&lt;/td&gt;&lt;td&gt;Displays the running configuration&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show startup-config&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show startup-config&lt;/td&gt;&lt;td&gt;Displays the startup configuration&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show interface&lt;/td&gt;&lt;td&gt;Displays the status for all of the interfaces&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface ethernet&lt;/b&gt;&amp;nbsp;&lt;i&gt;&lt;x x=&quot;&quot;&gt;&lt;/x&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;show interface &amp;lt;&lt;i&gt;int type&lt;/i&gt;&lt;i&gt;&amp;gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Displays the status for a specific interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show interface mgmt 0&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays the status for the mgmt interface&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show boot&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show boot&lt;/td&gt;&lt;td&gt;Displays the current boot variables&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show clock&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show clock&lt;/td&gt;&lt;td&gt;Displays the system clock and time zone configuration&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show clock detail&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show clock detail&lt;/td&gt;&lt;td&gt;Displays the summer-time configuration&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show environment&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show environment&lt;/td&gt;&lt;td&gt;Displays all environment parameters&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show environment clock&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show environment status clock&lt;/td&gt;&lt;td&gt;Displays clock status for A/B and active clock&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show environment fan&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show environment cooling fan-tray&lt;/td&gt;&lt;td&gt;Displays fan status&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show environment power&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show power&lt;/td&gt;&lt;td&gt;Displays power budget&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show environment temperature&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show environment temperature&lt;/td&gt;&lt;td&gt;Displays environment data&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show feature&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays the features and routing processes enabled&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show log logfile&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show log&lt;/td&gt;&lt;td&gt;Displays the local log&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show log nvram&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays persistent log messages (severity 0-2) stored in NVRAM&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show module&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show module&lt;/td&gt;&lt;td&gt;Displays installed modules and their status&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show module uptime&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays how long each module has be powered up&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show module fabric&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays fabric modules and their current status&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show platform fabric-utilization&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show fabric utilization&lt;/td&gt;&lt;td&gt;Displays the&amp;nbsp;% of fabric utilized per module&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show process cpu&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show process cpu&lt;/td&gt;&lt;td&gt;Displays the processes running on the CPU&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show process cpu history&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show process cpu history&lt;/td&gt;&lt;td&gt;Displays the process history of the CPU in chart form&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show process cpu sorted&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show process cpu sorted&lt;/td&gt;&lt;td&gt;Displays sorted processes running on the CPU&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show system cores&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays the core dump files if present&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show system exception-info&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show exception&lt;/td&gt;&lt;td&gt;Displays last exception log&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show system redundancy status&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show redundancy&lt;/td&gt;&lt;td&gt;Displays the supervisors High Availability status&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show system resources&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show process cpu&lt;/td&gt;&lt;td&gt;Displays CPU and memory usage data&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show system uptime&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays system and kernel start time (Displays active supervisor uptime)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show tech-support&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show tech-support&lt;/td&gt;&lt;td&gt;Displays system technical information for Cisco TAC&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show tech-support&lt;/b&gt;&amp;nbsp;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;show tech-support&amp;nbsp;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Displays feature specific technical information for Cisco TAC&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show version&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show version&lt;/td&gt;&lt;td&gt;Displays running software version, basic hardware, CMP status and system uptime&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show line&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show line&lt;/td&gt;&lt;td&gt;Displays console and auxiliary port information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show line com1&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays auxiliary port information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show line console&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show line console 0&lt;/td&gt;&lt;td&gt;Displays console port information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show line console connected&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;States if the console port is physically connected&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show terminal&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show terminal&lt;/td&gt;&lt;td&gt;Displays terminal settings&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show users&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show users&lt;/td&gt;&lt;td&gt;Displays current virtual terminal settings&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vrf&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show ip vrf&lt;/td&gt;&lt;td&gt;Displays a list of all configured VRFs&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vrf&amp;nbsp;&lt;/b&gt;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;show ip vrf&amp;nbsp;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Displays an specified VRF&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vrf&amp;nbsp;&lt;/b&gt;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&amp;nbsp;&lt;b&gt;detail&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show vrf detail&amp;nbsp;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;Displays details for a specified&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vrf&amp;nbsp;&lt;/b&gt;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&amp;nbsp;&lt;b&gt;interface&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays interface assignment for a specified VRF&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vrf default&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays a summary of the&amp;nbsp;&lt;b&gt;default&amp;nbsp;&lt;/b&gt;VRF&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vrf detail&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show vrf detail&lt;/td&gt;&lt;td&gt;Displays details for all VRF&#39;s&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vrf interface&lt;/b&gt;&lt;/td&gt;&lt;td&gt;show ip vrf interface&lt;/td&gt;&lt;td&gt;Displays VRF interface assignment&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vrf management&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays a summary of the&amp;nbsp;&lt;b&gt;management&lt;/b&gt;&amp;nbsp;VRF&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show license&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays all license file information&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show license brief&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays the license file names installed&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show license file&lt;/b&gt;&amp;nbsp;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays license contents based on a specified name&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show license host-id&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays the chassis Host-ID used for creating a license&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show license usage&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays all licenses used by the system&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show license usage&amp;nbsp;&lt;/b&gt;&lt;i&gt;&lt;license-type&gt;&lt;/license-type&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays all licenses used by the system per type&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show license usage vdc-all&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays all licenses used by the system for all VDCs&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style=&quot;color: white;&quot;&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays a list of the configured VDC&#39;s&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc&amp;nbsp;&lt;/b&gt;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays a summary of the individual VDC&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc&amp;nbsp;&lt;/b&gt;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&amp;nbsp;&lt;b&gt;detail&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays configuration details for a specific VDC&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc&amp;nbsp;&lt;/b&gt;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&amp;nbsp;&lt;b&gt;membership&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays interface membership for a specific VDC&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc&lt;/b&gt;&amp;nbsp;&lt;i&gt;&lt;name&gt;&lt;/name&gt;&lt;/i&gt;&amp;nbsp;&lt;b&gt;resource&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays resource allocation for a specific VDC&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc current-vdc&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays the VDC that the user is currently in&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc detail&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays details information for all VDCs&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc membership&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays interface membership for all VDCs&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;b&gt;show vdc resources&lt;/b&gt;&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;Displays resource allocation for all VDCs&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 12.7px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; line-height: 1.5em; margin: 0.4em 0px 0.5em; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/5937355282548583223/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/5937355282548583223?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/5937355282548583223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/5937355282548583223'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2018/02/cisco-nx-os-cli.html' title='Cisco NX-OS CLI - Part1'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-8978722664507419857</id><published>2018-01-01T23:50:00.000+08:00</published><updated>2018-01-01T23:51:15.317+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Splunk"/><title type='text'>Splunk即時告警失效問題</title><content type='html'>Splunk近期加了不少的即時告警通知的功能，結果在使用上發現會有的部分告警沒辦法正常發送即時通知Email，一開始不以為意，以為是SMTP發信的問題，但後來仔細檢查後，才知道是Splunk為了系統的search效能，所以有做一些預設的限制，而剛好即時告警又是Splunk功能裡很吃效能的一個功能，如果是預設四核心CPU的Splunk主機的話，預設只能同時使用5組的Realtime Alert，這也就是為什麼有時候，有的即時告警正常，有時又異常的原因，要加大可以使用即時告警的數量的話，可修改Splunk安裝目錄下的config檔的參數&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;C:\Program Files\Splunk\etc\system\default\limits.conf&lt;br /&gt;修改後要記得要重新Restart Splunk services&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
預設值如下，可用即時告警計算出來，以4 core CPU的話，是只能使用5組&lt;br /&gt;
############################################################################&lt;br /&gt;
# Concurrency&lt;br /&gt;
############################################################################&lt;br /&gt;
# This section contains settings for search concurrency limits.&lt;br /&gt;
# The total number of concurrent searches is&lt;br /&gt;
# base_max_searches + #cpus*max_searches_per_cpu&lt;br /&gt;
&lt;br /&gt;
# The base number of concurrent searches.&lt;br /&gt;
base_max_searches = 6&lt;br /&gt;
&lt;br /&gt;
# Max real-time searches = max_rt_search_multiplier x max historical searches.&lt;br /&gt;
max_rt_search_multiplier = 1&lt;br /&gt;
&lt;br /&gt;
# The maximum number of concurrent searches per CPU.&lt;br /&gt;
max_searches_per_cpu = 1&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
調整如下後可放大到18組&lt;br /&gt;
############################################################################&lt;br /&gt;
# Concurrency&lt;br /&gt;
############################################################################&lt;br /&gt;
# This section contains settings for search concurrency limits.&lt;br /&gt;
# The total number of concurrent searches is&lt;br /&gt;
# base_max_searches + #cpus*max_searches_per_cpu&lt;br /&gt;
&lt;br /&gt;
# The base number of concurrent searches.&lt;br /&gt;
base_max_searches = 10&lt;br /&gt;
&lt;br /&gt;
# Max real-time searches = max_rt_search_multiplier x max historical searches.&lt;br /&gt;
max_rt_search_multiplier = 2&lt;br /&gt;
&lt;br /&gt;
# The maximum number of concurrent searches per CPU.&lt;br /&gt;
max_searches_per_cpu = 2&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMsPXp33Fdg5dtpSL2O7Yj55SRMN-L0FIF0qUhA0jMJOmsxgXayB2pcsej_yGVbXbnWLTppBGApcYUOB0zNc3Al8708OZkGMNEy1IjdGbitherKkAdbI1OMV0I2X3Vbcei5Vb8VkzINA9h/s1600/SEA.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;572&quot; data-original-width=&quot;1600&quot; height=&quot;141&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMsPXp33Fdg5dtpSL2O7Yj55SRMN-L0FIF0qUhA0jMJOmsxgXayB2pcsej_yGVbXbnWLTppBGApcYUOB0zNc3Al8708OZkGMNEy1IjdGbitherKkAdbI1OMV0I2X3Vbcei5Vb8VkzINA9h/s400/SEA.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/8978722664507419857/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/8978722664507419857?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8978722664507419857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8978722664507419857'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2018/01/splunk.html' title='Splunk即時告警失效問題'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMsPXp33Fdg5dtpSL2O7Yj55SRMN-L0FIF0qUhA0jMJOmsxgXayB2pcsej_yGVbXbnWLTppBGApcYUOB0zNc3Al8708OZkGMNEy1IjdGbitherKkAdbI1OMV0I2X3Vbcei5Vb8VkzINA9h/s72-c/SEA.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-8454912947529370688</id><published>2017-11-19T22:46:00.001+08:00</published><updated>2017-11-19T22:46:28.707+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Juniper"/><title type='text'>Juniper BGP 調整特定國家路由優先權</title><content type='html'>針對國別調整BGP優先權&lt;br /&gt;一、先用&lt;a href=&quot;https://ipinfo.io/countries/cn&quot; target=&quot;_blank&quot;&gt;https://ipinfo.io/countries/cn &lt;/a&gt;找出要調整的國家的全部AS Number，將這些AS Number做利用&lt;a href=&quot;https://www.juniper.net/documentation/en_US/junos/topics/usage-guidelines/policy-configuring-as-path-regular-expressions-to-use-as-routing-policy-match-conditions.html&quot; target=&quot;_blank&quot;&gt;正規化表示法&lt;/a&gt;設定成一組國別清單&lt;br /&gt;
&lt;br /&gt;
set policy-options as-path &lt;span style=&quot;color: red;&quot;&gt;China-AS-Path&lt;/span&gt; &quot;.* 4134 |.* 4538 |.* 4611 |.* 4808 |.* 4809 |.* 4812 |.* 4813 |.* 4815 |.* 4816 |.* 4835 |.* 4837 |.* 4847 |.* 4859 |.* 7497 |.* 7549 |.* 7638 |.* 7640 |.* 7641 |.* 9298 |.* 9306 |.* 9308 |.* 9389 |.* 9391 |.* 9394 |.* 9395 |.* 9401 |.* 9535 |.* 9801 |.* 9802 |.* 9803 |.* 9805 |.* 9807 |.* 9808 |.* 9809 |.* 9810 |.* 9811 |.* 9812 |.* 9814 |.* 9929 |.* 9939 |.* 10206 |.* 10212 |.* 17428 |.* 17429 |.* 17430 |.* 17431 |.* 17490 |.* 17621 |.* 17622 |.* 17623 |.* 17633 |.* 17638 |.* 17739 |.* 17775 |.* 17781 |.* 17785 |.* 17799 |.* 17816 |.* 17883 |.* 17897 |.* 17962 |.* 17964 |.* 17966 |.* 17968 |.* 17969 |.* 18011 |.* 18118 |.* 18239 |.* 18241 |.* 18242 |.* 18243 |.* 18244 |.* 18245 |.* 18257 |.* 18344 |.* 23650 |.* 23724 |.* 23771 |.* 23839 |.* 23840 |.* 23841 |.* 23842 |.* 23844 |.* 23848 |.* 23851 |.* 23853 |.* 23910 |.* 23911 |.* 24059 |.* 24133 |.* 24134 |.* 24137 |.* 24138 |.* 24139 |.* 24141 |.* 24143 |.* 24147 |.* 24151 |.* 24311 |.* 24400 |.* 24404 |.* 24406 |.* 24409 |.* 24413 |.* 24414 |.* 24416 |.* 24420 |.* 24422 |.* 24424 |.* 24427 |.* 24428 |.* 24429 |.* 24430 |.* 24444 |.* 24445 |.* 24489 |.* 24490 |.* 24495 |.* 24547 |.* 24575 |.* 37937 |.* 37940 |.* 37941 |.* 37942 |.* 37943 |.* 37957 |.* 37958 |.* 37963 |.* 37965 |.* 37970 |.* 37981 |.* 38019 |.* 38027 |.* 38057 |.* 38238 |.* 38283 |.* 38339 |.* 38340 |.* 38341 |.* 38342 |.* 38345 |.* 38346 |.* 38353 |.* 38357 |.* 38358 |.* 38363 |.* 38364 |.* 38365 |.* 38366 |.* 38367 |.* 38370 |.* 38372 |.* 38375 |.* 38378 |.* 38379 |.* 38380 |.* 38381 |.* 38792 |.* 45057 |.* 45058 |.* 45061 |.* 45062 |.* 45064 |.* 45069 |.* 45070 |.* 45071 |.* 45075 |.* 45079 |.* 45080 |.* 45083 |.* 45084 |.* 45086 |.* 45087 |.* 45090 |.* 45093 |.* 45095 |.* 45100 |.* 45101 |.* 45102 |.* 45110 |.* 45113 |.* 45587 |.* 45888 |.* 55439 |.* 55461 |.* 55468 |.* 55515 |.* 55786 |.* 55956 |.* 55958 |.* 55960 |.* 55963 |.* 55966 |.* 55967 |.* 55971 |.* 55973 |.* 55982 |.* 55986 |.* 55988 |.* 55990 |.* 55992 |.* 55994 |.* 55996 |.* 55998 |.* 56000 |.* 56001 |.* 56002 |.* 56003 |.* 56005 |.* 56006 |.* 56008 |.* 56012 |.* 56013 |.* 56015 |.* 56019 |.* 56040 |.* 56041 |.* 56042 |.* 56044 |.* 56046 |.* 56047 |.* 56048 |.* 56282 |.* 56292 |.* 58416 |.* 58448 |.* 58461 |.* 58466 |.* 58517 |.* 58518 |.* 58519 |.* 58520 |.* 58536 |.* 58539 |.* 58540 |.* 58541 |.* 58542 |.* 58543 |.* 58563 |.* 58571 |.* 58593 |.* 58741 |.* 58811 |.* 58844 |.* 58845 |.* 58850 |.* 58852 |.* 58854 |.* 58864 |.* 58866 |.* 58879 |.* 58962 |.* 58997 |.* 58998 |.* 59008 |.* 59009 |.* 59010 |.* 59011 |.* 59015 |.* 59019 |.* 59023 |.* 59025 |.* 59028 |.* 59029 |.* 59034 |.* 59037 |.* 59045 |.* 59049 |.* 59050 |.* 59063 |.* 59065 |.* 59067 |.* 59072 |.* 59073 |.* 59074 |.* 59077 |.* 59078 |.* 59083 |.* 59089 |.* 63530 |.* 63531 |.* 63534 |.* 63535 |.* 63540 |.* 63541 |.* 63545 |.* 63548 |.* 63549 |.* 63554 |.* 63555 |.* 63558 |.* 63561 |.* 63570 |.* 63571 |.* 63580 |.* 63582 |.* 63583 |.* 63616 |.* 63617 |.* 63620 |.* 63621 |.* 63631 |.* 63634 |.* 63646 |.* 63655 |.* 63659 |.* 63677 |.* 63678 |.* 63679 |.* 63680 |.* 63689 |.* 63690 |.* 63691 |.* 63696 |.* 63697 |.* 63707 |.* 63711 |.* 63725 |.* 63835 |.* 63838 |.* 131325 |.* 131450 |.* 131477 |.* 131486 |.* 131503 |.* 131519 |.* 131524 |.* 131535 |.* 132058 |.* 132203 |.* 132510 |.* 132525 |.* 132719 |.* 133111 |.* 133118 |.* 133119 |.* 133151 |.* 133194 |.* 133219 |.* 133465 |.* 133475 |.* 133478 |.* 133513 |.* 133514 |.* 133626 |.* 133774 |.* 133775 |.* 133776 |.* 133865 |.* 133952 |.* 134103 |.* 134238 |.* 134417 |.* 134418 |.* 134419 |.* 134420 |.* 134542 |.* 134543 |.* 134755 |.* 134756 |.* 134761 |.* 134762 |.* 134763 |.* 134764 |.* 134765 |.* 134766 |.* 134768 |.* 134769 |.* 134771 |.* 134772 |.* 134810 |.* 135006 |.* 135061 |.* 135357 |.* 135363 |.* 135365 |.* 135577 |.* 135629 |.* 136011 |.* 136180 |.* 136189 |.* 136190 |.* 136390 |.* 136421 |.* 136559 |.* 136758&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
二、調整BGP的Inbound的Filter設定，將從上游收到的結尾為特定國別的AS Path的Local Preference權值加大為150，高於預設的100，便可以讓內部的機器，在出去的Outbound方向是走特定的Transit Peer 出去&lt;br /&gt;
&lt;br /&gt;set policy-options policy-statement Upstream-BGP-IN term 50 from as-path &lt;span style=&quot;color: red;&quot;&gt;China-AS-Path&lt;/span&gt;&lt;br /&gt;
set policy-options policy-statement Upstream-BGP-IN term 50 then local-preference 150&lt;br /&gt;
set policy-options policy-statement Upstream-BGP-IN term 50 then accept&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtExzmmFpGw3UQ6qM5MQPhSebVV0ICP_K49tTHajDPfsocdMcQ_awCa9mReLszA_CkLr9BZRZSN7XfKyR32IUKIG7bY2TRGrgowEa9547DDC_CetKKL8C5E_Di74pabGMaPLzUxFWKci1W/s1600/BBBB.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;241&quot; data-original-width=&quot;920&quot; height=&quot;164&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtExzmmFpGw3UQ6qM5MQPhSebVV0ICP_K49tTHajDPfsocdMcQ_awCa9mReLszA_CkLr9BZRZSN7XfKyR32IUKIG7bY2TRGrgowEa9547DDC_CetKKL8C5E_Di74pabGMaPLzUxFWKci1W/s640/BBBB.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/8454912947529370688/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/8454912947529370688?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8454912947529370688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8454912947529370688'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2017/11/juniper-bgp.html' title='Juniper BGP 調整特定國家路由優先權'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtExzmmFpGw3UQ6qM5MQPhSebVV0ICP_K49tTHajDPfsocdMcQ_awCa9mReLszA_CkLr9BZRZSN7XfKyR32IUKIG7bY2TRGrgowEa9547DDC_CetKKL8C5E_Di74pabGMaPLzUxFWKci1W/s72-c/BBBB.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-9094094899288117210</id><published>2017-11-02T22:27:00.000+08:00</published><updated>2017-11-02T22:27:19.975+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cisco"/><title type='text'>Enable SSHv2 on Cisco Router &amp; Switch</title><content type='html'>Steps to enable SSHv2 on Cisco Router &amp;amp; Switch&lt;br /&gt;
&lt;br /&gt;
1. Define the hostname&lt;br /&gt;
&lt;br /&gt;
2. configure the domain name&lt;br /&gt;
&lt;br /&gt;
3. Specifies the RSA key pair to use for using SSH.&lt;br /&gt;
R2(config)#ip ssh rsa key-pair name {key-pair name}&lt;br /&gt;
By doing so SSH version 1.5 is deactivated&lt;br /&gt;
&lt;br /&gt;
4. For SSH Version 2, the modulus size must be at least 768 bits.&lt;br /&gt;
R2(config)# crypto key generate rsa usage-keys label {keypair-name} modulus 768&lt;br /&gt;
&lt;br /&gt;
4. Enable SSH version 2&lt;br /&gt;
&lt;br /&gt;
5. Check the version with &quot;show ip ssh&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGQkaGrmpF6po9DwlXstioiMelxh6veYVoikXTfUQjiLLmKJeSjSwDOu_ZhyphenhyphenBehHDRYXgJkAwAzp0f1xIx1Qqg9q6A_WCu5tK8VAKBBjW-j3wHdTXCkwsY2tvlI45md2AwESPRax47wfNq/s1600/SSh2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;482&quot; data-original-width=&quot;661&quot; height=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGQkaGrmpF6po9DwlXstioiMelxh6veYVoikXTfUQjiLLmKJeSjSwDOu_ZhyphenhyphenBehHDRYXgJkAwAzp0f1xIx1Qqg9q6A_WCu5tK8VAKBBjW-j3wHdTXCkwsY2tvlI45md2AwESPRax47wfNq/s400/SSh2.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/9094094899288117210/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/9094094899288117210?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/9094094899288117210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/9094094899288117210'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2017/11/enable-sshv2-on-cisco-router-switch.html' title='Enable SSHv2 on Cisco Router &amp; Switch'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGQkaGrmpF6po9DwlXstioiMelxh6veYVoikXTfUQjiLLmKJeSjSwDOu_ZhyphenhyphenBehHDRYXgJkAwAzp0f1xIx1Qqg9q6A_WCu5tK8VAKBBjW-j3wHdTXCkwsY2tvlI45md2AwESPRax47wfNq/s72-c/SSh2.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-2254385720781329390</id><published>2017-09-16T21:57:00.000+08:00</published><updated>2017-09-16T21:57:17.484+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Juniper"/><title type='text'>Juniper SRX QoS 設定 ( Class of Service)</title><content type='html'>&lt;b&gt;Key Components&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Interface Egress Queues&lt;/span&gt; – When a physical interface tries to send more traffic than its bandwidth permits, packets are queued in one of a few different numbered queues&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Interface Bandwidth Definition&lt;/span&gt; – You should manually define the bandwidth of an interface if it is lower than the line speed. For example, a 1gbit interface connected to a 200mbit fibre ethernet line needs to be defined as being 200mbit else it will assume 1gbit and QoS will not work&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Forwarding Classes&lt;/span&gt; – These effectively assign a name to a numbered queue, for example assured-forwarding&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Assignment of traffic to a forwarding class&lt;/span&gt; – This can be done in a number of ways:&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Classifiers&lt;/span&gt; – These observe DSCP, Inet Precedence or other marker types to assign ingress traffic to forwarding classes&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Firewall Rules &lt;/span&gt;– Ingress traffic can be matched with firewall rules and assigned to forwarding classes&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Drop Profiles&lt;/span&gt; – A drop profile defines the probability of packets being dropped when a queue reaches a certain size&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Schedulers&lt;/span&gt; – These define how differently queued egress traffic is prioritized&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Scheduler Maps&lt;/span&gt; – These link forwarding classes to schedulers&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div&gt;
&lt;b&gt;設定規劃目標如下&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;一、DB封包的服務保證擁有15%專線總頻寬&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;二、DB封包的服務在專線總頻寬滿載時，會優先傳送&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;三、BFD封包的Hello Packet偵測封包保證擁有5%專線總頻寬&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;四、BFD&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;封包&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;的Hello Packet偵測封包在專線總頻寬滿載時，會優先傳送&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;五、專線總頻寬滿載時， BFD的封包優先級會比DB封包來的高&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;六、DB與BFD的實際使用流量，若未使用達到保證頻寬時，剩下來的流量可分配給其它一般流量做使用(Best-effort)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
set interfaces ge-0/0/8 per-unit-scheduler&lt;/div&gt;
&lt;div&gt;
set interfaces ge-0/0/8 unit 190 bandwidth 40m&lt;/div&gt;
&lt;div&gt;
set interfaces ge-0/0/8 unit 190 vlan-id 190&lt;/div&gt;
&lt;div&gt;
set interfaces ge-0/0/8 unit 190 family inet filter output Traffic-To-Qos&lt;/div&gt;
&lt;div&gt;
set interfaces ge-0/0/8 unit 190 family inet address 172.16.0.1/30&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term DB-Packet from protocol tcp&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term DB-Packet from port 3260&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term DB-Packet from port 6379&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term DB-Packet from port 26379-26480&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term DB-Packet from port 27017-27019&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term DB-Packet from port 28000-28100&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term DB-Packet then forwarding-class expedited-forwarding&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term BFD-Packet from protocol udp&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term BFD-Packet from port 3784-3785&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term BFD-Packet from port 4784-4785&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term BFD-Packet then forwarding-class network-control&lt;/div&gt;
&lt;div&gt;
set firewall filter Traffic-To-Qos term Other-Packet then accept&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
set class-of-service drop-profiles low_drop fill-level 95 drop-probability 0&lt;/div&gt;
&lt;div&gt;
set class-of-service drop-profiles low_drop fill-level 100 drop-probability 100&lt;/div&gt;
&lt;div&gt;
set class-of-service drop-profiles med_drop fill-level 75 drop-probability 0&lt;/div&gt;
&lt;div&gt;
set class-of-service drop-profiles med_drop fill-level 95 drop-probability 30&lt;/div&gt;
&lt;div&gt;
set class-of-service drop-profiles high_drop fill-level 50 drop-probability 0&lt;/div&gt;
&lt;div&gt;
set class-of-service drop-profiles high_drop fill-level 95 drop-probability 50&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
set class-of-service interfaces ge-0/0/8 unit 190 scheduler-map Test-Map-Qos&lt;/div&gt;
&lt;div&gt;
set class-of-service interfaces ge-0/0/8 unit 190 shaping-rate 40m&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
set class-of-service scheduler-maps Test-Map-Qos forwarding-class expedited-forwarding scheduler ef&lt;/div&gt;
&lt;div&gt;
set class-of-service scheduler-maps Test-Map-Qos forwarding-class assured-forwarding scheduler af&lt;/div&gt;
&lt;div&gt;
set class-of-service scheduler-maps Test-Map-Qos forwarding-class best-effort scheduler be&lt;/div&gt;
&lt;div&gt;
set class-of-service scheduler-maps Test-Map-Qos forwarding-class network-control scheduler nc&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers ef transmit-rate percent 15&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers ef buffer-size percent 15&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers ef priority medium-high&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers ef drop-profile-map loss-priority high protocol any drop-profile high_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers ef drop-profile-map loss-priority medium-high protocol any drop-profile med_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers ef drop-profile-map loss-priority medium-low protocol any drop-profile med_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers ef drop-profile-map loss-priority low protocol any drop-profile low_drop&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers nc transmit-rate percent 5&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers nc buffer-size percent 5&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers nc priority high&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers nc drop-profile-map loss-priority high protocol any drop-profile high_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers nc drop-profile-map loss-priority medium-high protocol any drop-profile med_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers nc drop-profile-map loss-priority medium-low protocol any drop-profile med_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers nc drop-profile-map loss-priority low protocol any drop-profile low_drop&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers be transmit-rate remainder&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers be buffer-size remainder&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers be priority low&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers be drop-profile-map loss-priority high protocol any drop-profile high_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers be drop-profile-map loss-priority medium-high protocol any drop-profile med_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers be drop-profile-map loss-priority medium-low protocol any drop-profile med_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers be drop-profile-map loss-priority low protocol any drop-profile low_drop&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers af transmit-rate percent 50&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers af buffer-size percent 50&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers af priority medium-low&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers af drop-profile-map loss-priority high protocol any drop-profile high_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers af drop-profile-map loss-priority medium-high protocol any drop-profile med_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers af drop-profile-map loss-priority medium-low protocol any drop-profile med_drop&lt;/div&gt;
&lt;div&gt;
set class-of-service schedulers af drop-profile-map loss-priority low protocol any drop-profile low_drop&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/2254385720781329390/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/2254385720781329390?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/2254385720781329390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/2254385720781329390'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2017/09/juniper-srx-qos-class-of-service.html' title='Juniper SRX QoS 設定 ( Class of Service)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3296003435031025495.post-8536078575588903676</id><published>2017-08-27T11:48:00.000+08:00</published><updated>2017-08-27T11:48:39.919+08:00</updated><title type='text'>DARTSLIVE-200S 藍芽飛鏢靶開箱</title><content type='html'>最近從日本帶回來的新玩具：DARTSLIVE-200S 藍芽飛鏢靶&lt;br /&gt;
下班回到家玩一下，還挺舒壓的~~&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOK3_1o0ISaw0VdSxzLHgOFwWc41AG1ENyjLH1mOZAAfuS4TpfmDv694xJ77IYB5BjaaLlKPe-bRxu9pMr1Av2lEfvAa2uHbK8x_nDqf37-7jFAhwGi8uIDIxikSxGipRTujm3_y1kUZIJ/s1600/20369902_1622133504464414_608191868067708344_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOK3_1o0ISaw0VdSxzLHgOFwWc41AG1ENyjLH1mOZAAfuS4TpfmDv694xJ77IYB5BjaaLlKPe-bRxu9pMr1Av2lEfvAa2uHbK8x_nDqf37-7jFAhwGi8uIDIxikSxGipRTujm3_y1kUZIJ/s400/20369902_1622133504464414_608191868067708344_o.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs1LMpQilo7CtHFaARZrrmhbHuKBpm0bVBQuadbaOTCs6Nha6BJJBFnhlDKnkCVQy2kSG3YxiqWIarLTZHd3cQXs2H9pmXb1pen-dE0JPD2-_Xw8tF9ljb6yzTgz1wafiqMd8gtH5bWPPy/s1600/20369912_1622133511131080_2507018136808874291_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs1LMpQilo7CtHFaARZrrmhbHuKBpm0bVBQuadbaOTCs6Nha6BJJBFnhlDKnkCVQy2kSG3YxiqWIarLTZHd3cQXs2H9pmXb1pen-dE0JPD2-_Xw8tF9ljb6yzTgz1wafiqMd8gtH5bWPPy/s400/20369912_1622133511131080_2507018136808874291_o.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1ojfU7r4IP-NGvrZt-DSk4rZfsf01ChOGesqfgu-0-ZpzeFvKRz9uD-4GXCb7tFfUZypCwsoiECT5SoXVLRB4dxWCo6RA8ryB_Uhfr0WS7bMT8OHlcJ2bamRCYBA4X1jaMIn6AWRvQsjK/s1600/20543563_1622133507797747_4837975211436799224_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1600&quot; data-original-width=&quot;1200&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1ojfU7r4IP-NGvrZt-DSk4rZfsf01ChOGesqfgu-0-ZpzeFvKRz9uD-4GXCb7tFfUZypCwsoiECT5SoXVLRB4dxWCo6RA8ryB_Uhfr0WS7bMT8OHlcJ2bamRCYBA4X1jaMIn6AWRvQsjK/s400/20543563_1622133507797747_4837975211436799224_o.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://tanzih.blogspot.com/feeds/8536078575588903676/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3296003435031025495/8536078575588903676?isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8536078575588903676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3296003435031025495/posts/default/8536078575588903676'/><link rel='alternate' type='text/html' href='http://tanzih.blogspot.com/2017/08/dartslive-200s.html' title='DARTSLIVE-200S 藍芽飛鏢靶開箱'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOK3_1o0ISaw0VdSxzLHgOFwWc41AG1ENyjLH1mOZAAfuS4TpfmDv694xJ77IYB5BjaaLlKPe-bRxu9pMr1Av2lEfvAa2uHbK8x_nDqf37-7jFAhwGi8uIDIxikSxGipRTujm3_y1kUZIJ/s72-c/20369902_1622133504464414_608191868067708344_o.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>