I am facing one scenario. Let assume I have 3 events A, B and C which I am passing to Riemann.
Event A have following fields
:ExamNo 3890
:ExamResult Pass
:Rank 8
Event B have following fields
:ExamNo 3890
:ExamResult Pass
:Rank 5
Event C have following fields
:ExamNo 3890
:ExamResult Fail
:Rank 0
I need to compare the events based on ExamNo and whenver there is a change in ExamResult I need to add a new fields to event {:Eligible, :Grade}. I wrote the code to compare the events but the new field was not getting added to the event.
(let [examindex (default :ttl 300 (update-index (index)))]
(streams
prn
examindex))
(streams
(where (service "Result")
(smap
(fn [events]
(by[:ExamNo]
(changed :ExamResult))
(event
{ :Eligible :Eligible-Status
:Grade :GradeValue
}
)))))
Since I am newbie to Riemann . I couldn't figure out the issue.