Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
sukanya09
Contributor
Contributor

API to capture the logging mode in Qilk replicate

Greetings!

I would like to know if we have any API to capture the logging mode for the tasks. Ex to find if the tasks are set to verbose logging mode 

Labels (1)
1 Solution

Accepted Solutions
Heinvandenheuvel
Specialist III
Specialist III

You could consider ExportTask your API. Parse the result for:

cmd.replication_definition->tasks->[yourtaskname]->loggers

You'll need to read the list of returned loggers element, scanning for 'DETAILED DEBUG' or other values  as desired. See sample summary below.

Hein

"cmd.replication_definition":	{
	"tasks": [{
		"task":	{
				"name":	"xxx",...
			},
			"source": { ... },
			"targets": { ... },
			"manipulations": [{ ... }],
			"task_settings": { ... },
			"loggers":	{
				"$type":	"RepTaskLoggers",
				"TARGET_APPLY":	"DETAILED_DEBUG",
				"SOURCE_CAPTURE":	"INFO"  .... }
                        }],
	"databases":	[{ ...

View solution in original post

4 Replies
Barb_Fill21
Support
Support

Hello @sukanya09  ,

 

Thanks for your question. I don't see any API that helps with determining if verbose logging is on or not. 

I see this in the Replicate User Guide>> https://help.qlik.com/en-US/replicate/May2023/Content/Replicate/Main/Appendix%20-%20Add-On%20SDK/log...

 

Also In Enterprise Manager, you can see the amount of disk space being used: 

https://help.qlik.com/en-US/enterprise-manager/May2023/Content/EnterpriseManager/EnterpriseManager_A...

disk_usage_mb

The current utilization of disk space, in MB. A task's disk utilization is sampled every minute.

 

As I don't see the exact need, feel free to open an enhancement request and Submit an idea into Ideation :

Ideation | Qlik Community

You may also want to get the assistance of our Professional Services team. 

Hope this helps.

Sincerely

BarbF.

Heinvandenheuvel
Specialist III
Specialist III

You could consider ExportTask your API. Parse the result for:

cmd.replication_definition->tasks->[yourtaskname]->loggers

You'll need to read the list of returned loggers element, scanning for 'DETAILED DEBUG' or other values  as desired. See sample summary below.

Hein

"cmd.replication_definition":	{
	"tasks": [{
		"task":	{
				"name":	"xxx",...
			},
			"source": { ... },
			"targets": { ... },
			"manipulations": [{ ... }],
			"task_settings": { ... },
			"loggers":	{
				"$type":	"RepTaskLoggers",
				"TARGET_APPLY":	"DETAILED_DEBUG",
				"SOURCE_CAPTURE":	"INFO"  .... }
                        }],
	"databases":	[{ ...
sukanya09
Contributor
Contributor
Author

Thanks. I can find it in the JSON 

},
"loggers": {
"$type": "RepTaskLoggers",
"loggers_configuration": {
},
"SORTER": "DETAILED_DEBUG"
 
However it is appearing only when the logging mode is getting changed . 
Do you know if we have any similar way to find out the tasks with Full load set to ON ?
 
Regards
Sukanya 
Heinvandenheuvel
Specialist III
Specialist III

In general Replicate only puts non-default items in the JSON export. A) it makes for shorter JSON tiles B) If a 'better' default is developed over time, it will be picked up C) it might make conversions easier.

As a script writer it is fairly annoying though and you more or less need to know what to expect and what the absence of something means.

>>> Do you know if we have any similar way to find out the tasks with Full load set to ON ?

Case in point...   fullload enabled TRUE is the default and NOT present in general (allthough tolerated) . The absence of the element  "common_settings": { ...  }, "full_load_enabled": false, ... means fullload is ON.

 

For the logging in the @sukanya09  case it seems ANY element present under loggers is 'suspect' and needs to be reported for potential excessive logging as a starting point.  Next scripting step may be to add exceptions for logger element/taskname combinations which are approved.

Alternatively, use a dummy task with ALL logging enabled, export, and establish a list of possible tag/values to expect. 

Hein.