Introduction

The aim of this Action example is, to provide the recipient of an alert as much information as possible. Based on the template expressions GreenLight offers out of the box, you can build different styles pretty easy.
By using below example in combination with our newly available Linux Shell Script action, you could easily provide a bunch of parameters to further backend systems (Ticketsystem, etc.)

Example

Configuration

The following example will notify you with further information of the faulting server.
In order to retrieve this information during an alert, you need to make sure that you have entered Server specific information in the individual GL server config (Monitoring Configuration - Server Settings).

 

Example based on a SMTP action:

  • Add a SMTP action to one of your sensors
  • Specify the condition (e.g. trigger the notification if the server becomes unavailable)
  • Add the following text to the Text field

Severity: ${action.properties['com.panagenda.greenlight.notification.MESSAGE_TYPE']}
Time: ${gl:formatDate(sensorFireTime)}
Host: ${gl:commonName(config.nodeDefinition.name)}
Description:  ${config.nodeDefinition.properties['com.panagenda.greenlight.vimes.server.DESCRIPTION']}
Location: ${config.nodeDefinition.properties['com.panagenda.greenlight.LOCATION']}
Network Authority: ${config.nodeDefinition.networkAuthorityDefinition.name}

  • Optionally you can select “Send Status Reset Message”  and “Override Message Text” if you like.

The config should look like this

 

  • Specify the mail recipient and save/close the sensor

 

Whenever a server is unavailable the notification would look the following

GL frontent – pop up window:

 

e-mail notification:

 

Conclusion

By using some of the available expression templates, one can build a more sophisticated alert notification.