I want to be able to use the "Execute Script" action to run a command on a remote Linux server, something equivalent to: ssh xxxx@xxx.com "systemctl status tomcat8-instance1" I have tested this from a terminal and it works, but I cannot make the "Execute Script" work. I have tried a couple of commands but when I try to test it the program hangs for a couple of minutes "Configure Monitor Script (Not Responding)" and then returns with: "Failed to send the request to the service. Error Details: [async timeout][response=Timed out waiting for response]" I did configure the security credentials asked 22 Nov '18, 06:36 run66 |
Same problem using version 7.1.1.54 Target was to a cisco router (catalyst 2960) SSH credentials configured in the device I placed in the script the following commands: conf t int gi2/0/4 shut as seen above, just a linebreak between commands and no quotation marks :( answered 27 Nov '18, 14:33 alejnadro |
Hi runn66, The first thing to check is to make sure that you have the correct credentials added for the Linux server. Right click on the server and select Type & Credentials > Set Compute/Device Type. In this menu make sure that you have SSH selected and then click on the button to the right to add creds for the server. When you have the creds added then turn on Debug Logging and Data Logging. To do this go to Settings > System Settings. Then check the two boxes called Enable Debug Logging and Enable Data Logging. Once you have this done, run your script monitor and the information that is sent and received by the service will be recorded in the service log file. Open you service log file and Look for "SSH", you will be able to see what was sent by your monitor and what was received including any errors. 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 27 Nov '18, 16:42 Quinn ♦♦ |
Hi Quinn Ok - So here's the result of from the log:
Then after a couple of minutes I get a time out that looks like this:
What to make of this? Rune answered 11 Jan '19, 03:32 run66 |
Hi Rune, Have you tried adding a command after the systemctl command to see if it gets executed? Something like an echo would work. 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 11 Jan '19, 14:27 Quinn ♦♦ |