Smokeping 監控部署及配置

来源:http://www.cnblogs.com/Ctry/archive/2016/01/05/5103082.html
-Advertisement-
Play Games

安裝參見: https://github.com/oetiker/SmokePing/blob/master/doc/smokeping_install.pod 1 Smokeping 2 3 *** General *** 4 5 owner = Ctry 6 contact...


安裝參見:
 https://github.com/oetiker/SmokePing/blob/master/doc/smokeping_install.pod

1
Smokeping 2 3 *** General *** 4 5 owner = Ctry 6 contact = [email protected] 7 mailhost = 127.0.0.1 8 sendmail = /sbin/sendmail 9 # NOTE: do not put the Image Cache below cgi-bin 10 # since all files under cgi-bin will be executed ... this is not 11 # good for images. 12 imgcache = /usr/local/smokeping/cache 13 imgurl = cache 14 datadir = /usr/local/smokeping/data 15 piddir = /usr/local/smokeping/var 16 cgiurl = http://1.1.1.1/smokeping/smokeping.cgi 17 smokemail = /usr/local/smokeping/etc/smokemail.dist 18 tmail = /usr/local/smokeping/etc/tmail.dist 19 # specify this to get syslog logging 20 syslogfacility = local0 21 # each probe is now run in its own process 22 # disable this to revert to the old behaviour 23 # concurrentprobes = no 24 25 *** Alerts *** 26 to = [email protected] 27 from = [email protected] 28 29 +someloss 30 type = loss 31 # in percent 32 pattern = >0%,*12*,>0%,*12*,>0% 33 comment = loss 3 times in a row 34 35 *** Database *** 36 37 step = 60 38 pings = 20 39 40 # consfn mrhb steps total 41 42 AVERAGE 0.5 1 1008 43 AVERAGE 0.5 12 4320 44 MIN 0.5 12 4320 45 MAX 0.5 12 4320 46 AVERAGE 0.5 144 720 47 MAX 0.5 144 720 48 MIN 0.5 144 720 49 50 *** Presentation *** 51 charset = utf-8 # 支持顯示中文的樹狀圖以及rrdtool畫出的圖顯示中文 52 53 template = /usr/local/smokeping/etc/basepage.html.dist 54 55 + charts 56 57 menu = Charts 58 title = The most interesting destinations 59 60 ++ stddev 61 sorter = StdDev(entries=>4) 62 title = Top Standard Deviation 63 menu = Std Deviation 64 format = Standard Deviation %f 65 66 ++ max 67 sorter = Max(entries=>5) 68 title = Top Max Roundtrip Time 69 menu = by Max 70 format = Max Roundtrip Time %f seconds 71 72 ++ loss 73 sorter = Loss(entries=>5) 74 title = Top Packet Loss 75 menu = Loss 76 format = Packets Lost %f 77 78 ++ median 79 sorter = Median(entries=>5) 80 title = Top Median Roundtrip Time 81 menu = by Median 82 format = Median RTT %f seconds 83 84 + overview 85 86 width = 1000 87 height = 200 88 range = 10h 89 90 + detail 91 92 width = 1000 93 height = 200 94 unison_tolerance = 2 95 96 "Last 2 Hours" 2h 97 "Last 24 Hours" 24h 98 "Last 7 Days" 7d 99 "Last 30 Days" 30d 100 "Last 365 Days" 365d 101 "Last 4 Years" 4y 102 103 #+ hierarchies 104 #++ owner 105 #title = Host Owner 106 #++ location 107 #title = Location 108 109 *** Probes *** 110 111 + FPing 112 113 binary = /usr/sbin/fping 114 115 *** Slaves *** 116 secrets=/usr/local/smokeping/etc/smokeping_secrets.dist 117 +boomer 118 display_name=boomer 119 color=0000ff 120 121 +slave2 122 display_name=another 123 color=00ff00 124 125 *** Targets *** 126 127 probe = FPing 128 129 menu = Top 130 title = Network Latency Grapher 131 remark = Welcome to the SmokePing website of HaiZhi Company. \ 132 Here you will learn all about the latency of our network. 133 134 + Unicom 135 136 menu = 各地網路連通性監控 137 title = 監控統計 138 139 ++ Telecom 140 menu = 電信網路監控 141 title = 電信網路監控列表 142 host = /Unicom/Telecom/telecom-xian /Unicom/Telecom/telecom-shanghai /Unicom/Telecom/telecom-sichuan /Unicom/Telecom/telecom-shenzhen /Unicom/Telecom/telecom-zhejiang /Unicom/Telecom/telecom-changsha /Unicom/Telecom/telecom-wuhan /Unicom/Telecom/telecom-jiangsu /Unicom/Telecom/telecom-chongqing /Unicom/Telecom/telecom-fujian /Unicom/Telecom/telecom-neimeng /Unicom/Telecom/telecom-xinjiang /Unicom/Telecom/telecom-guizhou /Unicom/Telecom/telecom-tianjin /Unicom/Telecom/telecom-hubei /Unicom/Telecom/telecom-beijing 143 144 +++ telecom-xian 145 menu = 西安電信 146 title = 西安電信 147 alerts = someloss 148 host = 61.150.91.55 149 150 +++ telecom-shanghai 151 menu = 上海電信 152 title = 上海電信 153 alerts = someloss 154 host = 180.169.22.226 155 156 +++ telecom-sichuan 157 menu = 四川電信 158 title = 四川電信 159 alerts = someloss 160 host = 211.149.224.160 161 162 +++ telecom-shenzhen 163 menu = 深圳電信 164 title = 深圳電信 165 alerts = someloss 166 host = 183.63.53.120 167 168 +++ telecom-zhejiang 169 menu = 浙江電信 170 title = 浙江電信 171 alerts = someloss 172 host = 122.226.223.82 173 174 +++ telecom-changsha 175 menu = 長沙電信 176 title = 長沙電信 177 alerts = someloss 178 host = 124.232.150.171 179 180 +++ telecom-wuhan 181 menu = 武漢電信 182 title = 武漢電信 183 alerts = someloss 184 host = 59.173.18.243 185 186 +++ telecom-jiangsu 187 menu = 江蘇電信 188 title = 江蘇電信 189 alerts = someloss 190 host = 58.215.186.208 191 192 +++ telecom-chongqing 193 menu = 重慶電信 194 title = 重慶電信 195 alerts = someloss 196 host = 219.153.71.238 197 198 +++ telecom-fujian 199 menu = 福建電信 200 title = 福建電信 201 alerts = someloss 202 host = 218.6.9.4 203 204 +++ telecom-neimeng 205 menu = 內蒙電信 206 title = 內蒙電信 207 alerts = someloss 208 host = 101.53.100.113 209 210 +++ telecom-xinjiang 211 menu = 烏魯木齊電信 212 title = 烏魯木齊電信 213 alerts = someloss 214 host = 124.119.87.204 215 216 +++ telecom-guizhou 217 menu = 貴州電信 218 title = 貴州電信 219 alerts = someloss 220 host = 222.87.128.7 221 222 +++ telecom-tianjin 223 menu = 天津電信 224 title = 天津電信 225 alerts = someloss 226 host = 221.238.254.118 227 228 +++ telecom-hubei 229 menu = 十堰電信 230 title = 十堰電信 231 alerts = someloss 232 host = 61.183.41.197 233 234 +++ telecom-beijing 235 menu = 北京電信 236 title = 北京電信 237 alerts = someloss 238 host = 119.90.3.2 239 240 ++ Mobile 241 menu = 移動網路監控 242 title = 移動網路監控列表 243 host = /Unicom/Mobile/mobile-zhejiang /Unicom/Mobile/mobile-shanghai /Unicom/Mobile/mobile-tianjin /Unicom/Mobile/mobile-jinan /Unicom/Mobile/mobile-beijing /Unicom/Mobile/mobile-suzhou /Unicom/Mobile/mobile-wuhan /Unicom/Mobile/mobile-shenyang /Unicom/Mobile/mobile-quanzhou /Unicom/Mobile/mobile-xiamen 244 245 +++ mobile-zhejiang 246 menu = 浙江移動 247 title = 浙江移動 248 alerts = someloss 249 host = 211.140.143.3 250 251 +++ mobile-shanghai 252 menu = 上海移動 253 title = 上海移動 254 alerts = someloss 255 host = 117.135.137.82 256 257 +++ mobile-tianjin 258 menu = 天津移動 259 title = 天津移動 260 alerts = someloss 261 host = 117.131.207.163 262 263 +++ mobile-jinan 264 menu = 濟南移動 265 title = 濟南移動 266 alerts = someloss 267 host = 223.99.238.104 268 269 +++ mobile-beijing 270 menu = 北京移動 271 title = 北京移動 272 alerts = someloss 273 host = 111.13.56.26 274 275 +++ mobile-suzhou 276 menu = 蘇州移動 277 title = 蘇州移動 278 alerts = someloss 279 host = 112.25.230.238 280 281 +++ mobile-wuhan 282 menu = 武漢移動 283 title = 武漢移動 284 alerts = someloss 285 host = 111.47.111.229 286 287 +++ mobile-shenyang 288 menu = 沈陽移動 289 title = 沈陽移動 290 alerts = someloss 291 host = 223.100.7.69 292 293 +++ mobile-quanzhou 294 menu = 泉州移動 295 title = 泉州移動 296 alerts = someloss 297 host = 112.5.16.13 298 299 +++ mobile-xiamen 300 menu = 廈門移動 301 title = 廈門移動 302 alerts = someloss 303 host = 218.207.194.109 304 305 ++ Unicom 306 menu = 聯通網路監控 307 title = 聯通網路監控列表 308 host = /Unicom/Unicom/unicom-dalian /Unicom/Unicom/unicom-beijing /Unicom/Unicom/unicom-jinan /Unicom/Unicom/unicom-shanghai /Unicom/Unicom/unicom-henan /Unicom/Unicom/unicom-heilongjiang /Unicom/Unicom/unicom-tianjin /Unicom/Unicom/unicom-shijiazhuang /Unicom/Unicom/unicom-taiyuan 309 310 +++ unicom-dalian 311 menu = 大連聯通 312 title = 大連聯通 313 alerts = someloss 314 host = 218.61.8.10 315 316 +++ unicom-beijing 317 menu = 北京聯通 318 title = 北京聯通 319 alerts = someloss 320 host = 118.186.222.66 321 322 +++ unicom-jinan 323 menu = 濟南聯通 324 title = 濟南聯通 325 alerts = someloss 326 host = 124.133.28.7 327 328 +++ unicom-shanghai 329 menu = 上海聯通 330 title = 上海聯通 331 alerts = someloss 332 host = 58.246.45.89 333 334 +++ unicom-henan 335 menu = 河南聯通 336 title = 河南聯通 337 alerts = someloss 338 host = 125.46.54.236 339 340 +++ unicom-heilongjiang 341 menu = 黑龍江聯通 342 title = 黑龍江聯通 343 alerts = someloss 344 host = 125.211.202.138 345 346 +++ unicom-tianjin 347 menu = 天津聯通 348 title = 天津聯通 349 alerts = someloss 350 host = 60.28.24.236 351 352 +++ unicom-shijiazhuang 353 menu = 石家莊聯通 354 title = 石家莊聯通 355 alerts = someloss 356 host = 110.249.209.130 357 358 +++ unicom-taiyuan 359 menu = 太原聯通 360 title = 太原聯通 361 alerts = someloss 362 host = 221.204.238.54

