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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Get monitor report on email

Milan_Vucetic
Community Advisor
Community Advisor

Hi all,

Adobe Campaign offers a nice health report on https://your-domain/nl/jsp/monitor.jsp address.

In case you want this report to be sent on your email address, this is one of the ways how to do it.

Milan_Vucetic_0-1600374521305.png

In JavaScript node paste the following lines (adjust bold text):

 

function getToken(url, username, password) {

var cnx = new HttpSoapConnection(url);
var session = new SoapService(cnx, 'urn:xtk:session');

session.addMethod("Logon", "xtk:session#Logon",
["sessiontoken", "string", "Login", "string", "Password", "string", "Parameters", "NLElement"],
["sessionToken", "string", "sessionInfo", "NLElement", "securityToken", "string"]);

var res = session.Logon("", username, password, <param/>);
var token = res[0];
var securityToken = res[2];

return {
token: token,
securityToken: securityToken
};
}

function executeSOAPRequest(method, url, body) {
var request = new HttpClientRequest(url);
request.header["cookie"] = "__sessiontoken=" + tokens.token;
request.header["Content-Type"] = "text/xml; charset=utf-8";
request.header["SOAPAction"] = "xtk:session#Logon";
request.method = method;
request.body = body;
request.execute();
var response = request.response.body;
return response;
}


var url = 'https://your-domain/nl/jsp/soaprouter.jsp';
var tokens = getToken(url ,AC-username, AC-password);
instance.vars.status = executeSOAPRequest("GET", "https://your-domain/nl/jsp/monitor.jsp", "");

 

In alert node just define your email address and put the following line in the body:

<%= instance.vars.status %>

 

Finally, check if these url endpoints are whitelisted in you serverConf.xml on app servers.

 

P.S. You may crypt username and password as anyone can check workflow.

 

Regards,

Milan

0 Replies