New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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


Executing Shell Script

Votes:

0

Your Vote:

Up

Down

This situation warrants several questions. My organization would like to shut down Unix servers when our data center UPS run time falls below a certain level. We would like to try to use PRTG for this. I've thought of a few solutions but all seem to have roadblocks. One avenue I am unsure of. I'm thinking I can use the custom shell script sensor to run a script on the local Unix box. The roadblock I have is telling that custom shell script sensor when to scan. This leads me to my question...

Is there a way to set custom scanning intervals not based on time? In other words, can I tell a sensor to scan when another sensor moves to a down state?

custom-sensor shell unix

Created on Sep 6, 2013 5:49:51 PM by  Sean Moreno (0) 1



4 Replies

Votes:

0

Your Vote:

Up

Down

Another way might be to use something like plink on the Windows system to run the command. Then you can write a .bat script to run the command via plink and then set up a notification to run the batch when the UPS is at that level with channel limits.

If you want to have another sensor scan if the plink option isn't going to work, you could use the API to perform a scannow /api/scannow.htm?id=objectid and set this up in the notification for the HTTP Action.

Created on Sep 7, 2013 11:25:09 AM by  Greg Campion [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Greg,

I went the route you suggested with PLINK and it works wonderfully, with one exception... the PRTG notification won't run the script. I have changed the core server service to run under an admin account instead of system and testing it through the notifications page still is not working.

Any ideas?

Thank You.

Created on Sep 9, 2013 2:29:35 PM by  Sean Moreno (0) 1



Votes:

0

Your Vote:

Up

Down

Have you tried specifying the script itself to run with domain admin credentials in the notification itself and not have the service running with an admin account?

Also, I had an issue like this one other time with plink and first the session has to be made with Putty and the certificate accepted then plink can make the connection without issue.

Created on Sep 9, 2013 3:31:22 PM by  Greg Campion [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thank you Greg, turns out it was the certificate. I had to run the script while remoted into the PRTG server with the account I am using to run the script and choose yes on the certificate prompt. Worked fine after that.

Created on Sep 9, 2013 3:33:45 PM by  Sean Moreno (0) 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.