ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ACE 11.0.0.10 Dev: How do I add a Mon Profile to a Policy?

Post new topic  Reply to topic
 ACE 11.0.0.10 Dev: How do I add a Mon Profile to a Policy? « View previous topic :: View next topic » 
Author Message
john.ormerod
PostPosted: Thu Oct 29, 2020 7:32 am    Post subject: ACE 11.0.0.10 Dev: How do I add a Mon Profile to a Policy? Reply with quote

Apprentice

Joined: 14 Feb 2017
Posts: 49

[Using Win 10 Pro]
I am stuck trying to apply a Mon Profile to a msgflow in Toolkit

The 'manual' at: https://www.ibm.com/support/knowledgecenter/SSTTDS_11.0.0/com.ibm.etools.mft.doc/ac60382_.html states:
Quote:
When you create a monitoring profile, you must deploy it to a policy project and then activate it...

I've been going round in ever-increasing circles trying to find out how to deploy a Mon Profile to a policy project.

Everything I have found refers to the profile's 'name' - never the location of the monprofile.xml file itself.

One thing - The toolkit doesn't offer a Policy Type of 'Monitoring Profile', which I was expecting to find and assumed I would specify the location of the monprofile.xml file.

So... what type of Policy should be used?

More in hope than expectation, I tried the following mqsi command using the profile's path+file name.
Code:
mqsichangeflowmonitoring ACE_NJAMS_DEMO -e njamsDemo -k demoApp -f DemoFlow -c active --monitoring-profile (DefaultPolicies):<path>\DemoFlow.monprofile.xml


Result said 'success', but the mon events produced were as defined in the Mon Properties in the flow - not the changed values in the profile.

I'll be grateful for any help received.
Back to top
View user's profile Send private message Send e-mail
martinb
PostPosted: Mon Nov 02, 2020 10:18 am    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

Hi John,

The steps to get a Monitoring Profile deployed and activated on a message flow running in ACE v11 are as follows

1) In the ACE Toolkit create a new Policy Project, for example "MyPolicies"

2) Import/create/copy a file inside this Policy Project with the extension ".monprofile.xml" which contains the XML Monitoring Profile, for example "MyMonProf.monprofile.xml".
So if you have a previously created monitoring profile in an xml file outside of the ACE Toolkit you would use the Eclipse file import action to bring the file into the Policy project, and then rename it to ensure it has the required ".monprofile.xml" extension.

Note that currently the ACE Toolkit does not offer a facility to create a Monitoring profile as a policy type, you have to manually create it, or run the mqsireportflowmonitoring command with the --extract-profile option.

Note that currently the Monitoring profiles inside a Policy Project are only listed by the ACE Toolkit navigator view under the "Other resources" folder.

3) Create a BAR file containing your Policy Project and deploy it to your Integration Server.
Once deployed the ACE Toolkit Integration Explorer view will show the "RequestResponse.monprofile.xml" as a child of your "MyPolicies" Policy project

4) Now you can apply the Monitoring profile to a deployed message flow, for example by using the change flow monitoring command:
Code:
mqsichangeflowmonitoring -i localhost -p 7600 -k My_App -f My_flow -m {MyPolicies}:MyMonProf

HTH
Back to top
View user's profile Send private message
john.ormerod
PostPosted: Tue Nov 03, 2020 6:59 am    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2017
Posts: 49

Hi martinb

Success! Many thanks. I will detail the steps I took from following your guide (as I had to fill in a blank or two), as an aid for any others who might find this thread.

Prep:
    Created DemoApp and DemoFlow as a 3-node HTTP msgflow.
    Defined Monitoring properties for each node
    For the HTTP Input node's Start event, specified the GlobalTxnId as 'orderId' from the xml input msg.
    Deployed and activated monitoring (I forget how I activated monitoring! - possibly by using an mqsi command)
    Checked Event msgs in the subscribed queue, to verify the value in the globalTxnId was the orderId.

