I have a Red Hat enterprise server with disk mount points I need to monitor. Is there a way to monitor those mount points within PRTG?


Article Comments

Hello,

Thank you very much for using PRTG. I'm afraid there is no direct sensor to monitor mount-points. You could try using Custom Sensors though.

best regards


Oct, 2014 - Permalink

Here is an example which works for me, my first shell script.

  1. Send the file within /var/prtg/scriptsxml
  2. Add sensor SSH Advanced
  3. In the sensor, add parameter which should match with column 6 when running df -h
#!/bin/bash

result="<?xml version='1.0' encoding='Windows-1252' ?>\n"
result+="<prtg>\n"

for i in $@
do
	if  df -h | awk '{print $6'} | grep $i ; then

		result+="   \t<result>\n"   
		result+="   	\t\t<channel>$i</channel>\n"
		result+="		\t\t<Unit>custom</Unit>\n"		
		result+="		\t\t<CustomUnit>(0=NOK; 1=OK)</CustomUnit>\n"	
		result+="		\t\t<value>1</value>\n"
		result+="	\t</result>\n"
	
	else
		result+="   \t<result>\n"   
		result+="   	\t\t<channel>$i</channel>\n"
		result+="		\t\t<Unit>custom</Unit>\n"		
		result+="		\t\t<CustomUnit>(0=NOK; 1=OK)</CustomUnit>\n"	
		result+="		\t\t<value>0</value>\n"
		result+="	\t</result>\n"
	fi
done

result+="   \t<text>OK</text>\n"
result+="</prtg>\n"

echo -e $result

Yann


Jun, 2020 - Permalink