Hello,
I am currently working out a way to send SMS messages without using a 3rd party service. I have written a small Powershell script that does the job perfectly. I have tested the application outside of PRTG and it sends the SMS messages no problem.
When I use the Notification option "Execute Program" the program doesn't appear to be getting executed. I do not receive any txt messages and I cannot see any error messages.
So to test if I set something up wrong I tried using the provided Powershell script as another test. I provided it the parameter suggested in the script and again tested the notification. The text file was not created.
To further test, executed the demo PRTG Powershell script from the command line providing it the arguments suggested. The Powershell script worked perfectly.
I have tried running tests with these scripts without providing it alternative credentials, as well as with domain credentials and both tests yielded the same results.
Are there log files that I can look at to try and troubleshoot why these scripts are not being executed correctly? Also, has anyone else ran into this? I found one other post about this identical problem, unfortunately the post ended with no conclusion.
any help would be greatly appreciated
Article Comments
Hello,
I have indeed tried following some of the suggestions given in that post. For testing purposes, I currently have the Powershell execution policy set to "Unrestricted". I know this isn't safe, but for testing it is acceptable at this time.
In the Log> System Events> Notifications the system does not complain at all. Each time I run a test it always comes back saying "Status sending EXE:Ok". However, I still do not receive any notifications, and I am still unable to get the PRTG Demo Powershell script to work.
Is there any other ways to further troubleshoot it? I have thought about possibly trying to see if I can call the Powershell script from within a batch script, but I don't know how the parameter passing with hold up. Perhaps I will see if I can get a batch file to execute.
Thank you
Jan, 2012 - Permalink
Well, have you tried running the PRTG Core Service under an admin account? Also, do you make sure that full paths are used in the powershell file? And also that it does not open any windowed application or is not a windowed application itself, this is not possible as PRTG runs as a service?
Jan, 2012 - Permalink
Hello,
I thought that I had read that you no longer need to run the "PRTG Core Service" as an Admin account because the ability to run the script as another user will be provided from within PRTG itself? Perhaps I misinterpreted this!
The Powershell script does not call on any other applications and does not attempt to open any new Windows. But even if it did, this does not explain why the Demo PRTG Powershell script does not work.
I will look at changing the account that the "PRTG Core Service" runs under.
thank you
Jan, 2012 - Permalink
Hi,
I have tested running the "PRTG Core Service" as a Domain account that has administrative privileges on the system. Unfortunately it still yields the same results. The Execute Program option never actually triggers the program.
I have come up with a work around method that works for us. I discovered that PRTG can send plain text emails. I modified it with a custom message that meets the criteria we require and then send the email to the cell phone. ie. cellnumber@provider.com
Message comes in with no issue.
Thank you
Jan, 2012 - Permalink
Hello,
have you tried the tips from the following article (even though it's about batch-files, the tips are generally helpful with script/exe-notifications): How can I execute a batch file as notification?
best regards.
Jan, 2012 - Permalink