Transaction Record Policy & reports issue

Hi ,

We have trying to configure Monetization in OnPrem 4.15.04.00. We have gone through all steps mentioned in install kit & docs. We have also created a proxy where we have added MonetizationLimitsCheck policy. We are not able to view the increase in Transaction Record Policy. I went through the answers provided in the below links, but i am was not able to fix the issue -

https://community.apigee.com/questions/3840/setting-a-transaction-success-criteria-in-monetiza.html

https://community.apigee.com/questions/5949/monetization-transaction-record-policy.html

Thanks,

Abhishek

0 11 575
11 REPLIES 11

Adding more information -

I am seeing <Get name="mint.tx.status" value="success"/> in the trace logs.

Can you share some more info? Like the policy configurations, product configurations etc. ?

Please find the sample proxy I have created to test. Also snapshot of Transaction Recording Policy.monetizationsample-rev1-2015-12-17.zip

Please let me know if you need more information.

1680-capture-txn-policy.jpg

Thanks, Abhishek

Can you re upload the images ?

Here are the details..including the trace, rateplans.

1681-capture-txn-policy.jpg

1682-capture-plan-details.jpg

trace-1450334870937xml.txt

adas
New Member

@Abhishek Subramanya I am not sure what you meant by "We are not able to view the increase in Transaction Record Policy"

The Transaction Recording policy for a apiproduct is simply a mapping of the fields and tells the system, which values to look for and where to find them. In your case, you have specified the response header "status" and set the transaction success criteria to be status = "success".

So please make sure that once your api call is made, the response contains a header called "status" which has a value of "success". Only then the monetization policy and rating would happen.

To troubleshoot further, you can make database level queries in your postgres to see what data is getting into the transactions table:

select * from transction

If there are transaction entries in the database with status as "REVIEW" then there's some problem which we would need to look at. Can you confirm that, you have added a package and a rate plan for the apiproduct that you are using.

Can you share a sample api call for your API.

Hi @arghya das,

We are setting the status = "success" in response.

I connected to postgres db but could not find the table - transction. When I list all tables, this is what it shows up -

postgres=# \dt *.*
                       List of relations
       Schema       |          Name           | Type  | Owner
--------------------+-------------------------+-------+--------
 information_schema | sql_features            | table | apigee
 information_schema | sql_implementation_info | table | apigee
 information_schema | sql_languages           | table | apigee
 information_schema | sql_packages            | table | apigee
 information_schema | sql_parts               | table | apigee
 information_schema | sql_sizing              | table | apigee
 information_schema | sql_sizing_profiles     | table | apigee
 pg_catalog         | pg_aggregate            | table | apigee
 pg_catalog         | pg_am                   | table | apigee
 pg_catalog         | pg_amop                 | table | apigee
 pg_catalog         | pg_amproc               | table | apigee
 pg_catalog         | pg_attrdef              | table | apigee
 pg_catalog         | pg_attribute            | table | apigee
 pg_catalog         | pg_auth_members         | table | apigee
 pg_catalog         | pg_authid               | table | apigee
 pg_catalog         | pg_cast                 | table | apigee
 pg_catalog         | pg_class                | table | apigee
 pg_catalog         | pg_collation            | table | apigee
 pg_catalog         | pg_constraint           | table | apigee
 pg_catalog         | pg_conversion           | table | apigee
 pg_catalog         | pg_database             | table | apigee
 pg_catalog         | pg_db_role_setting      | table | apigee
 pg_catalog         | pg_default_acl          | table | apigee
 pg_catalog         | pg_depend               | table | apigee
 pg_catalog         | pg_description          | table | apigee
 pg_catalog         | pg_enum                 | table | apigee
 pg_catalog         | pg_event_trigger        | table | apigee
 pg_catalog         | pg_extension            | table | apigee
 pg_catalog         | pg_foreign_data_wrapper | table | apigee
 pg_catalog         | pg_foreign_server       | table | apigee
 pg_catalog         | pg_foreign_table        | table | apigee
 pg_catalog         | pg_index                | table | apigee
 pg_catalog         | pg_inherits             | table | apigee
 pg_catalog         | pg_language             | table | apigee
 pg_catalog         | pg_largeobject          | table | apigee
 pg_catalog         | pg_largeobject_metadata | table | apigee
 pg_catalog         | pg_namespace            | table | apigee
 pg_catalog         | pg_opclass              | table | apigee
 pg_catalog         | pg_operator             | table | apigee
 pg_catalog         | pg_opfamily             | table | apigee
 pg_catalog         | pg_pltemplate           | table | apigee
 pg_catalog         | pg_proc                 | table | apigee
 pg_catalog         | pg_range                | table | apigee
 pg_catalog         | pg_rewrite              | table | apigee
 pg_catalog         | pg_seclabel             | table | apigee
 pg_catalog         | pg_shdepend             | table | apigee
 pg_catalog         | pg_shdescription        | table | apigee
 pg_catalog         | pg_shseclabel           | table | apigee
 pg_catalog         | pg_statistic            | table | apigee
 pg_catalog         | pg_tablespace           | table | apigee
 pg_catalog         | pg_trigger              | table | apigee
 pg_catalog         | pg_ts_config            | table | apigee
 pg_catalog         | pg_ts_config_map        | table | apigee
 pg_catalog         | pg_ts_dict              | table | apigee
 pg_catalog         | pg_ts_parser            | table | apigee
 pg_catalog         | pg_ts_template          | table | apigee
 pg_catalog         | pg_type                 | table | apigee
 pg_catalog         | pg_user_mapping         | table | apigee

