Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We wish to apply the same notification rules on different Qlik Replicate servers.
Can I export and import them ?
Thank you,
Ole
Hi,
Yes, it is possible to export notification rules by indicating the include_server_settings option in the export command like in the following example:
[Replicate home]\Replicate\bin\repctl.exe exportrepository task=TASK_NAME include_server_settings=TRUE
Regards,
Orit
Hello team,
If our response has been helpful, please consider clicking "Accept as Solution". This will assist other users in easily finding the answer.
Regards,
Sushil Kumar
I can't find repctl.exe on the windows server. We are also using a Linux server, could the executable be found on that one ?
This is our Attunity directory :
repctl.exe is part of a Replicate installation but your screen capture is for an installation of Enterprise Manager. There are API calls you can use to export tasks in Enterprise Manager: Qlik Enterprise Manager API guide | Qlik Enterprise Manager Help
Hope this helps!
Dana
Hi @Dana_Baldwin ,
I have exported a task via the API, according to the following doc :
https://help.qlik.com/en-US/enterprise-manager/May2023/Content/EnterpriseManager/EnterpriseManager_A...
Unfortunately the exported file does not include a Notification Rules section.
Does the repctl command on the Linux server include Notification Rules or is the format when exporting via the API? If the repctl command includes these Notification Rules, how should I run it ? The doc :
https://help.qlik.com/en-US/replicate/May2023/Content/Global_Common/Content/SharedEMReplicate/Design...
only mentions exporting via the user interface / Windows
Thank you,
Ole
Hi @Ole_Dufour
I'm not sure if the API can use the "include_server_settings" parameter, but you can run the command directly on your Linux Replicate server.
Run the following command in the Replicate bin directory:
source ./arep_login.sh
Then run:
repctl -d data-directory exportrepository task=TASK_NAME include_server_settings=TRUE
If the <product_dir>\data folder was installed in a non-default location during the installation - OR - if it was later moved to a non-default location, you need to tell Replicate where the folder is located.
This is done by including the -d <data_folder> parameter in the command.
Example:
repctl -d D:\Data exportrepository task=mytask
Hope this helps!
Dana
Notifications are managed at server level, defined/filtered by task.
You need to used the ExportAll API and parse the output JSON for the Notification settings and select in there.
(and yes, in the example I happened to pick the notification name does not match the action 🙂
Hein.
I have called the Export All api and confirm that the json file holds a notification section as a described in your answer.
I have some questions.
* Is it possible to export the current Notification rules ? The notification section in the downloaded json file only includes an example.
* How can this notification section be imported on other Replicate servers?
Can this be done using
https://help.qlik.com/en-US/enterprise-manager/May2021/Content/EnterpriseManager/EnterpriseManager_A... ?
thank you, bon weekend,
Ole
You can trim down the JSON to just have the notifications in their normal downward path and ImportAll.
I just tested using REPCTL IMPORTREPOSITORY with the following JSON and it works for me, without restart
Hein.
// notification test.
{
"name": "Replication_Definition",
"cmd.replication_definition": {
"notifications": {
"notifications_list": [{
"name": "Diskutilization_Over_150_GB",
"on_condition": "$DISK_USAGE > 150000",
"off_condition": "$DISK_USAGE < 100000",
"audit_on_message": "[{{SERVER_NAME}}\\{{NOTIFICATION_NAME}}]{{TASK_NAME}} high disk usage {{DISK_USAGE}} MB.",
"audit_off_message": "[{{SERVER_NAME}}\\{{NOTIFICATION_NAME}}]{{TASK_NAME}} normal disk usage {{DISK_USAGE}} MB.",
"delivery_methods": [{
"on_message": "high disk usage{{TASK_NAME}} is {{MEMORY_USAGE}} MB.",
"off_message": "normal disk usage {{TASK_NAME}} is {{MEMORY_USAGE}} MB.",
"on_subject": "[{{SERVER_NAME}}\\{{NOTIFICATION_NAME}}] {{TASK_NAME}} high disk utilization",
"off_subject": "[{{SERVER_NAME}}\\{{NOTIFICATION_NAME}}] {{TASK_NAME}} disk utilization back to normal"
}],
"ui_id": "NOTIFICATION_UI_ID_DISK_USAGE"
}]
}
}
}