I have created an extractor using “split and index” whereby the message time stamp is split up into the date and then the time. (At the moment I am just trying to display the time). I saved this into a field called timestamp, but I am unable to call this message in a notification. (the split works fine in the extraction tool)
I have tried the following lines but it will not display, I just get the error shown below:
The Graylog server encountered an error while trying to send an email. This is the detailed error message: com.floreysoft.jmte.message.ParseException: Error while parsing ‘message.timestamp.date_syslog’ at location (14:9): Property ‘date_syslog’ on object ‘2017-10-21T19:28:19.606Z’ can not be accessed: “java.lang.NoSuchFieldException: date_syslog”!
Its a syslog message that contains no timestamp in the actual message, but I noticed when I open the message graylog adds a timestamp. How do I reference this timestamp in a notification?
Either ${message.timestamp} (because it’s a special field like message and source) or ${message.fields.timestamp} (if you want to stay consistent with field access to other message fields).
I created a extractor based on time stamp (split and index) and was able to get this information seperated, but I don’t know how to reference it in the template