Graylog2 / Graylog2/graylog2-server
getTriggeredCondition().getDescription() returns title instead of description
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
## Expected Behavior
I expect the getTriggeredCondition().getDescription() method to return the description of the event definition, but instead it returns the title, just as getTitle() does.
## Current Behavior
getTriggeredCondition().getDescription() returns the exact same thing as getTitle(), i.e. the title.
## Possible Solution
(very unfamiliar with Java, haven't been able to dig into the code that far)
## Steps to Reproduce (for bugs)
There are surely other ways to reproduce this issue, but this is what I do: (my way obviously requires an opsgenie subscription etc)
1. git clone the opsgenie graylog notification plugin (https://github.com/opsgenie/opsgenie-graylog-plugin)
2. in /src/main/java/com/opsgenie/plugin/graylog/OpsGenieGraylogClient.java, the description string is built on line 125
3. I edit the string to contain the methods in question
```
.append("Event title: ").append(checkResult.getTriggeredCondition().getTitle()).append("\n")
.append("Event description: ").append(checkResult.getTriggeredCondition().getDescription()).append("\n")
```
4. Build and install the plugin.
5. Trigger an event. This results in a description in opsgenie as follows:
```
Event title: Andreas testing OpsGenie
Event description: Andreas testing OpsGenie
```
6. However it should be:
```
Event title: Andreas testing OpsGenie
Event description: This is a description
```
as that is what is configured in the event definition in graylog.
## Context
I'm ultimately trying to get the description of the event to be sent to OpsGenie, so I can provide context information regarding the defined event to the user that is tasked with solving the particular problem.
## Your Environment
* Graylog Version: 3.3.2 (also tested in 3.1.2, same behaviour)
* Elasticsearch Version: 6.8.5
* MongoDB Version: 4.0.10
* Operating System: Debian 10
* Browser version: Safari 13.1.1
Contributor guide
Assessment
This issue has not been assessed yet.