I've got some VPNs that drop fairly frequently, and can be reset from either a web interface or SSH. The web interface is doesn't seem to have an API, so that's out.
So, my plan was to build something and create it in PRTG as an EXE notification that runs the SSH script to reset the VPN after it has been down for a time period. All without human interaction. Hooray for scripting.
The only problem is, I'm not sure which language presents the easiest access to building an EXE for the script.
Python can do it, but any implementation I've seen requires libraries I don't think are built into PRTG. And I'm not sure how to add those libraries.
So picking another language is generally the best thought. I've dabbled in many languages, and picking up another isn't a bit deal. I currently list capabilities in C#, VB.net, C++, Python, and Java.
Any ideas short of "solve the VPN dropping issue so you don't have this problem?"
Hi Matt,
You can use any kind of script windows can execute. PowerShell, Python, EXE, you name it. PowerShell in that case would probably be the easiest one since it's basically C#. Actually, we do have a script that executes commands via SSH: Using PowerShell for SSH Script Execution
Make sure to check out our Guide for PowerShell based custom sensors and notifications as well. If you're stuck anywhere with the script or installation, let me know :)
Kind regards,
Stephan Linke, Tech Support Team
Aug, 2017 - Permalink