效果展示:

常見問題:

File '/usr/local/smokeping/etc/smokeping_secrets.dist' is world-readable

查看smokeping_secrets.dist文件屬性是否為400,如不是請按照如下修改:
註意etc/smokeping_secrets.dist文件屬性必須400
chmod 400 smokeping_secrets.dist
service smokeping restart

中文設置:

yum -y install wqy-zenhei-fonts.noarch

/usr/local/smokeping/lib/Smokeping/Graphs.pm
if ($mode =~ /[anc]/){
        my $val = 0;
        for my $host (@hosts){
            my ($graphret,$xs,$ys) = RRDs::graph
            ("dummy",
            '--start', $tasks[0][1],
            '--end', $tasks[0][2],
            '--font TITLE:20:"WenQuanYi Zen Hei Mono"',
            "DEF:maxping=$cfg->{General}{datadir}${host}.rrd:median:AVERAGE",
            'PRINT:maxping:MAX:%le' );
            my $ERROR = RRDs::error();
            return "<div>RRDtool did not understand your input: $ERROR.</div>" if $ERROR;
            $val = $graphret->[0] if $val < $graphret->[0];
        }

Can't locate Sys/Syslog.pm in @INC (@INC contains: /usr/local/smokeping/thirdparty/lib/perl5/x86_64-linux-thread-multi /usr/local/smokeping/thirdparty/lib/perl5 ../lib /usr/local/smokeping/thirdparty/lib/perl5//x86_64-linux-thread-multi /usr/local/smokeping/thirdparty/lib/perl5/ /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ../lib/smokeping.pm line 16. BEGIN failed--compilation aborted at ../lib/Smo...

yum -y install perl-Sys-Syslog

 


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 最近對UWP開發比較感興趣,大概瞭解之後覺得有必要回顧一下xaml相關內容。。於是抽時間把以前學WPF的相關材料搜羅了一下順便和新的xaml特性做了一個小總結。。希望能堅持寫下去吧。。O(∩_∩)O~ 個人覺得還是從比較零散的xaml佈局開始寫比較合適,這部分直接決定了應用程式的實用性,尤其是在出....
  • 繼上次的前臺內容今天我們來講一講後臺的一些事兒吧!後臺呢主要是對前臺的歌手、歌曲信息及圖片、歌曲路徑的一些~嗯~算是配置吧! 還是先看效果圖 後臺效果圖 登錄界面 主界面 添加歌手 該窗體填寫歌手信息並選擇圖片後會將歌手的信息保存在資料庫並且將選中的圖片複製到資料庫中存放歌手圖像的制定路徑中! 查詢...
  • FrameSet框架集
  • 之前我在一篇blog中寫過如何使用多語言工具包,見http://www.cnblogs.com/yanxiaodi/p/3800767.html在WinEcos社區也發佈過一篇詳細的文章介紹多語言工具包的使用,但因社區改版那篇文章已經找不到了。當時寫的時候還沒有出Win10的SDK,都是基於UAP框...
  • 當HttpContext對象創建之後,HttpRuntime將隨後創建一個用於處理請求的對象,這個對象的類型為HttpApplication. 在ASP.NET內部,HttpRuntime管理一個定義在System.Web命名空間下的HttpApplicationFactory類的實例...
  • 在mac上截屏的幾種方式
  • 1、圖像的延遲一幀的問題,主要原因如代碼中所說,只有隊列多餘兩幀的時候才會出隊一幀。該問題對於連續的圖像幀基本無影響,只是對於非連續的情況下,進來的第一幀會延後,先出來的是上一次圖像序列中最後一幀。而當次圖像序列的最後一幀將會被刷到隊列中。 如果將其中的2改寫為1,則會出現圖像上下分層現象,上層是....
  • - check-rpaths的問題 今天在編譯varnish的時候,遇到幾個問題,其中一個就是出現如下錯誤:...+ /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot************************************....
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...