UJP - 技術情報2 編集 : MacOSX/HigiSierra/mrtg - バックアップ No.3 を復元して編集
Life is fun and easy!
不正IP報告数
Okan Sensor
Home
Information
Service
Tech(Free)
Tech(Member)
Blog
FAQ
メイン
ホーム
お知らせ
技術新着情報
組織
サービス
技術情報2
新規ページ作成
最新ページ一覧
全ページ一覧
ヘルプ
» 関連ページ
» 編集する
» 編集履歴
» バックアップ一覧
» 添付ファイル一覧
» リンク元一覧
技術情報1
技術情報
ブログ
RSSサイト更新
旧ブログ
FAQ
画像ファイル管理
ログイン
ユーザー名:
パスワード:
パスワード再発行手続き
|
無料会員入会手続へ...
ブログ カテゴリ一覧
雑記
(237)
投資で凍死
(271)
時事
(506)
テレビ・ドラマ
(419)
映画
(915)
007シリーズ
(33)
刑事コロンボ
(62)
災害
(212)
スキルチャージ
(49)
放送大学
(23)
Python
(10)
検定・試験
(32)
セキュリティ
(5)
ニュース・徒然
(325)
脆弱性情報/注意喚起
(110)
スパム・フィッシング
(634)
攻撃/ブルートフォース
(24)
ツール
(130)
事故・事件
(104)
文献・統計・参考資料
(128)
ベンダ・サービス
(3)
事故被害者記録
(46)
あとで確認
(1)
システム障害事故
(55)
サイト構築
(74)
Apple
(18)
MacBook Pro
(0)
2011 13inch
(31)
2007 15inch
(1)
2008 17inch
(20)
2015 15inch
(6)
Mac Pro 2013
(10)
Apple Watch
(84)
mac mini
(0)
2018
(1)
2011 server
(4)
2010 server
(5)
2014
(15)
2010
(36)
2005
(8)
MacBook
(0)
2017 12inch
(11)
2008 late
(45)
MacBook Air
(0)
2011 13inch/BCP
(9)
2013 13inch/US
(5)
2011 11inch
(31)
2011 13inch
(8)
Macソフト
(134)
Mac周辺機器
(36)
PowerBook
(5)
iPod touch/iOS
(59)
iPhone
(172)
iPad
(76)
ガジェット
(116)
fire tv
(1)
文房具
(19)
HUAWEI Watch FIT
(10)
カメラ/デジカメ
(40)
タイムラプス
(6)
ネットワーク機器
(17)
ネットワークケーブル
(4)
ネットワークその他
(8)
ネットワークスピード
(14)
YAMAHA/ヤマハ
(1)
FWX120
(2)
RTX1200
(14)
RTX1100/RTX1000
(10)
RT107e
(2)
NETGEAR WAC510
(11)
NERGEAR Orbi
(1)
Panasonic MNOseries
(3)
マウス&キーボード
(58)
AV機器・レグザ
(99)
電球
(11)
ハウツー
(105)
GPS/地図
(70)
ビジネス
(169)
新規ビジネス
(19)
お仕事
(63)
ケータイビジネス
(41)
PC
(11)
Raspberry Pi
(58)
ML110 G5
(20)
LIFEBOOK
(11)
Surface
(50)
ThinkPad R61
(5)
CF-LX4
(9)
CF-RZ6
(7)
DynabookPT45
(8)
PN-ZP30
(5)
EndeavorTN40
(4)
Intel NUC6CAYS
(2)
モバイル
(16)
ケータイスマホ機種
(34)
スマホアプリ
(73)
データ通信・契約
(79)
EMONSTER
(5)
IDEOS
(12)
Galaxy Note
(39)
Windows Phone
(20)
Nexus
(22)
コンピュータ
(11)
Windows
(90)
サーバソフト
(32)
Db2
(16)
クライアントソフト
(76)
インターネット
(69)
Google
(119)
ネットサービス
(157)
ハードウェア
(19)
プリンタ
(9)
ストレージ
(5)
ディスプレイ
(11)
情報システム
(95)
趣味
(3)
ポケモンGO
(640)
寝台特急カシオペア/カシオペア紀行
(34)
TOKYO2020
(85)
雑草対策
(27)
食べた
(209)
たべた(駅弁)
(30)
飲んだ
(33)
調理した
(24)
ラーメン・麺類
(202)
鉄道
(237)
農園
(168)
アクアリウム
(160)
ホテル・旅館
(44)
書評
(42)
演劇
(22)
車・バイク
(76)
自然・星
(37)
散策・近代建築
(18)
神社・寺
(50)
高層ビル
(24)
現代建築
(15)
建築物
(6)
観光・名所
(88)
イベント
(73)
散策:城
(34)
ディズニー
(24)
モーターショー
(16)
鳥
(9)
美術館
(28)
コンサート/ライブ
(72)
船
(3)
スポーツ
(120)
音楽
(76)
ミニカー
(4)
Nゲージダイキャスト
(8)
Nゲージ
(0)
サマリ
(6)
ピンバッチ
(3)
サイト運営
(39)
人生
(68)
監視/防犯/みまもり/遠隔
(93)
お金の話
(94)
体・病気
(118)
相続・土地売買
(17)
コンテンツ更新情報
(2)
macOS High SierraにMRTGを設定
- バックアップ No.3 を復元して編集
技術情報2
MacOSX
/
HigiSierra
/
mrtg
- バックアップ No.3 を復元して編集
MacOSX/HigiSierra/mrtg の編集
詳細な入力項目を表示
ページタイトル
( 空白で自動設定 )
:
ページ頭文字読み:
ページ並び順
( 0-9 小数可 標準:1 )
:
ページ別名
(複数は[
改行
]で区切る)
:
ページ内容:
*macOS High SierraにMRTGを設定 [#ja1f1f27] **はじめに [#ee80b8ea] MRTGとは,マルチルータトラフィックグラファーの略.ルータのIN/OUTトラフィックをグラフ化するツールで,古典的なもの.たくさんのサーバを管理するにはZabbixなどが良いのだろうけれど,今回もシンプルに構築するので,MRTGを選んだ. **インストール [#af8e3153] インストールはHomeBrewでおこなった.特に問題もなかった. $ brew info mrtg🆑 mrtg: stable 2.17.7 (bottled)🈁 Multi router traffic grapher https://oss.oetiker.ch/mrtg/ /usr/local/Cellar/mrtg/2.17.7 (110 files, 2.4MB) * Poured from bottle on 2019-05-07 at 00:48:32 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mrtg.rb ==> Dependencies Required: gd ✔ ==> Analytics install: 30 (30 days), 76 (90 days), 458 (365 days) install_on_request: 26 (30 days), 69 (90 days), 381 (365 days) build_error: 0 (30 days) $ インストールされたか,コマンドの場所を確認. まずは,mrtgコマンド. $ which mrtg🆑 /usr/local/bin/mrtg🈁 $ そして,設定ファイルを自動的に作成してくれる,cfgmakerの場所を確認. $ which cfgmaker🆑 /usr/local/bin/cfgmaker🈁 $ **初期設定 [#tc72761d] まずは,SNMPD.CONFにあるコミュニティ名を確認. $ grep com2sec /etc/snmp/snmpd.conf🆑 com2sec local localhost private🈁 com2sec mynetwork NETWORK/24 public $ "private"だとわかった. cfgmakerコマンドを指定し,privateコミュニティの初期設定を行う. $ cfgmaker private@localhost > mrtg.cfg🆑 Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 149. Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 604. --base: Get Device Info on private@localhost: --base: Vendor Id: Unknown Vendor - 1.3.6.1.4.1.8072.3.2.255 --base: Populating confcache --base: Get Interface Info --base: Walking ifIndex --snpd: private@localhost: -> 1 -> ifIndex = 1 --snpd: private@localhost: -> 2 -> ifIndex = 2 --snpd: private@localhost: -> 3 -> ifIndex = 3 --snpd: private@localhost: -> 4 -> ifIndex = 4 --snpd: private@localhost: -> 5 -> ifIndex = 5 --snpd: private@localhost: -> 6 -> ifIndex = 6 --snpd: private@localhost: -> 7 -> ifIndex = 7 --snpd: private@localhost: -> 8 -> ifIndex = 8 --snpd: private@localhost: -> 9 -> ifIndex = 9 --snpd: private@localhost: -> 10 -> ifIndex = 10 --snpd: private@localhost: -> 11 -> ifIndex = 11 --snpd: private@localhost: -> 12 -> ifIndex = 12 --base: Walking ifType --snpd: private@localhost: -> 1 -> ifType = 24 --snpd: private@localhost: -> 2 -> ifType = 55 --snpd: private@localhost: -> 3 -> ifType = 57 --snpd: private@localhost: -> 4 -> ifType = 1 --snpd: private@localhost: -> 5 -> ifType = 1 --snpd: private@localhost: -> 6 -> ifType = 6 --snpd: private@localhost: -> 7 -> ifType = 6 --snpd: private@localhost: -> 8 -> ifType = 6 --snpd: private@localhost: -> 9 -> ifType = 6 --snpd: private@localhost: -> 10 -> ifType = 209 --snpd: private@localhost: -> 11 -> ifType = 1 --snpd: private@localhost: -> 12 -> ifType = 23 --base: Walking ifAdminStatus --snpd: private@localhost: -> 1 -> ifAdminStatus = 1 --snpd: private@localhost: -> 2 -> ifAdminStatus = 2 --snpd: private@localhost: -> 3 -> ifAdminStatus = 2 --snpd: private@localhost: -> 4 -> ifAdminStatus = 2 --snpd: private@localhost: -> 5 -> ifAdminStatus = 2 --snpd: private@localhost: -> 6 -> ifAdminStatus = 1 --snpd: private@localhost: -> 7 -> ifAdminStatus = 1 --snpd: private@localhost: -> 8 -> ifAdminStatus = 2 --snpd: private@localhost: -> 9 -> ifAdminStatus = 1 --snpd: private@localhost: -> 10 -> ifAdminStatus = 1 --snpd: private@localhost: -> 11 -> ifAdminStatus = 1 --snpd: private@localhost: -> 12 -> ifAdminStatus = 1 --base: Walking ifOperStatus --snpd: private@localhost: -> 1 -> ifOperStatus = 1 --snpd: private@localhost: -> 2 -> ifOperStatus = 2 --snpd: private@localhost: -> 3 -> ifOperStatus = 2 --snpd: private@localhost: -> 4 -> ifOperStatus = 2 --snpd: private@localhost: -> 5 -> ifOperStatus = 2 --snpd: private@localhost: -> 6 -> ifOperStatus = 1 --snpd: private@localhost: -> 7 -> ifOperStatus = 2 --snpd: private@localhost: -> 8 -> ifOperStatus = 2 --snpd: private@localhost: -> 9 -> ifOperStatus = 1 --snpd: private@localhost: -> 10 -> ifOperStatus = 1 --snpd: private@localhost: -> 11 -> ifOperStatus = 1 --snpd: private@localhost: -> 12 -> ifOperStatus = 1 --base: Walking ifMtu --snpd: private@localhost: -> 1 -> ifMtu = 16384 --snpd: private@localhost: -> 2 -> ifMtu = 1280 --snpd: private@localhost: -> 3 -> ifMtu = 1280 --snpd: private@localhost: -> 4 -> ifMtu = 0 --snpd: private@localhost: -> 5 -> ifMtu = 0 --snpd: private@localhost: -> 6 -> ifMtu = 1500 --snpd: private@localhost: -> 7 -> ifMtu = 1500 --snpd: private@localhost: -> 8 -> ifMtu = 2304 --snpd: private@localhost: -> 9 -> ifMtu = 1500 --snpd: private@localhost: -> 10 -> ifMtu = 1500 --snpd: private@localhost: -> 11 -> ifMtu = 2000 --snpd: private@localhost: -> 12 -> ifMtu = 1280 --base: Walking ifSpeed --snpd: private@localhost: -> 1 -> ifSpeed = 0 --snpd: private@localhost: -> 2 -> ifSpeed = 0 --snpd: private@localhost: -> 3 -> ifSpeed = 0 --snpd: private@localhost: -> 4 -> ifSpeed = 0 --snpd: private@localhost: -> 5 -> ifSpeed = 0 --snpd: private@localhost: -> 6 -> ifSpeed = 1000000000 --snpd: private@localhost: -> 7 -> ifSpeed = 0 --snpd: private@localhost: -> 8 -> ifSpeed = 10000000 --snpd: private@localhost: -> 9 -> ifSpeed = 0 --snpd: private@localhost: -> 10 -> ifSpeed = 0 --snpd: private@localhost: -> 11 -> ifSpeed = 0 --snpd: private@localhost: -> 12 -> ifSpeed = 100000000 $ 自動作成された設定ファイルを確認. $ cat mrtg.cfg🆑 # Created by # /usr/local/bin/cfgmaker private@localhost ### Global Config Options # for UNIX # WorkDir: /home/http/mrtg # or for NT # WorkDir: c:\mrtgdata ### Global Defaults # to get bits instead of bytes and graphs growing to the right # Options[_]: growright, bits EnableIPv6: no ###################################################################### # System: zeus.local # Description: Darwin zeus.local 17.7.0 Darwin Kernel Version 17.7.0: Wed Feb 27 00:43:23 PST 2019; root:xnu-4570.71.35~1/RELEASE_X86_64 x86_64 # Contact: サーバ管理者メールアドレス # Location: BCP ###################################################################### ### Interface 1 >> Descr: 'lo0' | Name: 'lo0' | Ip: '127.0.0.1' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * it is a Software Loopback interface ### * has no ifSpeed property # # Target[localhost_1]: 1:private@localhost: # SetEnv[localhost_1]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="lo0" # MaxBytes[localhost_1]: 0 # Title[localhost_1]: Traffic Analysis for 1 -- zeus.local # PageTop[localhost_1]: <h1>Traffic Analysis for 1 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>サーバ管理者メールアドレス</td> # </tr> # <tr> # <td>Description:</td> # <td>lo0 </td> # </tr> # <tr> # <td>ifType:</td> # <td>softwareLoopback (24)</td> # </tr> # <tr> # <td>ifName:</td> # <td>lo0</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>127.0.0.1 (localhost)</td> # </tr> # </table> # </div> ### Interface 2 >> Descr: 'gif0' | Name: 'gif0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * it is administratively DOWN ### * it is operationally DOWN ### * has no ifSpeed property # # Target[localhost_2]: 2:private@localhost: # SetEnv[localhost_2]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="gif0" # MaxBytes[localhost_2]: 0 # Title[localhost_2]: Traffic Analysis for 2 -- zeus.local # PageTop[localhost_2]: <h1>Traffic Analysis for 2 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>gif0 </td> # </tr> # <tr> # <td>ifType:</td> # <td>100BaseVG (55)</td> # </tr> # <tr> # <td>ifName:</td> # <td>gif0</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 3 >> Descr: 'stf0' | Name: 'stf0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * it is administratively DOWN ### * it is operationally DOWN ### * has no ifSpeed property # # Target[localhost_3]: 3:private@localhost: # SetEnv[localhost_3]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="stf0" # MaxBytes[localhost_3]: 0 # Title[localhost_3]: Traffic Analysis for 3 -- zeus.local # PageTop[localhost_3]: <h1>Traffic Analysis for 3 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>stf0 </td> # </tr> # <tr> # <td>ifType:</td> # <td>HIPPI Interface (57)</td> # </tr> # <tr> # <td>ifName:</td> # <td>stf0</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 4 >> Descr: 'EHC253' | Name: 'EHC253' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * it is administratively DOWN ### * it is operationally DOWN ### * has no ifSpeed property # # Target[localhost_4]: 4:private@localhost: # SetEnv[localhost_4]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="EHC253" # MaxBytes[localhost_4]: 0 # Title[localhost_4]: Traffic Analysis for 4 -- zeus.local # PageTop[localhost_4]: <h1>Traffic Analysis for 4 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>EHC253 </td> # </tr> # <tr> # <td>ifType:</td> # <td>Other (1)</td> # </tr> # <tr> # <td>ifName:</td> # <td>EHC253</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 5 >> Descr: 'EHC250' | Name: 'EHC250' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * it is administratively DOWN ### * it is operationally DOWN ### * has no ifSpeed property # # Target[localhost_5]: 5:private@localhost: # SetEnv[localhost_5]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="EHC250" # MaxBytes[localhost_5]: 0 # Title[localhost_5]: Traffic Analysis for 5 -- zeus.local # PageTop[localhost_5]: <h1>Traffic Analysis for 5 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>EHC250 </td> # </tr> # <tr> # <td>ifType:</td> # <td>Other (1)</td> # </tr> # <tr> # <td>ifName:</td> # <td>EHC250</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 6 >> Descr: 'en3' | Name: 'en3' | Ip: '192.168.100.10' | Eth: '00-6c-8f-44-8a-32' ### Target[localhost_6]: 6:private@localhost: SetEnv[localhost_6]: MRTG_INT_IP="192.168.100.10" MRTG_INT_DESCR="en3" MaxBytes[localhost_6]: 125000000 Title[localhost_6]: Traffic Analysis for 6 -- zeus.local PageTop[localhost_6]: <h1>Traffic Analysis for 6 -- zeus.local</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>zeus.local in BCP</td> </tr> <tr> <td>Maintainer:</td> <td>server@ujp.jp</td> </tr> <tr> <td>Description:</td> <td>en3 </td> </tr> <tr> <td>ifType:</td> <td>ethernetCsmacd (6)</td> </tr> <tr> <td>ifName:</td> <td>en3</td> </tr> <tr> <td>Max Speed:</td> <td>125.0 MBytes/s</td> </tr> <tr> <td>Ip:</td> <td>192.168.100.10 (No DNS name)</td> </tr> </table> </div> ### Interface 7 >> Descr: 'en0' | Name: 'en0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * it is operationally DOWN ### * has no ifSpeed property # # Target[localhost_7]: 7:private@localhost: # SetEnv[localhost_7]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="en0" # MaxBytes[localhost_7]: 0 # Title[localhost_7]: Traffic Analysis for 7 -- zeus.local # PageTop[localhost_7]: <h1>Traffic Analysis for 7 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>en0 </td> # </tr> # <tr> # <td>ifType:</td> # <td>ethernetCsmacd (6)</td> # </tr> # <tr> # <td>ifName:</td> # <td>en0</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 8 >> Descr: 'p2p0' | Name: 'p2p0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * it is administratively DOWN ### * it is operationally DOWN # # Target[localhost_8]: 8:private@localhost: # SetEnv[localhost_8]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="p2p0" # MaxBytes[localhost_8]: 1250000 # Title[localhost_8]: Traffic Analysis for 8 -- zeus.local # PageTop[localhost_8]: <h1>Traffic Analysis for 8 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>p2p0 </td> # </tr> # <tr> # <td>ifType:</td> # <td>ethernetCsmacd (6)</td> # </tr> # <tr> # <td>ifName:</td> # <td>p2p0</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>1250.0 kBytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 9 >> Descr: 'en1' | Name: 'en1' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * has no ifSpeed property # # Target[localhost_9]: 9:private@localhost: # SetEnv[localhost_9]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="en1" # MaxBytes[localhost_9]: 0 # Title[localhost_9]: Traffic Analysis for 9 -- zeus.local # PageTop[localhost_9]: <h1>Traffic Analysis for 9 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>en1 </td> # </tr> # <tr> # <td>ifType:</td> # <td>ethernetCsmacd (6)</td> # </tr> # <tr> # <td>ifName:</td> # <td>en1</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 10 >> Descr: 'bridge0' | Name: 'bridge0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * has no ifSpeed property # # Target[localhost_10]: 10:private@localhost: # SetEnv[localhost_10]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="bridge0" # MaxBytes[localhost_10]: 0 # Title[localhost_10]: Traffic Analysis for 10 -- zeus.local # PageTop[localhost_10]: <h1>Traffic Analysis for 10 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>bridge0 </td> # </tr> # <tr> # <td>ifType:</td> # <td>Uknown Interface Type (209)</td> # </tr> # <tr> # <td>ifName:</td> # <td>bridge0</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 11 >> Descr: 'utun0' | Name: 'utun0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ### ### The following interface is commented out because: ### * has no ifSpeed property # # Target[localhost_11]: 11:private@localhost: # SetEnv[localhost_11]: MRTG_INT_IP="No Ip" MRTG_INT_DESCR="utun0" # MaxBytes[localhost_11]: 0 # Title[localhost_11]: Traffic Analysis for 11 -- zeus.local # PageTop[localhost_11]: <h1>Traffic Analysis for 11 -- zeus.local</h1> # <div id="sysdetails"> # <table> # <tr> # <td>System:</td> # <td>zeus.local in BCP</td> # </tr> # <tr> # <td>Maintainer:</td> # <td>server@ujp.jp</td> # </tr> # <tr> # <td>Description:</td> # <td>utun0 </td> # </tr> # <tr> # <td>ifType:</td> # <td>Other (1)</td> # </tr> # <tr> # <td>ifName:</td> # <td>utun0</td> # </tr> # <tr> # <td>Max Speed:</td> # <td>0.0 Bytes/s</td> # </tr> # <tr> # <td>Ip:</td> # <td>No Ip (No DNS name)</td> # </tr> # </table> # </div> ### Interface 12 >> Descr: 'ppp0' | Name: 'ppp0' | Ip: '192.168.20.231' | Eth: 'No Ethernet Id' ### Target[localhost_12]: 12:private@localhost: SetEnv[localhost_12]: MRTG_INT_IP="192.168.20.231" MRTG_INT_DESCR="ppp0" MaxBytes[localhost_12]: 12500000 Title[localhost_12]: Traffic Analysis for 12 -- zeus.local PageTop[localhost_12]: <h1>Traffic Analysis for 12 -- zeus.local</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>zeus.local in BCP</td> </tr> <tr> <td>Maintainer:</td> <td>server@ujp.jp</td> </tr> <tr> <td>Description:</td> <td>ppp0 </td> </tr> <tr> <td>ifType:</td> <td>ppp (23)</td> </tr> <tr> <td>ifName:</td> <td>ppp0</td> </tr> <tr> <td>Max Speed:</td> <td>12.5 MBytes/s</td> </tr> <tr> <td>Ip:</td> <td>192.168.20.231 (No DNS name)</td> </tr> </table> </div> $ コメントアウトされている部分は,今回利用しないのでざっと削除. 今回利用するのは次のように設定. $ cat mrtg.cfg🆑 ### Global Config Options # for UNIX WorkDir: /Users/ujpadmin/mrtg🈁 ### Global Defaults # to get bits instead of bytes and graphs growing to the right Options[_]: growright, bits EnableIPv6: no ###################################################################### # System: zeus.local # Contact: 管理者のメールアドレス # Location: BCP ###################################################################### ###################################################################### #Thunderbolt LAN ###################################################################### ### Interface 6 >> Descr: 'en3' | Name: 'en3' | Ip: '192.168.100.10' | Eth: '00-6c-8f-44-8a-32' ### Target[ThunderboltLAN]: 6:private@localhost: SetEnv[ThunderboltLAN]: MRTG_INT_IP="192.168.100.10" MRTG_INT_DESCR="en3" MaxBytes[ThunderboltLAN]: 125000000 Title[ThunderboltLAN]: Traffic Analysis for LAN -- zeus.local PageTop[ThunderboltLAN]: <h1>Traffic Analysis for LAN -- zeus.local</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>zeus.local in BCP</td> </tr> <tr> <td>Maintainer:</td> <td>管理者メールアドレス</td> </tr> <tr> <td>Description:</td> <td>en3 </td> </tr> <tr> <td>ifType:</td> <td>ethernetCsmacd (6)</td> </tr> <tr> <td>ifName:</td> <td>en3</td> </tr> <tr> <td>Max Speed:</td> <td>125.0 MBytes/s</td> </tr> <tr> <td>Ip:</td> <td>192.168.100.10 (No DNS name)</td> </tr> </table> </div> ###################################################################### #VPN ###################################################################### ### Interface 12 >> Descr: 'ppp0' | Name: 'ppp0' | Ip: '192.168.20.231' | Eth: 'No Ethernet Id' ### Target[VPN]: 12:private@localhost: SetEnv[VPN]: MRTG_INT_IP="192.168.20.231" MRTG_INT_DESCR="ppp0" MaxBytes[VPN]: 12500000 Title[VPN]: Traffic Analysis for VPN -- zeus.local PageTop[VPN]: <h1>Traffic Analysis for VPN -- zeus.local</h1> <div id="sysdetails"> <table> <tr> <td>System:</td> <td>zeus.local in BCP</td> </tr> <tr> <td>Maintainer:</td> <td>管理者メールアドレス</td> </tr> <tr> <td>Description:</td> <td>ppp0 </td> </tr> <tr> <td>ifType:</td> <td>ppp (23)</td> </tr> <tr> <td>ifName:</td> <td>ppp0</td> </tr> <tr> <td>Max Speed:</td> <td>12.5 MBytes/s</td> </tr> <tr> <td>Ip:</td> <td>192.168.20.231 (No DNS name)</td> </tr> </table> </div> $ これで問題ないと思う. **MRTGを実行する [#n7020835] mrtg.cfgファイルを読み込ませながら,mrtgコマンドを実行する. $ mrtg mrtg.cfg🆑 ----------------------------------------------------------------------- ERROR: Mrtg will most likely not work properly when the environment variable LANG is set to UTF-8. Please run mrtg in an environment where this is not the case. Try the following command to start: env LANG=C /usr/local/bin/mrtg mrtg.cfg🈁 ----------------------------------------------------------------------- $ 環境変数がCである必要がある. 指定して3回実行. $ mrtg mrtg.cfg🆑 Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 149. Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 604. 2019-05-29 12:53:17, Rateup WARNING: /usr/local/bin/rateup could not read the primary log file for thunderboltlan 2019-05-29 12:53:17, Rateup WARNING: /usr/local/bin/rateup The backup log file for thunderboltlan was invalid as well 2019-05-29 12:53:17, Rateup WARNING: /usr/local/bin/rateup Can't rename thunderboltlan.log to thunderboltlan.old updating log file 2019-05-29 12:53:17, Rateup WARNING: /usr/local/bin/rateup could not read the primary log file for vpn 2019-05-29 12:53:17, Rateup WARNING: /usr/local/bin/rateup The backup log file for vpn was invalid as well 2019-05-29 12:53:17, Rateup WARNING: /usr/local/bin/rateup Can't rename vpn.log to vpn.old updating log file $ もう一度. $ mrtg mrtg.cfg🆑 Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 149. Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 604. $ さらにもう一度. $ mrtg mrtg.cfg🆑 Subroutine SNMP_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 149. Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at /System/Library/Perl/5.18/Exporter.pm line 66. at /usr/local/bin/../lib/mrtg2/SNMP_Session.pm line 604. $ 3回実行する理由は,初回はファイルが無いのでエラーがでるのだが,ここでは別のエラーがでている... ***SNMP_Session.pm line 149,SNMP_Session.pm line 604に [#f79b6484] このエラーは,Perlのバージョンが新しい場合に出る模様. コードを書き換えれば修正される.次のように.バックアップを取った後に修正する. $ cp -p /usr/local/bin/mrtg /usr/local/bin/mrtg.v00🆑 $ diff /usr/local/bin/mrtg.v00 /usr/local/bin/mrtg🆑 305c305 < import Socket6; --- > Socket6->import(qw(inet_pton getaddrinfo));🈁 $ もう1つ. $ cp -p /usr/local/Cellar/mrtg/2.17.7/lib/mrtg2/SNMP_Session.pm /usr/local/Cellar/mrtg/2.17.7/lib/mrtg2/SNMP_Session.pm.v00🆑 $ diff /usr/local/Cellar/mrtg/2.17.7/lib/mrtg2/SNMP_Session.pm.v00 /usr/local/Cellar/mrtg/2.17.7/lib/mrtg2/SNMP_Session.pm🆑 149c149 < Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo)); --- > Socket6->import(qw(inet_pton getaddrinfo));🈁 604c604 < Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo)); --- > Socket6->import(qw(inet_pton getaddrinfo));🈁 $ 再度実行してみる. $ mrtg mrtg.cfg $ エラーは出なかった.ファイルを確認. $ pwd🆑 /Users/ujpadmin/mrtg $ ls -la🆑 total 288 drwxr-xr-x 22 ujpadmin staff 704 May 29 17:56 . drwxr-xr-x+ 26 ujpadmin staff 832 May 29 17:29 .. -rw-r--r-- 1 ujpadmin staff 538 May 29 12:53 mrtg-l.png -rw-r--r-- 1 ujpadmin staff 414 May 29 12:53 mrtg-m.png -rw-r--r-- 1 ujpadmin staff 1759 May 29 12:53 mrtg-r.png -rw-r--r-- 1 ujpadmin staff 2542 May 29 17:00 mrtg.cfg -rw-r--r-- 1 ujpadmin staff 13435 May 29 12:44 mrtg.cfg.org -rw-r--r-- 1 ujpadmin staff 0 May 29 17:56 mrtg.ok -rw-r--r-- 1 ujpadmin staff 1798 May 29 17:56 thunderboltlan-day.png -rw-r--r-- 1 ujpadmin staff 1544 May 29 17:18 thunderboltlan-month.png -rw-r--r-- 1 ujpadmin staff 1688 May 29 17:56 thunderboltlan-week.png -rw-r--r-- 1 ujpadmin staff 1748 May 29 12:53 thunderboltlan-year.png -rw-r--r-- 1 ujpadmin staff 6362 May 29 17:56 thunderboltlan.html -rw-r--r-- 1 ujpadmin staff 49224 May 29 17:56 thunderboltlan.log -rw-r--r-- 1 ujpadmin staff 49206 May 29 17:29 thunderboltlan.old -rw-r--r-- 1 ujpadmin staff 1761 May 29 17:56 vpn-day.png -rw-r--r-- 1 ujpadmin staff 1514 May 29 17:18 vpn-month.png -rw-r--r-- 1 ujpadmin staff 1629 May 29 17:56 vpn-week.png -rw-r--r-- 1 ujpadmin staff 1748 May 29 12:53 vpn-year.png -rw-r--r-- 1 ujpadmin staff 6309 May 29 17:56 vpn.html -rw-r--r-- 1 ujpadmin staff 49223 May 29 17:56 vpn.log -rw-r--r-- 1 ujpadmin staff 49204 May 29 17:29 vpn.old $ ファイルができていることが確認できた. **HTMLファイルを作成 [#l8a42faa] MRTGのグラフをWebブラウザで参照するための,インデックスページを自動的に作成してくれる. これは最初に1回実行すれば良いが,定義を追加した際に,毎回実行すれば良い. インデックス作成用のindexmakerコマンドを探す. $ locate indexmaker🆑 /usr/local/Cellar/mrtg/2.17.7/bin/indexmaker /usr/local/Cellar/mrtg/2.17.7/share/doc/mrtg2/indexmaker.1 /usr/local/Cellar/mrtg/2.17.7/share/doc/mrtg2/indexmaker.pod /usr/local/Cellar/mrtg/2.17.7/share/doc/mrtg2/indexmaker.txt /usr/local/Cellar/mrtg/2.17.7/share/man/man1/indexmaker.1 /usr/local/bin/indexmaker /usr/local/share/man/man1/indexmaker.1 $ コマンドヘルプを確認. $ /usr/local/bin/indexmaker -h🆑 Option h is ambiguous (headeradd, headeradd-file, headlevel, height, help) Usage: indexmaker [options] mrtg.cfg [other.cfg ...] Options: --output=filename set output filename (default: stdout) --filter title=~regexp select targets by matching regexp against titles --filter pagetop=~regexp select targets by matching regexp against pagetop --filter name=~regexp select targets by matchin regexp against name --addhead=text insert this text between </TITLE> and </HEAD> --title=text set title of generated index file --subtitle=text add a subtitle to the generated index file --bodyopt=text set body tag options --headlevel=number use <Hnumber> at top of page (default: 1) --pagetop=text insert this text between <BODY> and <H1>...</H1> --pageend=text insert this text after the main body --pagetopend=text use this text for pagetop or pageend if undefined --nolegend do not add the Mrtg legend at the end of the page --columns=number show graphs in a table with x columns (default: 2) --perhost show graphs of the same host on a row --compact try to make a vertically more compact page --optlog log the used command line in the page (default: log) --sort=title sort graphs by title --sort=name sort graphs by their name --sort=descr sort graphs by their description --sort=original leave as is (default) --enumerate add a sequence number to the title of each graph --picfirst place pictures before text (default: text first) --width=number set width of graphs (default: not set) --height=number --sidebyside place text / pictures side by side (default: above/below) --bold use bold text (default: bold) --clicktext make the text link to the inner page (like the image) --show=day pick which graph to show in the index (default) --show=week --show=month --show=year --show=none --section=h1 h1 tag from pagetop as section heading (default) --section=title title as section headings for graphs --section=name graph name as section heading --section=descr graph description as section heading --section=ifname interface name (ifName) as section heading --section=portname port name entry in pagetop as section heading --sectionhost Try to prepend the host to the section heading if missing --rrdviewer=path path to rrdviewer (default: /cgi-bin/14all.cgi) --icondir=path path to icondir --prefix=path path from the location of the index.html to the graphs --headeradd=string add string to the html page header --autoprefix try to set prefix automatically --<opt>-file=file read string argument for option <opt> from file $ 今回は,パラメータを指定せずに,デフォルトで実行. 実行結果は標準出力にでてくるので,ファイルへリダイレクトする. $ indexmaker mrtg.cfg > index.html🆑 $ ls -la index.html🆑 -rw-r--r-- 1 ujpadmin staff 2644 May 29 18:28 index.html🈁 $ あとは,作成されたHTMLをWebブラウザで表示させる.
編集の要約:
Q & A 認証:
ページ更新時は次の質問にお答えください。(プレビュー時は必要ありません)
Q:
「大阪」の読みがな?(ひらがなで)
A:
お名前:
タイムスタンプを変更しない
テキスト整形のルールを表示する
添付ファイル
:
Counter: 1468, today: 2, yesterday: 0
広告スペース
検索用語を入力
検索フォームを送信
Web
www.ujp.jp