my name is Oliver Lemke and I am working for BMC Customer Support. I would think that this kind of question should rather be directed to Customer Support than to the community, especially, if something is not working as expected. So if the following does not address your request, please raise a Support Case. Thank you.
The "closure event" you are looking for can be configured in an Event Action Pipeline" as the "Clear Action". The "Clear Action" gets executed, if an event condition, that previously was true (and so triggered the "Action") became false again.
Thies page in the documentation may be a good starting point for further information on this subject:
Not sure if this is still an issue for you. Note that I am running on version 8.0.01 of TSMM and am unaware of the details of your installation.
I wasn’t able to recreate your issue without explicitly changing my event template. As such, I will start with showing the successful event template. This is the OOTB agentUnavailable_BEM event template. The important part to notice is that it has both an Action:
And a Clear Action:
In this case, the action is the same: BEM_Generic. BEM_Generic uses a perl script to record the state of the object being evented on, so when it executes originally, it sends the original event stating the agent is down. The Clear Action occurs when the trigger is no longer satisfied. In this case BEM_Generic sends the new property value of the object as well as information indicating that the event is cleared. This is translated in TSOM to close the event.
So here, I go to services to turn off the Extensible agent:
Notice I have only open events selected, and here I can see the agentUnavailable event appear at the bottom of the list:
Now I go and stop the service and look at what events have closed. Looking at only the closed events, I now see the agentUnavailable event was closed.
All BEM events must have a Clear Action if you require the original events to be closed. If you’ve altered the BEM_Generic script, have excluded the Clear Action, or if your ProactiveNet Service isn’t running, your initial event may not be updated when the event is cleared in TSMM.
For troubleshooting, you can check in TSMM to see if the Clear Action went through on the TSMM side. To do this, go to Tools->Show Event Journal… and you can filter by the time you tested the event and the substring “BEM_Agent”. This will bring up the event you are looking for; since it sent a record to TSOM, you should at least have the initial event action performed. In my case, both the action was performed as well as the clear action:
Notice the last column details whether the Action or Clear Action was performed.
Hope this helps!