Highlighted
Super Contributor.
Super Contributor.
412 views

Startup and heartbeats

Regarding heartbeats

Hi,

I have a loopback driver, which is supposed to execute something at the publisher channels heartbeat intervals.
The issue that I am having, is that the heartbeat first time is seen once the interval is up (currently after 120 minutes).

I would very much like the driver to do the first processing right after the driver has started.

I tried to generate a status event in the driver startup policy.

It seems to be swallowed before it hits the itp.
Can someone tell me the correct approach?

A convenientt level 3 trace (of the disappearing status event) is here:



LB-NXR01 PT:Applying policy: %+C%14CAdd Status%-C.
LB-NXR01 PT: Applying to status #1.
LB-NXR01 PT: Evaluating selection criteria for rule 'Add Status Event'.
LB-NXR01 PT: Rule selected.
LB-NXR01 PT: Applying rule 'Add Status Event'.
LB-NXR01 PT: Action: do-status(level="success","CUSTOM").
LB-NXR01 PT: arg-string("CUSTOM")
LB-NXR01 PT: token-text("CUSTOM")
LB-NXR01 PT: Arg Value: "CUSTOM".
LB-NXR01 PT:
DirXML Log Event -------------------
Driver: \FMKMETA\dk\services\idm\Driver Set\LB-NEXUSRoles01
Channel: Publisher
Status: Success
Message: CUSTOM
LB-NXR01 PT:Policy returned:
LB-NXR01 PT:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.5.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<status level="success" type="startup"/>
</input>
</nds>
LB-NXR01 PT:Startup policies completed execution. Starting cache processing.
LB-NXR01 ST:Submitting identification query to subscriber shim:
LB-NXR01 ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.5.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<query event-id="query-driver-ident" scope="entry">
<search-class class-name="__driver_identification_class__"/>
<read-attr/>
</query>
</input>
</nds>
Labels (1)
0 Likes
5 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: Startup and heartbeats

6525036;2484805 wrote:
Regarding heartbeats

Hi,

I have a loopback driver, which is supposed to execute something at the publisher channels heartbeat intervals.
The issue that I am having, is that the heartbeat first time is seen once the interval is up (currently after 120 minutes).

I would very much like the driver to do the first processing right after the driver has started.

I tried to generate a status event in the driver startup policy.

It seems to be swallowed before it hits the itp.
Can someone tell me the correct approach?

A convenientt level 3 trace (of the disappearing status event) is here:



LB-NXR01 PT:Applying policy: %+C%14CAdd Status%-C.
LB-NXR01 PT: Applying to status #1.
LB-NXR01 PT: Evaluating selection criteria for rule 'Add Status Event'.
LB-NXR01 PT: Rule selected.
LB-NXR01 PT: Applying rule 'Add Status Event'.
LB-NXR01 PT: Action: do-status(level="success","CUSTOM").
LB-NXR01 PT: arg-string("CUSTOM")
LB-NXR01 PT: token-text("CUSTOM")
LB-NXR01 PT: Arg Value: "CUSTOM".
LB-NXR01 PT:
DirXML Log Event -------------------
Driver: \FMKMETA\dk\services\idm\Driver Set\LB-NEXUSRoles01
Channel: Publisher
Status: Success
Message: CUSTOM
LB-NXR01 PT:Policy returned:
LB-NXR01 PT:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.5.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<status level="success" type="startup"/>
</input>
</nds>
LB-NXR01 PT:Startup policies completed execution. Starting cache processing.
LB-NXR01 ST:Submitting identification query to subscriber shim:
LB-NXR01 ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.5.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<query event-id="query-driver-ident" scope="entry">
<search-class class-name="__driver_identification_class__"/>
<read-attr/>
</query>
</input>
</nds>


I'm pretty sure that's by design. Startup is intended to initialize things internal to the driver config (driver scope variables, etc.) that other policies are going to need. I don't think it's intended that anything done in Startup is going to be seen by the Subscriber or Publisher channel policies.
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Startup and heartbeats

dgersic;2484823 wrote:
I'm pretty sure that's by design. Startup is intended to initialize things internal to the driver config (driver scope variables, etc.) that other policies are going to need. I don't think it's intended that anything done in Startup is going to be seen by the Subscriber or Publisher channel policies.


Thank you.
Does anyone have an idea about an approach to start with something "heartbeat" like?

The reason for asking this is that I figured I could use the initital query

<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.5.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<query event-id="query-driver-ident" scope="entry">
<search-class class-name="__driver_identification_class__"/>
<read-attr/>
</query>
</input>
</nds>


And just put extra events on that.
Like this

