I wrote an action script. It's very simple for the purposes of troubleshooting this issue, just a one liner. It's in powershell, and it just writes a single line to a log file, on the monitoring server. It doesn't contact the remote server or do anything, just yet. I can get it to fire using the test functionality, but only when I run the test against certain monitored servers. On others, my log file is not created. What would or could prevent this from working ? asked 07 Nov '17, 23:11 ala |
Hi ala, Can you provide the script that you are running in the Execute Script action? Also, Any details needed to test the script like what type of monitor are you attaching it to and when would the action be fired. Thanks Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer. answered 08 Nov '17, 11:45 Quinn ♦♦ hi, i put my own "answer" below as I ran out of characters in this comment, thanks
(08 Nov '17, 13:49)
ala
|
Hi This is not even attached to a monitor yet, and I was testing by running the "test" gui, although I also tried it out against a disk space monitor. Eventually I'd like to trigger it from another script based monitor that alerts on a performance counter value, once I can get past this functionality issue. The script is simply (for now, I have a much more lengthy script I'd eventually like to use, which I have proven works/doesn't work in the same fashion)
I've done alot of testing and this is my first effort at seeking support. My issue is that this script only works when I run the test 'against' certain servers.
thanks answered 08 Nov '17, 13:49 ala |
ala, I just tested your code by creating a new execute script action. I added the action to a disk space monitor of a server that is monitored by a satellite and then added the action to a webpage monitor that was monitored by the central service. Both worked as they should. The script (below) was to write output to a local file on the C: drive of the central service (c:templog.txt).
If you can supply more details about your monitoring of different servers and what the output was you can send that information to support@poweradmin.com Thanks Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer. answered 08 Nov '17, 15:17 Quinn ♦♦ |
I am having a similar issue, however; I have found it's due to calling additional installed modules on the server. I am unable to execute commands that come from PS Modules. Specifically, the AWSPowerShell module and a custom written module of our own design. The script will run flawlessly if executed outside of Server Monitor, but when run in the context of an execute script action, there is no indication of an issue, the script simply stops. To try and narrow things down, I have written logging steps, and everything is well and good until I call a function from another module. If I use "Import-Module", the action will not fire and there is still no indication of what the issue may be. answered 14 Nov '17, 16:10 TheSemicolon |