New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


SSH Script Advanced Sensor, string return value not displayed

Votes:

0

Your Vote:

Up

Down

Hi

I have here a SSH Script Advanced Sensor for monitoring a asterisk with a script.

I have on some return values from the digium cards a string instead a number.

Can i use string and display them in PRTG where i can set an alarm on it like:

- OK = Green
- Yel = Warning
- Red = Alarm

?

Here a part of the script, that gives a integer back for the moment:

# Check DIGIUM Card Port 1
DIGI1=$(asterisk -rx "dahdi show status" | sed -n '2p' | cut -d " " -f 22)
echo -n "<result>
       <channel>DIGIUM Port 1 Status</channel>
         <value>"
if [ "OK" = "$DIGI1" ]; 
then
	echo "1"
else
	echo "-1"
fi
echo "</value>
		 <unit>custom</unit>
		 <customunit></customunit>
</result>"

asterisk linux ssh-script-advanced-sensor

Created on Nov 5, 2014 11:53:34 AM by  Volkan (52) 1 1

Last change on Nov 10, 2014 2:13:27 PM by  Torsten Lindner [Paessler Support]



1 Reply

Votes:

2

Your Vote:

Up

Down

Hi,

as your script returns integers anyway, you may want to use those in combination with value lookups (http://www.paessler.com/manuals/prtg/define_lookups.htm). That way, you can have PRTG translating the integer values of your script into custom string messages AND the according sensor state.

Created on Nov 10, 2014 12:54:29 PM by  ages (977) 5 1



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.