

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Retriving Hostname(related CI) in title category.
Hello ,
Is there anyway to pick related ci in my title category using groovy script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Do you mean to ask if it's possible to modify title/category event attributes with some attribute of a related CI (to which the event was resolved) in the EPI groovy script?
If so, the answer is positive. You will have to work with RTSM API in your groovy script to get access to the related CI attributes. Apparently your groovy script must be running in a EPI step AFTER CI resolution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank you for the help Dmitry Shevchenko. If possible Could you provide me the script. This is my existing script.
import java.util.List;
import com.hp.opr.api.scripting.Event;
class GroovyScriptSkeleton
{
def init()
{
}
def destroy()
{
}
def process(List<Event> events)
{
// Reuse following skeleton for processing events
try
{
// Example: Title of all events are prefixed with "Modified by CA/EPI: "
//
// events.each {
// event -> event.setTitle("Modified by CA/EPI: " + event.getTitle())
//
// always include following check for each event
// if(Thread.interrupted())
// throw new InterruptedException()
// }
}
catch(InterruptedException e)
{
return
}
}
}