<nds dtdversion="4.0">
<source>
<product instance="LB-NEXUSRoles01" version="4.5.5.0">DirXML Loopback Driver</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<query event-id="loopback-driver-capabilities-query">
<search-class class-name="__driver_identification_class__"/>
</query>
<add class-name="NEXUSRole" src-dn="691" src-entry-id="691" when="after">
<association>691</association>
<add-attr attr-name="id">
<value>691</value>
</add-attr>
<add-attr attr-name="name">
<value>Dommedagsprofet</value>
</add-attr>
<add-attr attr-name="_organisationId">
<value>3</value>
</add-attr>
<add-attr attr-name="active">
<value>true</value>
</add-attr>
</add>
<add class-name="NEXUSRole" src-dn="2064" src-entry-id="2064" when="after">
<association>2064</association>
<add-attr attr-name="id">
<value>2064</value>
</add-attr>
<add-attr attr-name="name">
<value>Numismatiker</value>
</add-attr>
<add-attr attr-name="_organisationId">
<value>3</value>
</add-attr>
<add-attr attr-name="active">
<value>true</value>
</add-attr>
</add>
</input>
</nds>


The issue that I am having with this approach is that once we are through the SMP and into the SMP, what I see is a "-9182 Unsupported operation" error. This unsupported operation does not occur, of I do this in a status event (heartbeat).

LB-NXROLES01 ST:Applying schema mapping policies to input.
LB-NXROLES01 ST:Applying policy: %+C%14CSMP%-C.
LB-NXROLES01 ST: No mapping for class-name '__driver_identification_class__'.
LB-NXROLES01 ST: Mapping class-name 'NEXUSRole' to 'Group'.
LB-NXROLES01 ST: Mapping class-name 'NEXUSRole' to 'Group'.
LB-NXROLES01 ST: Mapping attr-name 'id' to 'XATTRIBNexusId'.
LB-NXROLES01 ST: Mapping attr-name 'name' to 'Description'.
LB-NXROLES01 ST: Mapping attr-name '_organisationId' to 'XATTRIBNexusParentId'.
LB-NXROLES01 ST: Mapping attr-name 'active' to 'XATTRIBActive'.
LB-NXROLES01 ST: Mapping attr-name 'id' to 'XATTRIBNexusId'.
LB-NXROLES01 ST: Mapping attr-name 'name' to 'Description'.
LB-NXROLES01 ST: Mapping attr-name '_organisationId' to 'XATTRIBNexusParentId'.
LB-NXROLES01 ST: Mapping attr-name 'active' to 'XATTRIBActive'.
LB-NXROLES01 ST:Resolving association references.
LB-NXROLES01 ST:Pumping XDS to eDirectory.
LB-NXROLES01 ST:Performing operation query for .
LB-NXROLES01 ST:Performing operation add for .
LB-NXROLES01 ST:Performing operation add for .
LB-NXROLES01 ST:Fixing up association references.
LB-NXROLES01 ST:Applying schema mapping policies to output.
LB-NXROLES01 ST:Applying policy: %+C%14CSMP%-C.
LB-NXROLES01 ST: No mapping for class-name '__driver_identification_class__'.
LB-NXROLES01 ST:No output transformation policies.
LB-NXROLES01 ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.5.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<output>
<instance class-name="__driver_identification_class__" event-id="loopback-driver-capabilities-query">
<attr attr-name="driver-id">
<value type="string">DirXML</value>
</attr>
<attr attr-name="driver-version">
<value type="string">4.5.5.0</value>
</attr>
<attr attr-name="query-ex-supported">
<value type="state">true</value>
</attr>
</instance>
<status event-id="loopback-driver-capabilities-query" level="success"></status>
<status level="error">Code(-9182) Unsupported operation: <add>.</status>
<status level="error">Code(-9182) Unsupported operation: <add>.</status>
</output>
</nds>


So my "real" question is, how do I "fire" a heartbeat like event, when the driver starts, so that I can begin processing right away, instead of waiting for the first heartbeat?
Or is there anything else I can do to get the driver to process right away (on the publisher)
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Startup and heartbeats

Maybe set your heartbeat timer lower, so it happens sooner. Then manage the times yourself, see Lothar's notify driver for examples.
0 Likes
Super Contributor.
Super Contributor.

Re: Startup and heartbeats

Thank you. I will try to find Lothar's notify driver and have a look.
0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Startup and heartbeats

On 7/30/2018 9:54 AM, 6525036 wrote:
>
> Thank you. I will try to find Lothar's notify driver and have a look.
>
>


https://www.brummelhook.com/

He has a Repo and a download on teh dirxml tab of that page.

0 Likes
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.