Flow Designer Action in SSH step. How to communicate between MID Servers

Sato3
Tera Contributor

Should I follow such a Flow Step to communicate between MID Servers using the Flow Designer Action in SSH step?

What I want to achieve is when MID Server A is in the Up state and MID Server B is in the Down state, MID Server A passes an SSH command (./start.sh) to MID Server B to restart it.

 

Best regards

1 ACCEPTED SOLUTION

Scripts in ServiceNow is able to execute the command on the running MID Server. That is, script will execute a command on the running MID server that will in turn ssh to the other server to execute the command.

View solution in original post

18 REPLIES 18

So, there are 2 MID servers and one of them is running? I thought the question was what to do when both MID server are down? If one MID server is running, there's no need to start another MID server up.

Flow Designer is used to execute "business flows" and not an infrastructure workflow engine . There's a need to have a separate infrastructure monitoring tool that will start the infrastructure services up when it goes down. ServiceNow is able to collect logs from these services to record activities.

Hi, @Hitoshi Ozawa 

 

>>>So, there are 2 MID servers and one of them is running?

Yes.

I think it's rare for two servers to go down at once, but if they both go down, I don't think they can be resolved within ServiceNow, even if they can be detected by ServiceNow. It's a different issue within Server, so I don't think it's necessary to take this into consideration.

 

This time, when one server is alive and the other server is dead, I want to use it to maintain compatibility from either of them.

Is there a good idea for MID Server A to communicate with MID Server B for that purpose?

Just write a script to ssh to the server and execute a command.

I'm using Python to ssh and execute commands on servers and network equipment. Most network equipment supports Python and it's better to keep it to 1 language so that's one of the reason to using Python.

However, I'm using an internal monitoring service to monitor and execute these scripts.

Hi, @Hitoshi Ozawa 

 

Do you need a script?

I thought I would just type a command into the Flow Action to SSH into the terminal, was that wrong?

 

So, I'm not sure how to SSH from MID Server A to MID Server B between terminals, but do you know if it's such a command?

Scripts in ServiceNow is able to execute the command on the running MID Server. That is, script will execute a command on the running MID server that will in turn ssh to the other server to execute the command.