Override using a MonProfile
    Exported the MonProfile to DemoFlow.monprofile.xml, using cmd
    Code:
    mqsireportflowmonitoring ACE_NJAMS_DEMO -e njamsDemo -f DemoFlow -k DemoApp -x E:\data\njamsDemo\ACE\MonProfiles\DemoFlow.monprofile.xml

    Edited the file to change the globalTxdId for the TransactionStart event to use the customerNumber : profile:queryText="$Root/XMLNSC/btm_retail/customerNumber"
    Created a Policy project called DemoPolicyProject
    Gave the Policy a name of MonProfiles
    Chose Policy Type of User Defined (@martinb - is this correct?)
    Selected the DemoPolicyProject in the App Dev panel, right mouse and chose Import...
    Navigated to location of the above monprofile.xml file and imported it.
    It can be seen as a child of DemoPolicyProject > OtherResources.
    Created a BAR file and added DemoApp and MonProfiles policy, which included the monprofile.xml
    Deployed the BAR to the njamsDemo server

Used the following command
Code:
mqsichangeflowmonitoring ACE_NJAMS_DEMO -e njamsDemo -k DemoApp -f DemoFlow -c active --monitoring-profile {DemoPolicyProject}:DemoFlow

Sent the input msg to the flow, and checked the resulting event msgs.
The globalTxnId was now the customerNum, as required.

@martinb - a couple of questions
    1.In your mqsi example, you used port=7600, is this the server's HTTP listener port?
    2. In the mqsi cmd, I used the name of the Policy Project, though using the Policy Name 'feels' more appropriate. Can you use either?
    3. If I add another msgflow in the App, am I correct to assume that I would import its MonProfile file into the Policy Project and associate it with the second msgflow using an mqsi cmd?


Many thanks
John
Back to top
View user's profile Send private message Send e-mail
martinb
PostPosted: Tue Nov 03, 2020 8:01 am    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

@john.ormerod

Glad to hear you got setup and running John, and thanks for detailing the steps you took.

To answer you questions

Quote:
Created a Policy project called DemoPolicyProject
Gave the Policy a name of MonProfiles
Chose Policy Type of User Defined (@martinb - is this correct?)
Selected the DemoPolicyProject in the App Dev panel, right mouse and chose Import...


This should just be, create the Policy project and import, ie:

Code:
Created a Policy project called DemoPolicyProject
Selected the DemoPolicyProject in the App Dev panel, right mouse and chose Import...


Questions:-

Quote:
1.In your mqsi example, you used port=7600, is this the server's HTTP listener port?


In my example I was using a standalone Integration Server, with a Admin Port of 7600, I see you are using an Integration node managed server in your example.


Quote:
2. In the mqsi cmd, I used the name of the Policy Project, though using the Policy Name 'feels' more appropriate. Can you use either?


In general use both the policy project name and policy name, in the form
{policy-project-name}:policy-name
when associating a policy.
If you need to use just the nu-qualified policy name, then the named policy must be located in the configured "default policy project", (set in the .conf.yaml). See this topic.


Quote:
3. If I add another msgflow in the App, am I correct to assume that I would import its MonProfile file into the Policy Project and associate it with the second msgflow using an mqsi cmd?


Yes indeed, that is correct.
Alternatively you might consider creating a monitoring profile that defines common events for multiple message flows, by ensuing the "eventSourceAddress" is matching in each message flow.


HTH
Martin
Back to top
View user's profile Send private message
john.ormerod
PostPosted: Tue Nov 03, 2020 10:37 am    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2017
Posts: 49

Hi Martin

Thanks for clarifying.

In the Toolkit, I tried creating a new Policy Project. I ignored the need for a Policy name and clicked Cancel.

I found I could import a Mon Profile file as before, and it ends up in Other Resources. I can see that the UserDefined policy I created ealier, in fact has nothing to do with the mon profile file in that policy project.

It's just that the creation dialogue implies that a Policy is required.

John
Back to top
View user's profile Send private message Send e-mail
john.ormerod
PostPosted: Tue Nov 03, 2020 11:26 am    Post subject: Reply with quote

Apprentice

Joined: 14 Feb 2017
Posts: 49

Hi Martin

Apologies for this deluge. In a new post http://www.mqseries.net/phpBB2/viewtopic.php?p=435893#435893, I have provided the context for the three individual posts, by outlining the IIB 10 monitoring app that uses auto-discovery of the topology for message and sub flows. This is used to create a Mon Profile for each msgflow - with events defined for all nodes.

The reason for this, is that the other part of the app, tracks the path taken through the nodes by a message - rather like the Flow Exerciser.

This is by way of pointing to the above post, in the hope that you could provide some guidance as what my app can achieve now and later.

John
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ACE 11.0.0.10 Dev: How do I add a Mon Profile to a Policy?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.