OpManager ナレッジベース

SNMPによるハードディスク(GB)とディスク使用率監視の仕様


要望

OpManagerのSNMPによるハードディスク(GB)ディスク使用率の仕様を知りたい。

解説

OpManagerでのSNMPを用いたハードディスク(GB)とディスク使用率の監視結果は以下の計算方法で求めます。

ハードディスク(GB):装置概要ページの[装置概要]欄に記載されたハードディスク領域の値を指します。

ディスク使用率:SMMPによるパフォーマンス監視を指します。追加方法はこちらより確認可能です。

・事前準備(計算で用いるOIDとその値の取得)

使用するOID

  • .1.3.6.1.2.1.25.2.3.1.2(hrStorageTypes)
  • .1.3.6.1.2.1.25.2.3.1.4(hrStorageAllocationUnits)
  • .1.3.6.1.2.1.25.2.3.1.5(hrStorageSize)
  • .1.3.6.1.2.1.25.2.3.1.6(hrStorageUsed)

OIDの出力方法

  1. [設定]->[ツール]->[MIBブラウザー]に遷移
  2. [IPアドレス/ホスト名]と[認証]にそれぞれ対象の情報を入力
  3. 画面左上のMIB選択欄より[HOST-RESOURCES-MIB]を選択
    ※デフォルトでは[RFC1213-MIB]がセットされています。
  4. [+]マークを押下しサブツリーを展開
  5. [hrStorageTable]を選択し[Get]を押下
・ハードディスク(GB)計算方法(HostDetails.java)

hrStorageTypes が、hrStorageFixedDisk を持つインデックスに対して、
hrStorageAllocationUnits と hrStorageSize を掛け、すべての値を足し合わせる。
さらにバイトからGBに変換するために、1024*1024*1024 で割った値を格納する。

・ディスク使用率の計算方法(OpManagerDataDecoder.java)

hrStorageTypes が、hrStorageFixedDisk を持つインデックスに対して、
hrStorageAllocationUnits と hrStorageUsed を掛け、すべての値を足し合わせる。
足した値を、資産情報のハードディスクの値と1024*1024*1024で割り、
パーセントに変換するために100を掛けた値を格納する。

例1

取得したhrStorageTable(.1.3.6.1.2.1.25.2.3)の値が以下のような場合

hrMemorySize.0:2087316
hrStorageIndex.1:1
hrStorageIndex.2:2
hrStorageIndex.3:3
hrStorageType.1:.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk
hrStorageType.2:.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageVirtualMemory
hrStorageType.3:.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageRam
hrStorageDescr.1:C: Label: Serial Number 384b3ae4 hrStorageDescr.2:Virtual Memory hrStorageDescr.3:Physical Memory
hrStorageAllocationUnits.1:512
hrStorageAllocationUnits.2:65536
hrStorageAllocationUnits.3:65536
hrStorageSize.1:312480251
hrStorageSize.2:63078
hrStorageSize.3:32614
hrStorageUsed.1:31098838
hrStorageUsed.2:15080
hrStorageUsed.3:17136
hrStorageAllocationFailures.1:0
hrStorageAllocationFailures.2:0
hrStorageAllocationFailures.3:0

ハードディスクの値

hrStorageFixedDiskを持つのは、インデックス1のみなので、
hrStorageAllocationUnits.1 と hrStorageSize.1 を掛ける。

512 * 312480251 = 1599899888512
159989988512/(1024 * 1024 * 1024) = 149.002 ≒ 149 (GB)

 

ディスク使用率

hrStorageFixedDiskを持つのは、インデックス1のみなので、
hrStorageAllocationUnits.1 と hrStorageUsed.1 を掛ける。

512 * 31098838 = 15922605056
15922605056 / (149 * 1024 * 1024 * 1024 ) * 100 = 9.95 ≒ 9(%)

例2

取得したhrStorageTable(.1.3.6.1.2.1.25.2.3)の値が以下のような場合
(CドライブとDドライブのハードディスクがある場合)

hrStorageIndex.1:-->1
hrStorageIndex.2:-->2
hrStorageIndex.3:-->3
hrStorageIndex.4:-->4
hrStorageIndex.5:-->5
hrStorageIndex.6:-->6
hrStorageType.1:-->.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk
hrStorageType.2:-->.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk
hrStorageType.3:-->.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageCompactDisc
hrStorageType.4:-->.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageCompactDisc
hrStorageType.5:-->.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageVirtualMemory
hrStorageType.6:-->.iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageRam
hrStorageDescr.1:-->C: Label: Serial Number a40035d7
hrStorageDescr.2:-->D: Label: Serial Number d0a9b286
hrStorageDescr.3:-->F:
hrStorageDescr.4:-->G: Label:EXCHSRV2013 Serial Number b5e4c9a6
hrStorageDescr.5:-->Virtual Memory
hrStorageDescr.6:-->Physical Memory
hrStorageAllocationUnits.1:-->4096
hrStorageAllocationUnits.2:-->4096
hrStorageAllocationUnits.3:-->0
hrStorageAllocationUnits.4:-->2048
hrStorageAllocationUnits.5:-->65536
hrStorageAllocationUnits.6:-->65536
hrStorageSize.1:-->122006527
hrStorageSize.2:-->122096127
hrStorageSize.3:-->0
hrStorageSize.4:-->1767004
hrStorageSize.5:-->355123
hrStorageSize.6:-->261596
hrStorageUsed.1:-->58151560
hrStorageUsed.2:-->5720678
hrStorageUsed.3:-->0
hrStorageUsed.4:-->1767004
hrStorageUsed.5:-->188804
hrStorageUsed.6:-->173815
hrStorageAllocationFailures.1:-->0
hrStorageAllocationFailures.2:-->0
hrStorageAllocationFailures.3:-->0
hrStorageAllocationFailures.4:-->0
hrStorageAllocationFailures.5:-->0
hrStorageAllocationFailures.6:-->0

ハードディスクの値

hrStorageFixedDiskを持つのは、インデックス1とインデックス2なので、
hrStorageAllocationUnits.1 と hrStorageSize.1 を掛ける。
hrStorageAllocationUnits.2 と hrStorageSize.2 を掛ける。
それぞれ両方の積を最後に足す。

(4096*122006527)+(4096*122096127) = 999844470784
999844470784/(1024 * 1024 * 1024) ≒ 931 (GB)

 

ディスク使用率

hrStorageFixedDiskを持つのは、インデックス1とインデックス2なので、
hrStorageAllocationUnits.1 と hrStorageUsed.1 を掛ける。
hrStorageAllocationUnits.2 と hrStorageUsed.2 を掛ける。
それぞれ両方の積を最後に足す。

(4096*58151560)+(4096*5720678) = 261620686848
261620686848*100/(931*1024 * 1024 * 1024) ≒ 26(%)

【対応リリース】 7.0 (ビルド番号:7xxxx) 以降

★-----------------------------------------------------------------------------★
OpManager 製品紹介ページはこちら ↓
https://www.manageengine.jp/products/OpManager/
★-----------------------------------------------------------------------------★