Thanks,

Abhishek

@Abhishek Subramanya These are just the tables in the analytics schema. There should be a monetization schema which would have the tables specific to the monetization application. I am sorry I do not remember the schema name off hand. Try to list down all the schemas, and see if you can find the monetization schema, it might be called "rkms".

Hi Abhishek, I do see the rateplan, product and proxy configurations looks good as per screenshots and trace, I supsect the installation have some issues specifically w.r.t qpidd and postgres. Can you provide the below details which will help get to root of the problem

- tail mgmt logs while making a call to proxy.

- tail mp logs while making a call to proxy.

- check if your qpid is up and check "qpid-stats -q"

- and finally as Arghya mentioned "select * from rkms.transaction" or "select type,status,rate_plan_id,prod_id,notes from rkms.transaction"

@arghya das & @rajanish@apigee.com - Thanks for your inputs. I checked again & please find the details below -

1. I found the rkms.transaction table, but the table is empty.

apigee=# select type,status,rate_plan_id,prod_id,notes from rkms.transaction;
 type | status | rate_plan_id | prod_id | notes
------+--------+--------------+---------+-------
(0 rows)

2. MP Logs

No logs during transaction.

3. Mgmt Logs

No logs during transaction. But i can see below logs during startup -

2015-12-21 17:05:16,553 org:digitaltest env:est  qtp177945356-231 INFO  MINT.SERVICE - MintCustomInvoker.beforeInvocation() : Unsupported verb: null
2015-12-21 17:05:16,611 org:digitaltest  qtp177945356-33 INFO  MINT.SERVICE - MintCustomInvoker.beforeInvocation() : Unsupported verb: null
2015-12-21 17:05:16,622 org:digitaltest  qtp177945356-33 INFO  MINT.SERVICE - MintCustomInvoker.beforeInvocation() : Unsupported verb: null
2015-12-21 17:05:16,840 org:digitaltest env:est  qtp177945356-231 INFO  MINT.SERVICE - MintCustomInvoker.beforeInvocation() : Unsupported verb: null
2015-12-21 17:05:16,881 org:digitaltest  qtp177945356-33 INFO  MINT.SERVICE - MintCustomInvoker.beforeInvocation() : Unsupported verb: null
2015-12-21 17:05:16,882 org:digitaltest  qtp177945356-34 INFO  MINT.SERVICE - MintCustomInvoker.beforeInvocation() : Unsupported verb: null
2015-12-21 17:05:16,886 org:digitaltest  qtp177945356-243 INFO  MINT.SERVICE - MintCustomInvoker.beforeInvocation() : Unsupported verb: null

4. Qpid Status

[root@PC268634 bin]# ./qpid-stat.sh -q
Queues
  queue                                  dur  autoDel  excl  msg    msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =======================================================================================================================
  topic-PC268634.cts.com.15467.1              Y        Y        0      0      0       0      0        0         1     4
  qmfc-v2-ui-PC268634.cts.com.15467.1         Y        Y        0      0      0       0      0        0         1     1
  ax-q-mxgroup001                        Y                      0      0      0       0      0        0         6     2
  ax-q-axgroup001-consumer-group-001     Y                      0     88     88       0    148k     148k        6     2
  reply-PC268634.cts.com.15467.1              Y        Y        0     71     71       0   32.6k    32.6k        1     2
  ax-q-axgroup001-consumer-group-001-dl  Y                   1.67k  1.67k     0    3.20m  3.20m       0         0     2
  qmfc-v2-PC268634.cts.com.15467.1            Y        Y        0     11     11       0   40.4k    40.4k        1     2
  ax-q-mxgroup001-dl                     Y                      0      0      0       0      0        0         0     2
  qmfc-v2-hb-PC268634.cts.com.15467.1         Y        Y        0      0      0       0      0        0         1     2

<strong>
</strong>

5. We did get an error during Additional Onboarding for Monetization.

1) Make sure you onboard an organization. For example, “test1”.

2) Navigate to Monetization installer directory cd /opt/apigee4/share/installer/monetization

3) Run regression as, ./mint-regression.sh /opt/apigee4/share/monetization/conf/mint.properties /opt/apigee4/share/monetization/schema/<organization>.xls mint

When we executed this script, all the tests failed -

<strong>===============================================
Apigee Test Automation Suite
Total tests run: 63, Failures: 62, Skips: 1
Configuration Failures: 1, Skips: 0
===============================================</strong>

It later requested for mintpguser password. I don't remember configuring this.

Abhishek,

org is not configured correctly in your opdk setup. The fact that there was no single message pushed to queue proves that there has been something wrong while you created org and environment.

What were the steps you followed and do you have logs of org onboarding? If not can you try creating new org and onboard monetization and capture logs?

Also provide the response of the api below

{{host}}/v1/analytics/groups/ax