For example, will it always be visible in _active_tasks even if there
is no active replication occurring?
Or is there a URL you can ping, passing on the _local_id which is
given when you start the continuous replication?
Or failing that, is there a URL on the couchdb server which returns
when it was last restarted?
Rachel
You can grep the front of the "task" string to match it to the
returned _local_id or infer it from from the rest of the string. E.g,
curl -X PUT http://localhost:5984/_replicate -d
'{"source":"db1","target":"db2","continuous":true}'
gives;
{"ok":true,"_local_id":"56a810250d6aed082fa4aae1dc58fb6c"}
If you poll /_active_tasks, you can see it's still alive;
curl http://localhost:5984/_active_tasks
[{"type":"Replication","task":"56a810: db1 ->
db2","status":"Starting","pid":"<0.370.0>"}]
I don't think you can get the timestamp for when couchdb last started,
but I think the per-db "instance_start_time" is probably fine, since I
believe it's used in finding replication checkpoints;
curl http://localhost:5984/db2
{"db_name":"db2" .... ,"instance_start_time":"1278337744957334"....}
I believe there's an effort to persistent continuous replication tasks
so that they are restarted if they fail, so hopefully the answers to
these questions have only short-term validity.
B.
I'm a little on the fence here, I think it would be largely redundant
if couchdb does it, but I also seen the value in couchdb being
monitorable from the outside. Perhaps the right way to do that is via
HTTP like everything else, but I've always meant to dig into Erlang's
monitoring support, and particularly SNMP, since, like it or loathe
it, it's pervasive.
B.
Thanks! That's what I needed confirmed.
Rachel