Auto running online datastore consistency check on a weekly basis and share missing blobs report to mail. | Community
Skip to main content
Level 2
January 31, 2024
Solved

Auto running online datastore consistency check on a weekly basis and share missing blobs report to mail.

  • January 31, 2024
  • 3 replies
  • 1211 views

We have request to execute online datastore consistency check on a weekly basis in server using AEM feature. And also need to share the missing blobs report to users mail. Please share if any input.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by TarunKumar

Hi @mohanasundaram ,

You can try to implement a custom datastore consistency check class which will be executed by a scheduler and will run on specific cron expression provided to it.
You can have a look at below link which will give you some idea as what the logic would look like:

https://gist.github.com/andrewmkhoury/3a3b5e69900f4e873743


Thanks
Tarun

3 replies

TarunKumar
Community Advisor
TarunKumarCommunity AdvisorAccepted solution
Community Advisor
February 2, 2024

Hi @mohanasundaram ,

You can try to implement a custom datastore consistency check class which will be executed by a scheduler and will run on specific cron expression provided to it.
You can have a look at below link which will give you some idea as what the logic would look like:

https://gist.github.com/andrewmkhoury/3a3b5e69900f4e873743


Thanks
Tarun

Level 2
February 5, 2024

Hi TarunKumar,

Thanks for sharing input.

Do we have any method to invoke system/console/jmx service instead of crx/de ?

narendragandhi
Community Advisor
Community Advisor
February 2, 2024

Hi @mohanasundaram 

 

As you mentioned online datastore consistency check, I think you are trying to invoke it from here - https://experienceleague.adobe.com/docs/experience-manager-65/content/implementing/deploying/configuring/consistency-check.html?lang=en

 

You need to invoke programmatically the JMX Mbean listed in the above document. Here is one example of how you could do this using shell script - https://www.baeldung.com/jmx-mbean-shell-access

 

In the same script you can add code to send email to configured email address with the response you get from consistency check invocation.

 

I hope this helps. Please let us know for any questions.

 

Thanks

Narendra

Level 2
February 5, 2024

Hi narendragandhi,

Thanks for our input.

Let me try your suggestion and get back to you.

kautuk_sahni
Community Manager
Community Manager
February 6, 2024

@mohanasundaram Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
Level 2
February 6, 2024