What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Ssh script exit 2 like nagios

Votes:

0

Hi, I am in the process of migration to PRTG from nagios, we have a lot of custom scripts and i need i need to use in prtg. In nagios when we have an exit 2 the interface show a critical alert but in prtg is System Error. How can i have an alarm that is more than a warning. The biggest problem is that the system error dont store data. Any help will be appreciated!! Thanks

script ssh ssh-script

Created on Aug 28, 2013 1:54:29 PM



Best Answer

Accepted Answer

Votes:

0

No Problem. In theory is the error value 2 defined for not working sensors, i.e. if the script can not run or the target is not available. If you want to have a error because of the given value, you need to return the value with a exitcode 0 or 1 and define channel limits for the error detection.

For example if you want to create an error depending on the value:

The exit code is: echo "1:8000:overloaded"

By default is this only a warning, but you can define Channel Settings limits to interpret the value as error. It is also possible to define lookups but this solution is faster and can be changed individual for each sensor.

Created on Sep 13, 2013 11:34:40 AM by  Michael Schmidt [Paessler Support] (150) 1 1



6 Replies

Votes:

0

Please see this link SSH Script Sensor

Best Regards

Michael

Created on Aug 28, 2013 3:13:08 PM by  Michael Schmidt [Paessler Support] (150) 1 1



Votes:

0

Hi Michael, thanks for the response but if i put echo "3:somevalue:test" the prtg only show me "Protocol Error: test (code: PE023)" and no value information. I need an alarm like cpu utilization with warning and critical, is possible??? Thanks!

Created on Aug 28, 2013 5:31:52 PM



Votes:

0

Hi, an example:

echo "0:100:$service is running."<--OK because of the value 0 , 100 is the value
echo "1:404:$service is not running."<--warning because of the value 1 (error code), 404 is the value + message.
echo "2:500:$service is zombie."<--error because of the value 2 (error code) , 500 is the value + message

also it is possible to define limits in the sensor to check the value and define a state.

Created on Aug 30, 2013 8:03:02 AM by  Michael Schmidt [Paessler Support] (150) 1 1



Votes:

0

Hi Michael, sorry for the delay. Im still stuck with this, if i put echo 0:500:test the prtg show me the value 500 and the message test, if i change to 1 i see the warning and the value and message too but if i change for example to 2:1000:test i dont see any data only the message no data and the error: System Error: test (code: PE022). How can i define the state 2 as an alarm and also show me data. This problem is the only thing stopping me for buying this product as I need to consolidate what I have in nagios into PRTG.

Thanks again

Created on Sep 12, 2013 2:59:13 PM



Accepted Answer

Votes:

0

No Problem. In theory is the error value 2 defined for not working sensors, i.e. if the script can not run or the target is not available. If you want to have a error because of the given value, you need to return the value with a exitcode 0 or 1 and define channel limits for the error detection.

For example if you want to create an error depending on the value:

The exit code is: echo "1:8000:overloaded"

By default is this only a warning, but you can define Channel Settings limits to interpret the value as error. It is also possible to define lookups but this solution is faster and can be changed individual for each sensor.

Created on Sep 13, 2013 11:34:40 AM by  Michael Schmidt [Paessler Support] (150) 1 1



Votes:

0

okkk now i understand!!!! I will try it, thanks for the follow up and the fast response

Created on Sep 13, 2013 1:02:38 PM




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.