Active Monitoring JumpStart Guide
This guide is designed to get you a basic active monitoring system that is useful without going through the different parts of the documentation. At the end of this walk through you will find links to relevant topics for each step, should you wish to customize the setup.
Process Flow
- Setup SMTP Credential.
- Setup SMTP Connection.
- Create E-mail Alert Gateway.
- Create Alert Escalation.
- Create Ad Hoc Alert Source.
- Create a Process Alert Source.
Setup SMTP Credential
Create a credential to authenticate to the SMTP server. Only required if your SMTP server requires authentication.
- Navigate to Security > Credentials.
- Choose New Credential from the context-menu.
- Choose
smtp
Protocol. - Fill the SMTP username into the Real User, usually your e-mail address.
- Fill the password and confirm the password in the Password and Retype.
- Enter the FQDN of the SMTP server into the Endpoint field.
Setup SMTP Connection
To send e-mail, the system needs an SMTP server connection.
- Create registry entries
/configuration/jcs/Mail/Server
,/configuration/jcs/Mail/From
,/configuration/jcs/Mail/Port
:- Navigate to Configuration > Registry, choose New > Registry by path from the context-menu of configuration.
- Copy-paste
/configuration/jcs/Mail/Server
in the Path field and the FQDN of your SMTP server in the Value field, example:smtp.company.com
. If you previously created an SMTP credential, it must the Endpoint of the credential, choose Ok. - Copy-paste
/configuration/jcs/Mail/From
in the Path field and an e-mail address in the Value field, example:notifications@company.com
, choose Ok. - Copy-paste
/configuration/jcs/Mail/Port
in the Path field and your SMTP port in the Value field, example:25
, choose Ok.
- Send an and check you received it.
- Navigate to Definitions > Processes, fill System_Mail_Send into the Search box, locate System_Mail_Send and select Submit from the context-menu.
- Fill your e-mail address into the To field,
Testing SMTP
in the Subject field, andHello World!
into the Text field. - Choose Submit and Submit once more to send the e-mail.
- If you received the e-mail, you have correctly set up e-mail sending and may proceed to setting up an Email Alert Gateway.
Create E-mail Alert Gateway
- Navigate to Alerting > Email Alert Gateway.
- Choose New e-mail alert gateway from the context-menu.
- Fill
CatchAll
into the Name field,*@company.com
into the Address Pattern field, and99
into the Processing Order fields. Note that any existing e-mail alert gateways with a lower processing order will override this one. - Choose Save & Close.
Create Alert Escalation
- Navigate to Alerting > Alert Escalations.
- Choose New alert escalation from the context-menu.
- Fill
SimpleEscalation
into the Name field. - Choose Save & Close.
Create Ad Hoc Alert Source
- Navigate to Alerting > Ad Hoc Alert Source.
- Choose New ad hoc alert source from the context-menu.
- Fill
SimpleAdHoc
into the Name field. - In the Sent to field, fill your e-mail address (example:
user@company.com
) into the Address field andSimpleEscalation
into the Default Alert Escalation field. - Choose Save & Close.
Test Ad Hoc Alerts
- Navigate to Definitions > Processes, fill System_Alert_Send into the Search box, locate System_Alert_Send and select Submit from the context-menu.
- Select
SimpleAdHoc
in the Alert Source field, fillHello World!
into the Data field. - Choose Submit and Submit once more to send the e-mail.
- If you received the e-mail with Acknowledge in the e-mail body, you can improve the e-mail.
Improve Ad Hoc Alert E-Mail
- Navigate to Alerting > Ah Hoc Alert Source
- Locate SimpleAdHoc, choose Duplicate from the context-menu.
- Change the Name field to SimpleAdHocEmail
- On the Alert Source Email tab, choose Add.
- Paste the below HTML into the Body field.
- Choose Save & Close
<html>
<head><title>Email</title></head>
<body>
<p>Hello colleague,<br />
<br />An Ad hoc alert has been sent at [?=Time.now('Europe/Rome')?] with data:</br />.[?=data?].</p>
<h5>Links:</h5>
<ul>
[?if test="chainJobId != null && jobId != chainJobId"?]
[?if test="topLevelJobId != null && topLevelJobId != chainJobId"?]
<li>
<a
href="https://server/redwood/api-permalink/show?link-objecttype=Process&link-processid=[?=topLevelJobId?]">
alert parent chain</a></li>
[?endif?]
<li>
<a
href="https://server/redwood/api-permalink/show?link-objecttype=Process&link-processid=[?=chainJobId?]">
alert chain</a></li>
[?endif?]
<li>
<a
href="https://server/redwood/api-permalink/show?link-objecttype=Process&link-processid=[?=jobId?]">
alert process</a></li>
<li>
<a
href="https://server/redwood/api-permalink/show?link-objecttype=[?=alertSourceType?]&link-uniqueid=[?=alertSourceUniqueId?]">
alert source</a></li>
</ul>
<p>Regards,<br />IT</p>
</body>
</html>
Test SimpleAdHocEmail Ad Hoc Alert Source
- Navigate to Definitions > Processes, fill System_Alert_Send into the Search box, locate System_Alert_Send and select Submit from the context-menu.
- Select
SimpleAdHocEmail
in the Alert Source field, fillHello World!
into the Data field. - Choose Submit and Submit once more to send the e-mail.
- If you received the e-mail with links in in the e-mail body, you have completed the ad hoc alerting.
SimpleAdHocEmail Result
You have created a basic alerting system you can extend to actively monitor processes.
Create a Process Alert Source
- Navigate to Alerting > Process Alert Source.
- Choose New process alert source from the context-menu.
- Fill
CatchErrorProcess
into the Name field. - Fill
*Error*
into the Name field of the Raise an alert for definitions that match field, leave Match Type on GLOB Case Insensitive. - In the Sent to field, fill your e-mail address (example:
user@company.com
) into the Address field andSimpleEscalation
into the Default Alert Escalation field. - On the Statuses tab, choose status Error for the first.
- Choose Save & Close.
Test Process Alerts
- Navigate to Definitions > Processes.
- Choose New Process Definition, select RedwoodScript, and choose Next.
- Fill
ThrowError
into the Name field, and{throw new RuntimeException();}
into the Source field. - On the Process Control tab, select a Default Queue.
- On the Parameters tab, create a parameter named
MyParameter
with DirectionIn Out
and Default ExpressionHello world!
. - Choose Switch to Definition Studio, choose Save & Submit, notice the process reaches status
Error
. - If you received the e-mail with Acknowledge in the e-mail body, you can improve the e-mail, choose Save & Close.
Improve Process Alert E-Mail
- Navigate to Alerting > Process Alert Source.
- Locate CatchErrorProcess, choose Edit from the context-menu.
- Change the Name field to CatchErrorProcessEmail.
- On the Alert Source Email tab, choose Add.
- Paste the below HTML into the Body field.
- Choose Save & Close
<html>
<head><title>Email</title></head>
<body>
<p>Hello colleague,<br />
<br />A process alert has been sent at [?=Time.now('Europe/Rome')?] with MyParameter:</br />[?=parameters.MyParameter?]<br />${MyParameter}</p>
<ul>
<li>The name of the process definition of the process ${jobId} in status ${newStatus} is ${jobDefinition}</li>
<li>The owner of the process definition is ${jobDefinitionOwner}.</li>
[?if test="topLevelJobId != null && jobId != topLevelJobId"?]
<li>The ID of the highest parent ${topLevelJobId}.</li>
[?endif?]
<li>The owner of the process is ${jobOwner}.</li>
<li>The old status of the process is ${oldStatus} and new status of the process was ${newStatus}.</li>
<li>The input value of parameter 'MyParameter' is [?=parameters.MyParameter?] of the process, available in REL only. The value of the field must be prefixed with <code>=</code>, the only exception being the E-mail *Body* field.</li>
<li>The output value of parameter 'MyParameter' is [?=outParameters.MyParameter?] of the process, available in REL only. The value of the field must be prefixed with <code>=</code>, the only exception being the E-mail *Body* field.</li>
<li>The name of the queue of the highest parent process is ${topLevelQueue}</li>
<li>The status in the remote system is ${remoteStatus}</li>
<li>The return code of the process is ${returnCode}</li>
<li>The queue of the process is ${queue}</li>
</ul>
<h5>Links:</h5>
<ul>
[?if test="chainJobId != null && jobId != chainJobId"?]
[?if test="topLevelJobId != null && topLevelJobId != chainJobId"?]
<li><a
href="https://server/redwood/api-permalink/show?link-objecttype=Process&link-processid=[?=topLevelJobId?]">top-level chain with error process</a></li>
[?endif?]
<li><a
href="https://server/redwood/api-permalink/show?link-objecttype=Process&link-processid=[?=chainJobId?]">chain with error process</a></li>
[?endif?]
<li><a
href="https://server/redwood/api-permalink/show?link-objecttype=Process&link-processid=[?=jobId?]">Error process</a></li>
<li><a
href="https://server/redwood/api-permalink/show?link-objecttype=[?=alertSourceType?]&link-uniqueid=[?=alertSourceUniqueId?]">alert source</a></li>
</ul>
<p>Regards,<br />IT</p>
</body>
</html>