How to monitor Dell MD3200 Health with Paessler PRTG

With this custom VBS Script you can Monitor the Health of a Dell MD3200 with Peassler PRTG.
Replace controller1.domain.local with IP or DNS Name of your Out Of Band Management interface from your controller 1.
Replace controller2.domain.local with IP or DNS Name of your Out Of Band Management interface from your controller 2.
Save the VBS in “C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXE” Folder.
Create a Custom EXE/Script Sensor and select the Script.

set objWshShell = CreateObject("WScript.Shell")
CheckStorageArrayHealthStatus """C:\Program Files (x86)\Dell\MD Storage Manager\client\smcli.exe"" controller1.domain.local -c ""show storageArray healthStatus;""" 
CheckStorageArrayHealthStatus """C:\Program Files (x86)\Dell\MD Storage Manager\client\smcli.exe"" controller2.domain.local -c ""show storageArray healthStatus;"""

Sub CheckStorageArrayHealthStatus(locstrCommand)  
	dim locobjExec, locstrReadline
	Set locobjExec = objWshShell.Exec(locstrCommand)
	Do While Not locobjExec.StdOut.AtEndOfStream
		locstrReadline = trim(locobjExec.StdOut.ReadLine())
		wscript.echo locstrReadline
		if left(lcase(locstrReadline), len("storage array health status")) = "storage array health status" then
			if left(lcase(locstrReadline), len("storage array health status = optimal.")) = "storage array health status = optimal." then
				wscript.echo "0:Ok"
				wscript.quit 0
			end if
		end if
	Loop
end sub

wscript.echo "2:Need Attention"
wscript.quit 2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s