ネットワーク監視 · 1 min read · Oct 15, 2025
Smokepingを使用したネットワーク遅延の監視 (Debian Etch) - ページ 2
3.2 高度な例
これまで、サーバーに対してpingを送信していましたが、他のテストも行えると良いでしょう(例:DNSサーバーがドメインを解決する速度を測定する、またはHTTP遅延を測定する)。そのため、再度 /etc/smokeping/config を開き、 Probes セクションを修正します。
vi /etc/smokeping/config| [...] * Probes * + FPing binary = /usr/bin/fping + DNS binary = /usr/bin/dig lookup = domain-to-lookup.com pings = 5 step = 180 + Curl # probe-specific variables binary = /usr/bin/curl step = 60 # a default for this target-specific variable urlformat = http://%host%/ [...] |
ご覧の通り、DNSのテストを追加しました(lookup行には、名前サーバー(Smokepingでまだ設定する必要があります)が解決するドメイン/ホスト名を含める必要があります)およびHTTP / FTP(Curlを使用)。
次に、/etc/smokeping/config の最後に、監視したい名前サーバー / HTTPサーバー / FTPサーバーを追加できます(テストを有効/無効にするには、コメントを外したり、コメントアウトしたりします):
vi /etc/smokeping/config| [...] + services menu = サービス遅延 title = サービス遅延 (DNS, HTTP) ++ DNS probe = DNS menu = DNS遅延 title = DNS遅延 +++ dns1 host = ns1.example.com +++ dns2 host = ns2.example.com ++ HTTP probe = Curl menu = HTTP遅延 title = HTTP遅延 +++ server1 menu = server1 title = server1のHTTP遅延 host = server1.example.com +++ server2 menu = server2 title = server2のHTTP遅延 host = server2.example.com #+++ server3 #menu = server3 #title = server3のHTTP遅延 (ポート8080!) #host = server3.example #urlformat = http://%host%:8080/ #++ FTP #probe = Curl #menu = FTP遅延 #title = FTP遅延 #urlformat = ftp://%host%/ #+++ server1 #menu = server1 #title = server1のFTP遅延 host = server1.example.com #+++ server2 #menu = server2 #title = server2のFTP遅延 host = server2.example.com |
ご覧の通り、私たちは、 Probes セクションで設定したDNSプローブを使用して、名前サーバー ns1.example.com と ns2.example.com を監視しています。また、Curlプローブを使用して server1.example.com と server2.example.com のHTTP遅延を測定しています。希望があれば、Curlプローブを使用してFTP遅延を測定することもできますが、FTPセクションのために新しいurlformatを指定することを確認してください(デフォルトのurlformat = http://%host%/ は、 Probes セクションで設定されています; FTPの場合は urlformat = ftp://%host%/ であるべきです)。
変更後にSmokepingを再起動します:
/etc/init.d/smokeping restart数分後、SmokepingのWebインターフェース ( http://www.example.com/cgi-bin/smokeping.cgi ) に新しいテストのデータが表示されるはずです:




Smokepingの設定やさらなる設定例については、こちらをお読みください: http://oss.oetiker.ch/smokeping/doc/smokeping_examples.en.html
4 デバッグ
Smokepingが期待通りに動作していないと思われる場合は、デバッグモードでSmokepingを実行して問題を見つけることができます:
/etc/init.d/smokeping stop
smokeping –debug
5 リンク
- Smokeping: http://oss.oetiker.ch/smokeping/index.en.html
- Debian: http://www.debian.org
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。