NetIQ Operations Center - Trigger Data Integrator Query via script

NetIQ Operations Center - Trigger Data Integrator Query via script

NetIQ Operations Center (NOC) has an great integration option called Data Integrator.  It is one of the most popular integrations (AKA: Adapter) our customers use.  In fact, many customers use multiple Data Integrator Adapters.  For more information on Operations Center Adapters, read this Blog

Anyways, within Data Integrator you have the ability to set up schedules to control when different parts of the integration run queries to update data in NOC.   Typically higher level things such as Application Names, Server Names, Data Centers, etc do not need to be updated frequently so you may set up the schedule to update those details every 10 minutes, 30 minutes, hourly, maybe only after hours.   For other data such as alarm type data such as a ping failure, or a help desk ticket being opened, you may want that query to run more often.

This blog is for those unique situations where you may want to have a pre-scheduled query time such as hourly, but based on some type of situation, event, etc you may want to force a particular query to run... NOW.   The good news is, there is a way to do this via scripting.   It is pretty straight forward, but I thought I'd lay out the basics of it within a blog.

Setting up the Schedule in Data Integrator: There really are only two things to keep in mind when setting up the schedule.  The first is to have a unique name for the schedule.  I recommend to have it not only unique with in that Data Integrator Definition, but it would be even more safe to have it unique across ALL Data Integrator definitions.   I set up an hourly schedule for my test so I was pretty sure that my script caused the query to run and not the actual schedule.   Secondly, when defining the schedule, you must click the checkbox near the bottom (turn on) titled: On a scripted event.  The last thing is kind of obvious, make sure you have redeployed the Definition after making schedule changes (Assumption is that you are using an existing Data Integrator Adapter to test this).


Script to force Schedule to run Now: The script that runs must be run on the server side.  If you want to test this, setup a Operations Definition that is "serverscript".   You should have some visual indicator that the query has run such as the alarm date/time updating or some status field that you update manually within the database between runs.

There are two options to kick off the script.  One option you pass in the name of the Adapter along with the Schedule Name.  The other one you just pass the Schedule Name.

Reminder, this is a server side scripting option:
formula.server.getIntegrationPlatform().getServerEventBus().fireUserEvent( 'bdi.schedule.' + 'myAdapter' + '.' + 'mySchedule' )

In the code above, you need to update the myAdapter to the name of your adapter and the mySchedule with the name of the schedule associated to the query.

The option below is the same, but you only need to pass the Schedule Name.
formula.server.getIntegrationPlatform().getServerEventBus().fireUserEvent('bdi.schedule.' + 'mySchedule' )

That's pretty much it.   I put a try/catch block around it and put in bad schedule names and it did not throw an exception, so it appears to either work... or not.

There are probably a bunch of different reasons you may need to do something like this and I didn't feel it was worth telling a much longer story as a lead up.   As always, play with this in a development environment and not on production.

- Tobin
Labels (1)


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
8 of 8
Last update:
‎2020-01-22 22:47
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.