Solaris SNMP Swap

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ahmad.zuhd
Posts: 44
Joined: Sun Jul 01, 2012 2:33 am

Re: Solaris SNMP Swap

Post by ahmad.zuhd »

this is the output from the command,

Code: Select all

# snmpwalk -v2c -c <Community String> <Solaris IP Address> .1.3.6.1.2.1.25.2
HOST-RESOURCES-MIB::hrMemorySize.0 = INTEGER: 33423360 KBytes
HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 2
HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 3
HOST-RESOURCES-MIB::hrStorageIndex.4 = INTEGER: 4
HOST-RESOURCES-MIB::hrStorageIndex.5 = INTEGER: 5
HOST-RESOURCES-MIB::hrStorageIndex.6 = INTEGER: 6
HOST-RESOURCES-MIB::hrStorageIndex.7 = INTEGER: 7
HOST-RESOURCES-MIB::hrStorageIndex.8 = INTEGER: 8
HOST-RESOURCES-MIB::hrStorageIndex.9 = INTEGER: 9
HOST-RESOURCES-MIB::hrStorageIndex.10 = INTEGER: 10
HOST-RESOURCES-MIB::hrStorageIndex.11 = INTEGER: 11
HOST-RESOURCES-MIB::hrStorageIndex.12 = INTEGER: 12
HOST-RESOURCES-MIB::hrStorageIndex.13 = INTEGER: 13
HOST-RESOURCES-MIB::hrStorageIndex.14 = INTEGER: 14
HOST-RESOURCES-MIB::hrStorageIndex.15 = INTEGER: 15
HOST-RESOURCES-MIB::hrStorageIndex.16 = INTEGER: 16
HOST-RESOURCES-MIB::hrStorageIndex.17 = INTEGER: 17
HOST-RESOURCES-MIB::hrStorageIndex.18 = INTEGER: 18
HOST-RESOURCES-MIB::hrStorageIndex.19 = INTEGER: 19
HOST-RESOURCES-MIB::hrStorageIndex.20 = INTEGER: 20
HOST-RESOURCES-MIB::hrStorageType.2 = OID: HOST-RESOURCES-TYPES::hrStorageRam
HOST-RESOURCES-MIB::hrStorageType.3 = OID: HOST-RESOURCES-TYPES::hrStorageVirtualMemory
HOST-RESOURCES-MIB::hrStorageType.4 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.5 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.6 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.7 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.8 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.9 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.10 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.11 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.12 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.13 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.14 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.15 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.16 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.17 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.18 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.19 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.20 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /devices
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /system/contract
HOST-RESOURCES-MIB::hrStorageDescr.7 = STRING: /proc
HOST-RESOURCES-MIB::hrStorageDescr.8 = STRING: /etc/mnttab
HOST-RESOURCES-MIB::hrStorageDescr.9 = STRING: /etc/svc/volatile
HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: /system/object
HOST-RESOURCES-MIB::hrStorageDescr.11 = STRING: /etc/dfs/sharetab
HOST-RESOURCES-MIB::hrStorageDescr.12 = STRING: /platform/sun4v/lib/libc_psr.so.1
HOST-RESOURCES-MIB::hrStorageDescr.13 = STRING: /platform/sun4v/lib/sparcv9/libc_psr.so.1
HOST-RESOURCES-MIB::hrStorageDescr.14 = STRING: /tmp
HOST-RESOURCES-MIB::hrStorageDescr.15 = STRING: /var/run
HOST-RESOURCES-MIB::hrStorageDescr.16 = STRING: /export
HOST-RESOURCES-MIB::hrStorageDescr.17 = STRING: /export/home
HOST-RESOURCES-MIB::hrStorageDescr.18 = STRING: /rpool
HOST-RESOURCES-MIB::hrStorageDescr.19 = STRING: /RCD/backup
HOST-RESOURCES-MIB::hrStorageDescr.20 = STRING: /vol
HOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 8192 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 8192 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.4 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.5 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.6 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.7 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.8 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.9 = INTEGER: 8192 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.10 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.11 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.12 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.13 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.14 = INTEGER: 8192 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.15 = INTEGER: 8192 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.16 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.17 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.18 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.19 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.20 = INTEGER: 512 Bytes
HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 4177920
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 3487975
HOST-RESOURCES-MIB::hrStorageSize.4 = INTEGER: 259607072
HOST-RESOURCES-MIB::hrStorageSize.5 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.6 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.7 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.8 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.9 = INTEGER: 1829977
HOST-RESOURCES-MIB::hrStorageSize.10 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.11 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.12 = INTEGER: 259607072
HOST-RESOURCES-MIB::hrStorageSize.13 = INTEGER: 259607072
HOST-RESOURCES-MIB::hrStorageSize.14 = INTEGER: 1830046
HOST-RESOURCES-MIB::hrStorageSize.15 = INTEGER: 1829366
HOST-RESOURCES-MIB::hrStorageSize.16 = INTEGER: 54254099
HOST-RESOURCES-MIB::hrStorageSize.17 = INTEGER: 54395443
HOST-RESOURCES-MIB::hrStorageSize.18 = INTEGER: 54254247
HOST-RESOURCES-MIB::hrStorageSize.19 = INTEGER: 259791052
HOST-RESOURCES-MIB::hrStorageSize.20 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 3068898
HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 1658480
HOST-RESOURCES-MIB::hrStorageUsed.4 = INTEGER: 205353019
HOST-RESOURCES-MIB::hrStorageUsed.5 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.6 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.7 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.8 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.9 = INTEGER: 54
HOST-RESOURCES-MIB::hrStorageUsed.10 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.11 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.12 = INTEGER: 205353019
HOST-RESOURCES-MIB::hrStorageUsed.13 = INTEGER: 205353019
HOST-RESOURCES-MIB::hrStorageUsed.14 = INTEGER: 20
HOST-RESOURCES-MIB::hrStorageUsed.15 = INTEGER: 6
HOST-RESOURCES-MIB::hrStorageUsed.16 = INTEGER: 46
HOST-RESOURCES-MIB::hrStorageUsed.17 = INTEGER: 141390
HOST-RESOURCES-MIB::hrStorageUsed.18 = INTEGER: 194
HOST-RESOURCES-MIB::hrStorageUsed.19 = INTEGER: 118717489
HOST-RESOURCES-MIB::hrStorageUsed.20 = INTEGER: 0


