workflow to check if the servers are running or down | Adobe Higher Education
Skip to main content
Level 2
January 21, 2020
解決済み

workflow to check if the servers are running or down

  • January 21, 2020
  • 4 の返信
  • 12042 ビュー

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.

このトピックへの返信は締め切られました。
ベストアンサー adithyacs86

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

4 の返信

adithyacs86
Level 5
January 21, 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

rajAdobeDev作成者
Level 2
January 24, 2020
Hi,
Florian_Courgey
Level 4
January 21, 2020

Hi,

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

 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:

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

Manoj_Kumar
Community Advisor
Community Advisor
January 22, 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

 

 

Manoj     Find me on LinkedIn
rajAdobeDev作成者
Level 2
January 24, 2020
Hi, Through JS Activity, Could you please provide any working example. So that i can try on my end and test.
Florian_Courgey
Level 4
January 22, 2020

Hey Raj,

 

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

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:

 

 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

rajAdobeDev作成者
Level 2
January 24, 2020
Hi, I see it is though Explicit URL, Can an provide example for External Account also.