Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

workflow to check if the servers are running or down

Avatar

Avatar
Level 1
rajAdobeDev
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
rajAdobeDev
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile
rajAdobeDev
Level 1

21-01-2020

Hi,

 

How do i check other servers which are connecting through remote desk top
Eg :
firstServer.aws.cloud.epsilon
secndServer.aws.cloud.epsilon

 

I need a workflow(JS Activity) to check if the above servers are running or down?
please help on that

 

Regards,
Raj.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 5
Level 3
adithyacs86
Level 3

Likes

22 likes

Total Posts

107 posts

Correct Reply

5 solutions
Top badges earned
Affirm 5
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Affirm 5
Level 3
adithyacs86
Level 3

Likes

22 likes

Total Posts

107 posts

Correct Reply

5 solutions
Top badges earned
Affirm 5
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
adithyacs86
Level 3

21-01-2020

Hi Raj, 

 

I am sorry if i understand your question correctly, do you want to test if the servers are up and running from AC?

or if you want to establish the connection to remote servers. 

Looking at the server details you provided, it is AWS machines, through an external account you can get the connection established once you have the proper credentials.

 

Let me know if this was helpful. 

 

Thanks,
Adithya

Answers (3)

Answers (3)

Avatar

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct Reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct Reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile
Florian_Courgey
MVP

22-01-2020

Hey Raj,

 

With some JS you can run checks if servers are running:

20200121-172548-screenshot-31.jpg

Init code:

instance.vars.i = 0;

 

Advanced Javascript code (containing 2 transitions: "continue" and "end":

var array = [
  'https://www.google.com/',
  'https://blog.floriancourgey.com',
  'https://yahoo.com', // returns an HTTP 302 code
];

if(instance.vars.i >= array.length){
  task.postEvent(task.transitionByName('end'));
  return;
}

instance.vars.website = array[instance.vars.i];
instance.vars.i++;
task.postEvent(task.transitionByName('continue'));

 

Download config:

20200121-172829-screenshot-32.jpg

 

 Note: in the Adavanced parameters, you may allow 302 HTTP codes not to trigger an error.

 

 

The above results in the following log:

Starting workflow (operator 'Florian Courgey ()')
httpTransfer Starting transfer of 'https://www.google.com/' to 'www_20200121162521a.google.com.html'
httpTransfer Starting transfer of 'https://blog.floriancourgey.com/' to 'blog_20200121162522a.floriancourgey.com.html'
httpTransfer Starting transfer of 'https://yahoo.com/' to 'yahoo_20200121162522a.com.html'
Workflow finished

 

Best regards

Florian

Avatar

Avatar
Validate 1
MVP
_Manoj_Kumar
MVP

Likes

104 likes

Total Posts

301 posts

Correct Reply

97 solutions
Top badges earned
Validate 1
Contributor
Ignite 1
Shape 1
Give Back 5
View profile

Avatar
Validate 1
MVP
_Manoj_Kumar
MVP

Likes

104 likes

Total Posts

301 posts

Correct Reply

97 solutions
Top badges earned
Validate 1
Contributor
Ignite 1
Shape 1
Give Back 5
View profile
_Manoj_Kumar
MVP

22-01-2020

Hello Raj,

 

There are different ways to check if a server is up of running. If you want to check it with adobe campaign.

 

You can create the workflow and add a JS activity which will ping the server and get a response if the response is 503 then you can send yourself an alert  saying which server is down.

 

The other way is to use services like Pingdom and httpstatus.

 

Let me know if that helps.

 

Thanks,

Manoj

 

 

Avatar

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct Reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile

Avatar
Springboard
MVP
Florian_Courgey
MVP

Likes

93 likes

Total Posts

87 posts

Correct Reply

19 solutions
Top badges earned
Springboard
Validate 1
Establish
Contributor
Ignite 1
View profile
Florian_Courgey
MVP

21-01-2020

Hi,

You can use some JS and a Web Download activity in a loop:

20200121-172548-screenshot-31.jpg

 The init contains:

 

instance.vars.i = 0;

 

The Advanced JS contains:

 

var array = [
  'https://www.google.com/',
  'https://yahoo.com',
  'https://blog.floriancourgey.com',
];
if(instance.vars.i >= array.length){
  task.postEvent(task.transitionByName('end'));
  return;
}
instance.vars.website = array[instance.vars.i];
instance.vars.i++;
task.postEvent(task.transitionByName('continue'));

 

with 2 transitions "continue" and "end".

 

Web download activity details:

20200121-172829-screenshot-32.jpg

This results in the following log:

 

Starting workflow (operator 'Florian Courgey (fcourgey)')
httpTransfer	Starting transfer of 'https://www.google.com/' to 'www_20200121162521a.google.com.html'
httpTransfer	Starting transfer of 'https://yahoo.com/' to 'yahoo_20200121162522a.com.html'
httpTransfer	Starting transfer of 'https://blog.floriancourgey.com/' to 'blog_20200121162522a.floriancourgey.com.html'
Workflow finished

 

Any error (HTTP code different from "200") will trigger the Alert.

 

Replace the Start with a Scheduler and you're all set.

 

Please let me know if it works for you

Best

Sources:

- loop in a workflow

- advanced js transitions explanation

- original topic in a comment by Raj Shekar