Also i have found something interesting, check the below output of the snmpwalk command:

Code: Select all

# snmpwalk -v2c -c <Community String> <Solaris IP Address> .1.3.6.1.4.1.2021.4
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 40813128 kB
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 40811912 kB
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 16776428 kB
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 3966092 kB
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 44474540 kB
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000 kB
UCD-SNMP-MIB::memSwapError.0 = INTEGER: noError(0)
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING:
you can see two different values of the swap usage and size.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Solaris SNMP Swap

Post by scottwilkerson »

Ok, so the script it taking info for the .3 items because that is the ont that matched the REGEX '^Swap'

So to calc the total swap its

Code: Select all

HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 * HOST-RESOURCES-MIB::hrStorageSize.3 = Bytes
8192 * 3487975 = 28573491200 Bytes
28573491200 / 1024 /1024 = 27249.8046875 MB
So to calc the used swap its

Code: Select all

HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 * HOST-RESOURCES-MIB::hrStorageUsed.3 = Bytes
8192 * 1658480 = 13586268160 Bytes
13586268160 / 1024 /1024 = 12956.875 MB
So to calc the free swap its

Code: Select all

total - used
28573491200 - 13586268160 = 14987223040 Bytes
14987223040 / 1024 /1024 = 14292.9296875 MB
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ahmad.zuhd
Posts: 44
Joined: Sun Jul 01, 2012 2:33 am

Re: Solaris SNMP Swap

Post by ahmad.zuhd »

I don't have a problem with the calculations. My problem is that the swap doesn't match with oid result. Actually the results reported by the below command is the correct ones. So why the plugin is not using those values instead of the storage table?

memTotalSwap.0 = INTEGER: 40813128 kB
memAvailSwap.0 = INTEGER: 40811912 kB

Code: Select all

 # snmpwalk -v2c -c <Community String> <Solaris IP Address> .1.3.6.1.4.1.2021.4
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 40813128 kB
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 40811912 kB
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 16776428 kB
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 3966092 kB
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 44474540 kB
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000 kB
UCD-SNMP-MIB::memSwapError.0 = INTEGER: noError(0)
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING: 

after doing some search, i have found the below link:
http://exchange.nagios.org/directory/Pl ... MP/details

however when using the script, i got the below error

Code: Select all

# ./check_swapspace_ucd -H <SPARC IP>
ERROR %d get_request: 129
So, we need to find the problem in this plugin and check what will be the result
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Solaris SNMP Swap

Post by scottwilkerson »

Did you specify the community string & version directly in the plugin?

You may get better info from the plugin author as this is not a Nagios Enterprises created plugin.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
ahmad.zuhd
Posts: 44
Joined: Sun Jul 01, 2012 2:33 am

Re: Solaris SNMP Swap

Post by ahmad.zuhd »

I have made all the tests required and the error exists.
Also in general what are the supported plugins.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Solaris SNMP Swap

Post by scottwilkerson »

Did you specify the community string & version directly in the plugin?

generally speaking the plugins delivered with the system, or deliver with wizards that are created by Nagios Enterprises.

That said, you do realise that you can use the SNMP wizard and just input the OID for the data you want right?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked