The following will give you Agent Status information (json output). You can parse it and find whats happening with the agent.
About JCR Querying there is good documentation on this page.
Hope this helps!.
Thanks for the quick response. The reason I was asking for ways to get replication status is that I want to use a script or something alike to check the status in a timely fashion.
Any idea how this json output can be helpful in this case? Lets say, I have two conditions to test for: 1) If the agent is disabled 2) If the agent queue is blocked, which means that the replication is failing for some reason.
And I was asking for JCR querying for the same solution assuming if it is possible to query from a script. I am NEW to CQ and we are on 5.4
Use the above url on publish when running and not running, Observe the values or status codes. You can write curl scripts or shell scripts to connect to the agent and read the json. I believe, You dont need JCR querying for this.
if you need to see how json can be read, just say JSON parsing in whatever langauge you want it in google search.
We need to check this on the author instance(Agents.author), right? As we configure the replication agents on the author to replicate to the publish instance?
Yes, The query string is the publish instance agent name in author.
Thanks, I was able to collect different JSON response codes for the scenarios below. Do you think there can be any other states the agent/queue can be in? Can you please throw some light on it.
The scenarios I tested:
1) The Replication agent is Active/Enabled and processing requests successfully.
2) The replication agent is Inactive/Disabled
3) The Replication agent is Active/Enabled but the queue is blocked causing a replication failure.
Any additional info you can provide will be valuable in troubleshooting further.
1 person found this helpful
That should pretty much solve the problem. if you want to read the log you can do that as well.