Qlik Community

Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

cancel
Showing results for 
Search instead for 
Did you mean: 
Mccutchan1
Contributor III
Contributor III

Automating Cache Initializer after reload or recycling services.

I have both Cache Initializer and QSST working but not sure how to automate either one of them after a reload or after the services have been recycled. 

Thanks

 

1 Solution

Accepted Solutions
Levi_Turner
Employee
Employee

> after reload

The cleanest, but more complicated, route is to use External Program Tasks: https://community.qlik.com/t5/Qlik-Architecture-Deep-Dive-Blog/Chaining-External-Program-Tasks/ba-p/...

Alternatively, you can schedule things outside of Qlik Sense Enterprise using something like the Qlik-Cli which then would allow you to chain it to the execution of the CacheIntiailizer.exe file.

 

> after services have been recycled

The easy mode answer would be just to schedule things using something like Windows Task Scheduler every X hours / minutes. That'll give you an approximation but not strictly speaking be exactly aligned with service restart.

For a closer approximation of 100% alignment, it'll be a much more complicated series of things. The method that seems the most straight-forward is something like this:

  • Script which checks the status of Engine(s). Example QRS API call: GET /qrs/servicestatus/full?filter=(serviceType eq 3)
    • This then writes the timestamp value (or serverNodeConfiguration > hostName & timestamp values for a multi-node environment)
  • Another script (or in the previous one): Checks the timestamp value against the prior row. If there's a difference then it executes CacheInitializer

This would be a fast reactive but still reactive method.

For a fully automated solution, you'd want to use something like the QRS's Notification Capability. Here's some demo code for recording the Engine uptime to csv using this approach: https://github.com/levi-turner/60f3cacb-c4ee-47d3-8a40-9f23530c0267

View solution in original post

1 Reply
Levi_Turner
Employee
Employee

> after reload

The cleanest, but more complicated, route is to use External Program Tasks: https://community.qlik.com/t5/Qlik-Architecture-Deep-Dive-Blog/Chaining-External-Program-Tasks/ba-p/...

Alternatively, you can schedule things outside of Qlik Sense Enterprise using something like the Qlik-Cli which then would allow you to chain it to the execution of the CacheIntiailizer.exe file.

 

> after services have been recycled

The easy mode answer would be just to schedule things using something like Windows Task Scheduler every X hours / minutes. That'll give you an approximation but not strictly speaking be exactly aligned with service restart.

For a closer approximation of 100% alignment, it'll be a much more complicated series of things. The method that seems the most straight-forward is something like this:

  • Script which checks the status of Engine(s). Example QRS API call: GET /qrs/servicestatus/full?filter=(serviceType eq 3)
    • This then writes the timestamp value (or serverNodeConfiguration > hostName & timestamp values for a multi-node environment)
  • Another script (or in the previous one): Checks the timestamp value against the prior row. If there's a difference then it executes CacheInitializer

This would be a fast reactive but still reactive method.

For a fully automated solution, you'd want to use something like the QRS's Notification Capability. Here's some demo code for recording the Engine uptime to csv using this approach: https://github.com/levi-turner/60f3cacb-c4ee-47d3-8a40-9f23530c0267