Hi Experts,
Is there any way to export events in obm and sending them over email in scheduled way cuz the customer asked for that and we see the options are limited for that so anyone did that before?
Cybersecurity
DevOps Cloud
IT Operations Cloud
If an answer to your question is correct, click on "Verify Answer" under the "More" button. The answer will now appear with a checkmark. Please be sure to always mark answers that resolve your issue as verified. Your fellow Community members will appreciate it!  Learn more
Hi Experts,
Is there any way to export events in obm and sending them over email in scheduled way cuz the customer asked for that and we see the options are limited for that so anyone did that before?
Hello,
Really depends what you want to do. This is a very basic example which you can change to meet your requirements:
#!/bin/bash
> /tmp/event_data.xml
/opt/HP/BSM/opr/support/opr-export-events.sh -user admin -password * -o /tmp/event_data.xml -q "query=severity EQ 'critical'" -v -format
xmllint --format /tmp/event_data.xml | mailx -s "OBM Report for $(date)" -r "obm@company.com" "joe@myco.corp.net"
exit 0
- opr-export-events exports events based on a simple query. Please see query syntax example for opr-export-events and https://docs.microfocus.com/doc/Operations_Bridge_Manager/24.2/Clioprexportevents for more examples around how to build your query.
- xmllint formats the xml into something that can be read. See https://www.baeldung.com/linux/xmllint for more details about how you can get this to format your xml
- mailx is a unix email command. There are many other tools that do the same thing.
You can also process historical events which have been downloaded.
I hope you get a better answer.
Another option is to forward the events to email as they are processed by OBM, either via Notifications rules or event forwarding to Connected Server (with groovy script to send emails).
ok if i will send with notifications, how i sent all events like 1000 events in one notification because each event is sent over one email alert in normal case
Really depends what you want to do. Looks like you have a few options now. https://docs.microfocus.com/doc/Operations_Bridge_Manager/24.2/Clioprexportevents will allow you to get multiple events as described.
We did similar for a customer for compliance purposes.
A cron scheduled local script with following: