Graylog v3.1.4 on Centos.
Logs (our own log data) from NXLog/GELF on Windows
graylog-plugin-slack-3.1.0-1.noarch.rpm
I’m trying to get only the log-line displayed in the slack notification. I can only achieve this in the backlog using ${message.message}. I need to get the notification immediately (I may misunderstand the way the backlog works though… )
There also appears to be a limit of 64 chars for the log-line message, even in the dashboard - I can’t believe this, what am I missing?
Finally, I’d like the slack notification to include a permalink to the item. All I can find in Google is that it wasn’t possible 2 yrs ago! Has this changed?
Thanks Jesse, that looks good. However, I can’t figure out what the backlog actually is! (can’t find any documentation). I’m after the simple situation of
Input received that matches the event definition
(Slack) notification sent which I think must include backlog message to get the full message contents.
I have yet to find a config that does this, I’m sure it’s possible as it’s the basic scenario really. I’m getting notifications with no backlog.
In your original message you stated that you’re using the backlog to include ${message.message} in your notification so, I am not sure what the issue is now?
If you could provide more info, that’d be great - Alert definition and notification configurations (Private info redacted, ofc.)
Sorry, not explaining myself very well… What defines when a single message is sent and when multiple messages are sent in one go - does a backlog require more than one message, or can it include just one - which is what I’m after - in which case how can I get an empty backlog?
The backlog and grace period for your alerts are configured in your alert definition.
If you do not want a backlog, don’t enable it.
If you want a single message in the backlog, enable it and set it to 1.
If you want multiple messages, enable backlog and specify however many you want.
The same principle applies to the grace period.
Alert definitions and notifications are stored within MongoDB, using the web interface is the best (and only supported) method for configuring the alerts. (Excluding interacting with the API directly!)
The above alert notification has no grace period so, every time a message matches the criteria, an alert should be triggered.
The backlog is enabled and set to include 1 message.
If I’m reading the thread correctly, this is what you’re attempting to achieve?
I’m getting 'com.floreysoft.jmte.message.ParseException: Error while parsing ‘message.index’ at location (5:4): Property ‘index’ on object ‘source:xxxxxxx’ so it doesn’t look like that permalink solution will work for some reason.
I’ve been using Exec $short_message = $raw_event; in my nxlog configuration.
As for your notification, looks like you have some additional curly-braces - Unsure if that is what is causing your issue but, I do know that they’re not required.