arangodb health check e.g. for usage with docker-compose

958 views
Skip to first unread message

Martin Kuhn

unread,
Jul 12, 2016, 12:06:28 PM7/12/16
to ArangoDB
I would like to use ArangoDB with docker and docker-compose.

So I have a node application which should "wait" until ArangoDB is up and running.
Both are running in there own container.
 
How do I check ArangoDB ?

Is there an api call (arangojs)?

To use "depends_on" with docker-compose is not sufficient...

TIA

Wilfried Gösgens

unread,
Jul 13, 2016, 5:05:50 AM7/13/16
to ArangoDB
Hi Martin,
you could query for /_api/version - once that returns a 200 with a proper reply you can treat the server as alive.

See more details here: https://docs.arangodb.com/3.0/HTTP/MiscellaneousFunctions/index.html#return-server-version

Cheers,
Willi

Martin Kuhn

unread,
Jul 13, 2016, 6:42:33 AM7/13/16
to ArangoDB
Hi Willi,

thanks this is exactly what I need.

Regards,
Martin

o.bon...@gmail.com

unread,
Mar 22, 2024, 3:52:51 PM3/22/24
to ArangoDB
It returns a 401 now ... any other idea?

Asif Kazi

unread,
Mar 22, 2024, 8:01:07 PM3/22/24
to ArangoDB
Its an authenticated endpoint if you pass the correct username /password it will work with 200

❯ curl localhost:8529/_api/version

{"error":true,"errorNum":11,"errorMessage":"not authorized to execute this request","code":401}%                                                   


❯ curl localhost:8529/_api/version --user root

Enter host password for user 'root':

{"server":"arango","license":"enterprise","version":"3.11.8"}%       


Reply all
Reply to author
Forward
0 new messages