HTTP Interface for Administration and Monitoring

This is an introduction to ArangoDB’s HTTP interface for administration and monitoring of the server.

Logs

Read global logs from the server

returns the server logs

GET /_admin/log

Query Parameters

  • upto (optional): Returns all log entries up to log level upto. Note that upto must be:
  • fatal or 0
  • error or 1
  • warning or 2
  • info or 3
  • debug or 4 The default value is info.

    • level (optional): Returns all log entries of log level level. Note that the query parameters upto and level are mutually exclusive.

    • start (optional): Returns all log entries such that their log entry identifier (lid value) is greater or equal to start.

    • size (optional): Restricts the result to at most size log entries.

    • offset (optional): Starts to return log entries skipping the first offset log entries. offset and size can be used for pagination.

    • search (optional): Only return the log entries containing the text specified in search.

    • sort (optional): Sort the log entries either ascending (if sort is asc) or descending (if sort is desc) according to their lid values. Note that the lid imposes a chronological order. The default value is asc.

Returns fatal, error, warning or info log messages from the server’s global log. The result is a JSON object with the following attributes:

HTTP 200

  • lid: a list of log entry identifiers. Each log message is uniquely identified by its @LIT{lid} and the identifiers are in ascending order.

  • level: A list of the log levels for all log entries.

  • timestamp: a list of the timestamps as seconds since 1970-01-01 for all log entries.

  • text: a list of the texts of all log entries

  • topic: a list of the topics of all log entries

  • totalAmount: the total amount of log entries before pagination.

  • 400: is returned if invalid values are specified for upto or level.

  • 500: is returned if the server cannot generate the result due to an out-of-memory error.

Return the current server log level

returns the current log level settings

GET /_admin/log/level

Returns the server’s current log level settings. The result is a JSON object with the log topics being the object keys, and the log levels being the object values.

Return codes

  • 200: is returned if the request is valid

  • 500: is returned if the server cannot generate the result due to an out-of-memory error.

Modify and return the current server log level

modifies the current log level settings

PUT /_admin/log/level

A JSON object with these properties is required:

  • agency: One of the possible log levels.

  • agencycomm: One of the possible log levels.

  • agencystore: One of the possible log levels.

  • aql: One of the possible log levels.

  • arangosearch: One of the possible log levels.

  • audit-authentication: One of the possible log levels (Enterprise Edition only).

  • audit-authorization: One of the possible log levels (Enterprise Edition only).

  • audit-collection: One of the possible log levels (Enterprise Edition only).

  • audit-database: One of the possible log levels (Enterprise Edition only).

  • audit-document: One of the possible log levels (Enterprise Edition only).

  • audit-hotbackup: One of the possible log levels (Enterprise Edition only).

  • audit-view: One of the possible log levels (Enterprise Edition only).

  • audit-service: One of the possible log levels (Enterprise Edition only).

  • authentication: One of the possible log levels.

  • authorization: One of the possible log levels.

  • backup: One of the possible log levels.

  • cache: One of the possible log levels.

  • cluster: One of the possible log levels.

  • collector: One of the possible log levels.

  • communication: One of the possible log levels.

  • clustercomm: One of the possible log levels.

  • compactor: One of the possible log levels.

  • config: One of the possible log levels.

  • datafiles: One of the possible log levels.

  • development: One of the possible log levels.

  • dump: One of the possible log levels.

  • engines: One of the possible log levels.

  • flush: One of the possible log levels.

  • general: One of the possible log levels.

  • graphs: One of the possible log levels.

  • heartbeat: One of the possible log levels.

  • httpclient: One of the possible log levels.

  • ldap: One of the possible log levels (Enterprise Edition only).

  • maintenance: One of the possible log levels.

  • memory: One of the possible log levels.

  • mmap: One of the possible log levels.

  • performance: One of the possible log levels.

  • pregel: One of the possible log levels.

  • queries: One of the possible log levels.

  • replication: One of the possible log levels.

  • requests: One of the possible log levels.

  • restore: One of the possible log levels.

  • rocksdb: One of the possible log levels.

  • security: One of the possible log levels.

  • ssl: One of the possible log levels.

  • startup: One of the possible log levels.

  • statistics: One of the possible log levels.

  • supervision: One of the possible log levels.

  • syscall: One of the possible log levels.

  • threads: One of the possible log levels.

  • trx: One of the possible log levels.

  • ttl: One of the possible log levels.

  • v8: One of the possible log levels.

  • views: One of the possible log levels.

Modifies and returns the server’s current log level settings. The request body must be a JSON object with the log topics being the object keys and the log levels being the object values.

The result is a JSON object with the adjusted log topics being the object keys, and the adjusted log levels being the object values.

It can set the log level of all facilities by only specifying the log level as string without json.

Possible log levels are:

  • FATAL - There will be no way out of this. ArangoDB will go down after this message.
  • ERROR - This is an error. you should investigate and fix it. It may harm your production.
  • WARNING - This may be serious application-wise, but we don’t know.
  • INFO - Something has happened, take notice, but no drama attached.
  • DEBUG - output debug messages
  • TRACE - trace - prepare your log to be flooded - don’t use in production.

Return codes

  • 200: is returned if the request is valid

  • 400: is returned when the request body contains invalid JSON.

  • 405: is returned when an invalid HTTP method is used.

  • 500: is returned if the server cannot generate the result due to an out-of-memory error.

Statistics

Read the statistics

return the statistics information

GET /_admin/statistics

Returns the statistics information. The returned object contains the statistics figures grouped together according to the description returned by _admin/statistics-description. For instance, to access a figure userTime from the group system, you first select the sub-object describing the group stored in system and in that sub-object the value for userTime is stored in the attribute of the same name.

In case of a distribution, the returned object contains the total count in count and the distribution list in counts. The sum (or total) of the individual values is returned in sum.

The transaction statistics show the local started, committed and aborted transactions as well as intermediate commits done for the server queried. The intermediate commit count will only take non zero values for the RocksDB storage engine. Coordinators do almost no local transactions themselves in their local databases, therefor cluster transactions (transactions started on a coordinator that require DBServers to finish before the transactions is committed cluster wide) are just added to their local statistics. This means that the statistics you would see for a single server is roughly what you can expect in a cluster setup using a single coordinator querying this coordinator. Just with the difference that cluster transactions have no notion of intermediate commits and will not increase the value.

  • 200: Statistics were returned successfully.

HTTP 404 Statistics are disabled on the instance.

  • error: boolean flag to indicate whether an error occurred (false in this case)

  • code: the HTTP status code - 200 in this case

  • time: the current server timestamp

  • errorMessage: a descriptive error message

  • enabled: true if the server has the statistics module enabled. If not, don’t expect any values.

  • system: metrics gathered from the system about this process; may depend on the host OS

    • minorPageFaults: pagefaults

    • majorPageFaults: pagefaults

    • userTime: the user CPU time used by the server process

    • systemTime: the system CPU time used by the server process

    • numberOfThreads: the number of threads in the server

    • residentSize: RSS of process

    • residentSizePercent: RSS of process in %

    • virtualSize: VSS of the process

  • client: information about the connected clients and their resource usage

    • sum: summarized value of all counts

    • count: number of values summarized

    • counts: array containing the values

    • connectionTime: total connection times

    • totalTime: the system time

    • requestTime: the request times

    • queueTime: the time requests were queued waiting for processing

    • ioTime: IO Time

    • bytesSent: number of bytes sent to the clients

    • bytesReceived: number of bytes received from the clients

    • httpConnections: the number of open http connections

  • http: the numbers of requests by Verb

    • requestsTotal: total number of http requests

    • requestsAsync: total number of asynchronous http requests

    • requestsGet: No of requests using the GET-verb

    • requestsHead: No of requests using the HEAD-verb

    • requestsPost: No of requests using the POST-verb

    • requestsPut: No of requests using the PUT-verb

    • requestsPatch: No of requests using the PATCH-verb

    • requestsDelete: No of requests using the DELETE-verb

    • requestsOptions: No of requests using the OPTIONS-verb

    • requestsOther: No of requests using the none of the above identified verbs

  • server: statistics of the server

    • uptime: time the server is up and running

    • physicalMemory: available physical memory on the server

    • transactions: Statistics about transactions

    • started: the number of started transactions

    • committed: the number of committed transactions

    • aborted: the number of aborted transactions

    • intermediateCommits: the number of intermediate commits done

    • v8Context: Statistics about the V8 javascript contexts

    • available: the number of currently spawnen V8 contexts

    • busy: the number of currently active V8 contexts

    • dirty: the number of contexts that were previously used, and should now be garbage collected before being re-used

    • free: the number of V8 contexts that are free to use

    • max: the maximum number of concurrent V8 contexts we may spawn as configured by --javascript.v8-contexts

    • min: the minimum number of V8 contexts that are spawned as configured by --javascript.v8-contexts-minimum

    • memory: a list of V8 memory / garbage collection watermarks; Refreshed on every garbage collection run; Preserves min/max memory used at that time for 10 seconds

    • contextId: ID of the context this set of memory statistics is from

    • tMax: the timestamp where the 10 seconds interval started

    • countOfTimes: how many times was the garbage collection run in these 10 seconds

    • heapMax: High watermark of all garbage collection runs in 10 seconds

    • heapMin: Low watermark of all garbage collection runs in these 10 seconds

    • threads: Statistics about the server worker threads (excluding V8 specific or jemalloc specific threads and system threads)

    • scheduler-threads: The number of spawned worker threads

    • in-progress: The number of currently busy worker threads

    • queued: The number of jobs queued up waiting for worker threads becomming available

Examples

shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_admin/statistics

HTTP/1.1 200 OK
content-type: application/json
connection: Keep-Alive
content-length: 2190
server: ArangoDB
x-content-type-options: nosniff

Show response body

Statistics description

fetch descriptive info of statistics

GET /_admin/statistics-description

Returns a description of the statistics returned by /_admin/statistics. The returned objects contains an array of statistics groups in the attribute groups and an array of statistics figures in the attribute figures.

A statistics group is described by

  • group: The identifier of the group.
  • name: The name of the group.
  • description: A description of the group.

A statistics figure is described by

  • group: The identifier of the group to which this figure belongs.
  • identifier: The identifier of the figure. It is unique within the group.
  • name: The name of the figure.
  • description: A description of the figure.
  • type: Either current, accumulated, or distribution.
  • cuts: The distribution vector.
  • units: Units in which the figure is measured.

HTTP 200 Description was returned successfully.

  • groups: A statistics group

    • group: The identifier of the group.

    • name: The name of the group.

    • description: A description of the group.

  • figures: A statistics figure

    • group: The identifier of the group to which this figure belongs.

    • identifier: The identifier of the figure. It is unique within the group.

    • name: The name of the figure.

    • description: A description of the figure.

    • type: Either current, accumulated, or distribution.

    • cuts: The distribution vector.

    • units: Units in which the figure is measured.

  • code: the HTTP status code

  • error: the error, false in this case

Examples

shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_admin/statistics-description

HTTP/1.1 200 OK
content-type: application/json
connection: Keep-Alive
content-length: 7844
server: ArangoDB
x-content-type-options: nosniff

Show response body

Read the metrics

return the current instance metrics

GET /_admin/metrics

Returns the instance’s current metrics in Prometheus format. The returned document collects all instance metrics, which are measured at any given time and exposes them for collection by Prometheus.

The document contains different metrics and metrics groups dependent on the role of the queried instance. All exported metrics are published with the arangodb_ or rocksdb_ string to distinguish them from other collected data.

The API then needs to be added to the Prometheus configuration file for collection.

Return codes

  • 200: Metrics were returned successfully.

  • 404: The metrics API may be disabled using --server.export-metrics-api false setting in the server. In this case, the result of the call indicates the API to be not found.

Examples

shell> curl --header 'accept: application/json' --dump - http://localhost:8529/_admin/metrics

HTTP/1.1 200 OK
content-type: text/plain
connection: Keep-Alive
content-length: 20980
server: ArangoDB
x-content-type-options: nosniff

#TYPE arangodb_scheduler_queue_full_failures counter
#HELP arangodb_scheduler_queue_full_failures Tasks dropped and not added to internal queue
arangodb_scheduler_queue_full_failures 0
#TYPE arangodb_scheduler_threads_stopped counter
#HELP arangodb_scheduler_threads_stopped Number of scheduler threads stopped
arangodb_scheduler_threads_stopped 0
#TYPE arangodb_scheduler_threads_started counter
#HELP arangodb_scheduler_threads_started Number of scheduler threads started
arangodb_scheduler_threads_started 3
#TYPE arangodb_scheduler_num_worker_threads gauge
#HELP arangodb_scheduler_num_worker_threads Number of worker threads
arangodb_scheduler_num_worker_threads 3
#TYPE arangodb_scheduler_awake_threads gauge
#HELP arangodb_scheduler_awake_threads Number of awake worker threads (working or spinning)
arangodb_scheduler_awake_threads 2
#TYPE arangodb_aql_all_query counter
#HELP arangodb_aql_all_query Total number of AQL queries
arangodb_aql_all_query 381
#TYPE arangodb_aql_total_query_time_msec counter
#HELP arangodb_aql_total_query_time_msec Total execution time of all AQL queries [ms]
arangodb_aql_total_query_time_msec 1844
#TYPE arangodb_scheduler_jobs_dequeued gauge
#HELP arangodb_scheduler_jobs_dequeued Total number of jobs dequeued
arangodb_scheduler_jobs_dequeued 34790
#TYPE arangodb_v8_context_destroyed counter
#HELP arangodb_v8_context_destroyed V8 contexts destroyed
arangodb_v8_context_destroyed 0
#TYPE arangodb_refused_followers_count counter
#HELP arangodb_refused_followers_count number of times a leader received a refusal answer from a follower
arangodb_refused_followers_count 0
#TYPE arangodb_transactions_committed counter
#HELP arangodb_transactions_committed Transactions committed
arangodb_transactions_committed 34774
#TYPE arangodb_replication_cluster_inventory_requests counter
#HELP arangodb_replication_cluster_inventory_requests Number of cluster replication inventory requests received
arangodb_replication_cluster_inventory_requests 0
#TYPE arangodb_transactions_aborted counter
#HELP arangodb_transactions_aborted Transactions aborted
arangodb_transactions_aborted 291
#TYPE arangodb_dropped_followers_count counter
#HELP arangodb_dropped_followers_count number of times a follower was dropped
arangodb_dropped_followers_count 0
#TYPE arangodb_network_forwarded_requests counter
#HELP arangodb_network_forwarded_requests Number of requests forwarded to another coordinator
arangodb_network_forwarded_requests 0
#TYPE arangodb_aql_slow_query counter
#HELP arangodb_aql_slow_query Number of slow AQL queries
arangodb_aql_slow_query 1

#TYPE arangodb_aql_query_time histogram
#HELP arangodb_aql_query_time Execution time histogram for all AQL queries [s]
arangodb_aql_query_time_bucket{le="0.000095"} 2
arangodb_aql_query_time_bucket{le="0.000191"} 109
arangodb_aql_query_time_bucket{le="0.000381"} 215
arangodb_aql_query_time_bucket{le="0.000763"} 33
arangodb_aql_query_time_bucket{le="0.001526"} 14
arangodb_aql_query_time_bucket{le="0.003052"} 4
arangodb_aql_query_time_bucket{le="0.006104"} 1
arangodb_aql_query_time_bucket{le="0.012207"} 0
arangodb_aql_query_time_bucket{le="0.024414"} 0
arangodb_aql_query_time_bucket{le="0.048828"} 1
arangodb_aql_query_time_bucket{le="0.097656"} 0
arangodb_aql_query_time_bucket{le="0.195312"} 0
arangodb_aql_query_time_bucket{le="0.390625"} 0
arangodb_aql_query_time_bucket{le="0.781250"} 1
arangodb_aql_query_time_bucket{le="1.562500"} 1
arangodb_aql_query_time_bucket{le="3.125000"} 0
arangodb_aql_query_time_bucket{le="6.250000"} 0
arangodb_aql_query_time_bucket{le="12.500000"} 0
arangodb_aql_query_time_bucket{le="25.000000"} 0
arangodb_aql_query_time_bucket{le="+Inf"} 0
arangodb_aql_query_time_count 381
#TYPE arangodb_v8_context_entered counter
#HELP arangodb_v8_context_entered V8 context enter events
arangodb_v8_context_entered 28

#TYPE arangodb_aql_slow_query_time histogram
#HELP arangodb_aql_slow_query_time Execution time histogram for slow AQL queries [s]
arangodb_aql_slow_query_time_bucket{le="4.904297"} 1
arangodb_aql_slow_query_time_bucket{le="8.808594"} 0
arangodb_aql_slow_query_time_bucket{le="16.617188"} 0
arangodb_aql_slow_query_time_bucket{le="32.234375"} 0
arangodb_aql_slow_query_time_bucket{le="63.468750"} 0
arangodb_aql_slow_query_time_bucket{le="125.937500"} 0
arangodb_aql_slow_query_time_bucket{le="250.875000"} 0
arangodb_aql_slow_query_time_bucket{le="500.750000"} 0
arangodb_aql_slow_query_time_bucket{le="1000.500000"} 0
arangodb_aql_slow_query_time_bucket{le="+Inf"} 0
arangodb_aql_slow_query_time_count 1
#TYPE arangodb_scheduler_jobs_done gauge
#HELP arangodb_scheduler_jobs_done Total number of queue jobs done
arangodb_scheduler_jobs_done 34788
#TYPE arangodb_v8_context_exited counter
#HELP arangodb_v8_context_exited V8 context exit events
arangodb_v8_context_exited 28
#TYPE arangodb_v8_context_enter_failures counter
#HELP arangodb_v8_context_enter_failures V8 context enter failures
arangodb_v8_context_enter_failures 0
#TYPE arangodb_transactions_started counter
#HELP arangodb_transactions_started Transactions started
arangodb_transactions_started 35065
#TYPE arangodb_intermediate_commits counter
#HELP arangodb_intermediate_commits Intermediate commits
arangodb_intermediate_commits 0
#TYPE arangodb_scheduler_queue_length gauge
#HELP arangodb_scheduler_queue_length Servers internal queue length (approximate)
arangodb_scheduler_queue_length 0
#TYPE arangodb_scheduler_num_working_threads gauge
#HELP arangodb_scheduler_num_working_threads Number of working threads
arangodb_scheduler_num_working_threads 2
#TYPE arangodb_v8_context_created counter
#HELP arangodb_v8_context_created V8 contexts created
arangodb_v8_context_created 2
#TYPE arangodb_sync_wrong_checksum counter
#HELP arangodb_sync_wrong_checksum number of times a wrong shard checksum was detected when syncing shards
arangodb_sync_wrong_checksum 0
#TYPE arangodb_scheduler_jobs_submitted gauge
#HELP arangodb_scheduler_jobs_submitted Total number of jobs submitted to the queue
arangodb_scheduler_jobs_submitted 34790


#TYPE arangodb_process_statistics_minor_page_faults  gauge
#HELP arangodb_process_statistics_minor_page_faults  The number of minor faults the process has made which have not required loading a memory page from disk. This figure is not reported on Windows.
arangodb_process_statistics_minor_page_faults  87932


#TYPE arangodb_process_statistics_major_page_faults  gauge
#HELP arangodb_process_statistics_major_page_faults  On Windows, this figure contains the total number of page faults. On other system, this figure contains the number of major faults the process has made which have required loading a memory page from disk.
arangodb_process_statistics_major_page_faults  0


#TYPE arangodb_process_statistics_user_time  gauge
#HELP arangodb_process_statistics_user_time  Amount of time that this process has been scheduled in user mode, measured in seconds.
arangodb_process_statistics_user_time  8.470000


#TYPE arangodb_process_statistics_system_time  gauge
#HELP arangodb_process_statistics_system_time  Amount of time that this process has been scheduled in kernel mode, measured in seconds.
arangodb_process_statistics_system_time  3.030000


#TYPE arangodb_process_statistics_number_of_threads  gauge
#HELP arangodb_process_statistics_number_of_threads  Number of threads in the arangod process.
arangodb_process_statistics_number_of_threads  59


#TYPE arangodb_process_statistics_resident_set_size  gauge
#HELP arangodb_process_statistics_resident_set_size  The total size of the number of pages the process has in real memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out. The resident set size is reported in bytes.
arangodb_process_statistics_resident_set_size  324255744


#TYPE arangodb_process_statistics_resident_set_size_percent  gauge
#HELP arangodb_process_statistics_resident_set_size_percent  The relative size of the number of pages the process has in real memory compared to system memory. This is just the pages which count toward text, data, or stack space. This does not include pages which have not been demand-loaded in, or which are swapped out. The value is a ratio between 0.00 and 1.00.
arangodb_process_statistics_resident_set_size_percent  0.004803


#TYPE arangodb_process_statistics_virtual_memory_size  gauge
#HELP arangodb_process_statistics_virtual_memory_size  On Windows, this figure contains the total amount of memory that the memory manager has committed for the arangod process. On other systems, this figure contains The size of the virtual memory the process is using.
arangodb_process_statistics_virtual_memory_size  1429065728


#TYPE arangodb_server_statistics_physical_memory gauge
#HELP arangodb_server_statistics_physical_memory Physical memory in bytes
arangodb_server_statistics_physical_memory 67513520128


#TYPE arangodb_server_statistics_server_uptime gauge
#HELP arangodb_server_statistics_server_uptime Number of seconds elapsed since server start
arangodb_server_statistics_server_uptime 16.015112


#TYPE arangodb_client_connection_statistics_client_connections gauge
#HELP arangodb_client_connection_statistics_client_connections The number of client connections that are currently open.
arangodb_client_connection_statistics_client_connections 2

#TYPE arangodb_client_connection_statistics_connection_time_bucketgauge
#HELP arangodb_client_connection_statistics_connection_time_bucketTotal connection time of a client.
arangodb_client_connection_statistics_connection_time_bucket{le="0.1"} 0
arangodb_client_connection_statistics_connection_time_bucket{le="1"} 0
arangodb_client_connection_statistics_connection_time_bucket{le="60"} 0
arangodb_client_connection_statistics_connection_time_bucket{le="+Inf"} 0

#TYPE arangodb_client_connection_statistics_connection_time_count gauge
#HELP arangodb_client_connection_statistics_connection_time_count Total connection time of a client.
arangodb_client_connection_statistics_connection_time_count 0

#TYPE arangodb_client_connection_statistics_connection_time_sum gauge
#HELP arangodb_client_connection_statistics_connection_time_sum Total connection time of a client.
arangodb_client_connection_statistics_connection_time_sum 0

#TYPE arangodb_http_request_statistics_async_requests gauge
#HELP arangodb_http_request_statistics_async_requests Number of asynchronously executed HTTP requests
arangodb_http_request_statistics_async_requests 0


#TYPE arangodb_http_request_statistics_http_delete_requests gauge
#HELP arangodb_http_request_statistics_http_delete_requests Number of HTTP DELETE requests
arangodb_http_request_statistics_http_delete_requests 107


#TYPE arangodb_http_request_statistics_http_get_requests gauge
#HELP arangodb_http_request_statistics_http_get_requests Number of HTTP GET requests
arangodb_http_request_statistics_http_get_requests 888


#TYPE arangodb_http_request_statistics_http_head_requests gauge
#HELP arangodb_http_request_statistics_http_head_requests Number of HTTP HEAD requests
arangodb_http_request_statistics_http_head_requests 0


#TYPE arangodb_http_request_statistics_http_options_requests gauge
#HELP arangodb_http_request_statistics_http_options_requests Number of HTTP OPTIONS requests
arangodb_http_request_statistics_http_options_requests 0


#TYPE arangodb_http_request_statistics_http_patch_requests gauge
#HELP arangodb_http_request_statistics_http_patch_requests Number of HTTP PATCH requests
arangodb_http_request_statistics_http_patch_requests 2


#TYPE arangodb_http_request_statistics_http_post_requests gauge
#HELP arangodb_http_request_statistics_http_post_requests Number of HTTP POST requests
arangodb_http_request_statistics_http_post_requests 33727


#TYPE arangodb_http_request_statistics_http_put_requests gauge
#HELP arangodb_http_request_statistics_http_put_requests Number of HTTP PUT requests
arangodb_http_request_statistics_http_put_requests 33


#TYPE arangodb_http_request_statistics_other_http_requests gauge
#HELP arangodb_http_request_statistics_other_http_requests Number of other HTTP requests
arangodb_http_request_statistics_other_http_requests 0


#TYPE arangodb_http_request_statistics_total_requests gauge
#HELP arangodb_http_request_statistics_total_requests Total number of HTTP requests
arangodb_http_request_statistics_total_requests 34757


#TYPE arangodb_http_request_statistics_superuser_requests gauge
#HELP arangodb_http_request_statistics_superuser_requests Total number of HTTP requests executed by superuser/JWT
arangodb_http_request_statistics_superuser_requests 0


#TYPE arangodb_http_request_statistics_user_requests gauge
#HELP arangodb_http_request_statistics_user_requests Total number of HTTP requests executed by clients
arangodb_http_request_statistics_user_requests 34757


#TYPE arangodb_v8_context_alive gauge
#HELP arangodb_v8_context_alive Number of V8 contexts currently alive
arangodb_v8_context_alive 2


#TYPE arangodb_v8_context_busy gauge
#HELP arangodb_v8_context_busy Number of V8 contexts currently busy
arangodb_v8_context_busy 0


#TYPE arangodb_v8_context_dirty gauge
#HELP arangodb_v8_context_dirty Number of V8 contexts currently dirty
arangodb_v8_context_dirty 0


#TYPE arangodb_v8_context_free gauge
#HELP arangodb_v8_context_free Number of V8 contexts currently free
arangodb_v8_context_free 2


#TYPE arangodb_v8_context_min gauge
#HELP arangodb_v8_context_min Minimum number of concurrent V8 contexts
arangodb_v8_context_min 1


#TYPE arangodb_v8_context_max gauge
#HELP arangodb_v8_context_max Maximum number of concurrent V8 contexts
arangodb_v8_context_max 16

#TYPE rocksdb_cache_allocated counter
#HELP rocksdb_cache_allocated rocksdb_cache_allocated
rocksdb_cache_allocated 1357128
#TYPE rocksdb_cache_hit_rate_lifetime counter
#HELP rocksdb_cache_hit_rate_lifetime rocksdb_cache_hit_rate_lifetime
rocksdb_cache_hit_rate_lifetime 2
#TYPE rocksdb_cache_hit_rate_recent counter
#HELP rocksdb_cache_hit_rate_recent rocksdb_cache_hit_rate_recent
rocksdb_cache_hit_rate_recent 2
#TYPE rocksdb_cache_limit counter
#HELP rocksdb_cache_limit rocksdb_cache_limit
rocksdb_cache_limit 16341509120
#TYPE rocksdb_actual_delayed_write_rate counter
#HELP rocksdb_actual_delayed_write_rate rocksdb_actual_delayed_write_rate
rocksdb_actual_delayed_write_rate 0
#TYPE rocksdb_background_errors counter
#HELP rocksdb_background_errors rocksdb_background_errors
rocksdb_background_errors 0
#TYPE rocksdb_base_level counter
#HELP rocksdb_base_level rocksdb_base_level
rocksdb_base_level 6
#TYPE rocksdb_block_cache_capacity counter
#HELP rocksdb_block_cache_capacity rocksdb_block_cache_capacity
rocksdb_block_cache_capacity 19609810944
#TYPE rocksdb_block_cache_pinned_usage counter
#HELP rocksdb_block_cache_pinned_usage rocksdb_block_cache_pinned_usage
rocksdb_block_cache_pinned_usage 16464
#TYPE rocksdb_block_cache_usage counter
#HELP rocksdb_block_cache_usage rocksdb_block_cache_usage
rocksdb_block_cache_usage 16464
#TYPE rocksdb_compaction_pending counter
#HELP rocksdb_compaction_pending rocksdb_compaction_pending
rocksdb_compaction_pending 4
#TYPE rocksdb_compression_ratio_at_level0 counter
#HELP rocksdb_compression_ratio_at_level0 rocksdb_compression_ratio_at_level0
rocksdb_compression_ratio_at_level0 0
#TYPE rocksdb_compression_ratio_at_level1 counter
#HELP rocksdb_compression_ratio_at_level1 rocksdb_compression_ratio_at_level1
rocksdb_compression_ratio_at_level1 0
#TYPE rocksdb_compression_ratio_at_level2 counter
#HELP rocksdb_compression_ratio_at_level2 rocksdb_compression_ratio_at_level2
rocksdb_compression_ratio_at_level2 0
#TYPE rocksdb_compression_ratio_at_level3 counter
#HELP rocksdb_compression_ratio_at_level3 rocksdb_compression_ratio_at_level3
rocksdb_compression_ratio_at_level3 0
#TYPE rocksdb_compression_ratio_at_level4 counter
#HELP rocksdb_compression_ratio_at_level4 rocksdb_compression_ratio_at_level4
rocksdb_compression_ratio_at_level4 0
#TYPE rocksdb_compression_ratio_at_level5 counter
#HELP rocksdb_compression_ratio_at_level5 rocksdb_compression_ratio_at_level5
rocksdb_compression_ratio_at_level5 0
#TYPE rocksdb_compression_ratio_at_level6 counter
#HELP rocksdb_compression_ratio_at_level6 rocksdb_compression_ratio_at_level6
rocksdb_compression_ratio_at_level6 5
#TYPE rocksdb_cur_size_active_mem_table counter
#HELP rocksdb_cur_size_active_mem_table rocksdb_cur_size_active_mem_table
rocksdb_cur_size_active_mem_table 88085528
#TYPE rocksdb_cur_size_all_mem_tables counter
#HELP rocksdb_cur_size_all_mem_tables rocksdb_cur_size_all_mem_tables
rocksdb_cur_size_all_mem_tables 88085528
#TYPE rocksdb_estimate_live_data_size counter
#HELP rocksdb_estimate_live_data_size rocksdb_estimate_live_data_size
rocksdb_estimate_live_data_size 1855748
#TYPE rocksdb_estimate_num_keys counter
#HELP rocksdb_estimate_num_keys rocksdb_estimate_num_keys
rocksdb_estimate_num_keys 0
#TYPE rocksdb_estimate_pending_compaction_bytes counter
#HELP rocksdb_estimate_pending_compaction_bytes rocksdb_estimate_pending_compaction_bytes
rocksdb_estimate_pending_compaction_bytes 0
#TYPE rocksdb_estimate_table_readers_mem counter
#HELP rocksdb_estimate_table_readers_mem rocksdb_estimate_table_readers_mem
rocksdb_estimate_table_readers_mem 98229
#TYPE rocksdb_is_file_deletions_enabled counter
#HELP rocksdb_is_file_deletions_enabled rocksdb_is_file_deletions_enabled
rocksdb_is_file_deletions_enabled 1
#TYPE rocksdb_is_write_stopped counter
#HELP rocksdb_is_write_stopped rocksdb_is_write_stopped
rocksdb_is_write_stopped 0
#TYPE rocksdb_live_sst_files_size counter
#HELP rocksdb_live_sst_files_size rocksdb_live_sst_files_size
rocksdb_live_sst_files_size 1855748
#TYPE rocksdb_mem_table_flush_pending counter
#HELP rocksdb_mem_table_flush_pending rocksdb_mem_table_flush_pending
rocksdb_mem_table_flush_pending 0
#TYPE rocksdb_min_log_number_to_keep counter
#HELP rocksdb_min_log_number_to_keep rocksdb_min_log_number_to_keep
rocksdb_min_log_number_to_keep 35
#TYPE rocksdb_num_deletes_active_mem_table counter
#HELP rocksdb_num_deletes_active_mem_table rocksdb_num_deletes_active_mem_table
rocksdb_num_deletes_active_mem_table 0
#TYPE rocksdb_num_deletes_imm_mem_tables counter
#HELP rocksdb_num_deletes_imm_mem_tables rocksdb_num_deletes_imm_mem_tables
rocksdb_num_deletes_imm_mem_tables 0
#TYPE rocksdb_num_entries_active_mem_table counter
#HELP rocksdb_num_entries_active_mem_table rocksdb_num_entries_active_mem_table
rocksdb_num_entries_active_mem_table 0
#TYPE rocksdb_num_entries_imm_mem_tables counter
#HELP rocksdb_num_entries_imm_mem_tables rocksdb_num_entries_imm_mem_tables
rocksdb_num_entries_imm_mem_tables 0
#TYPE rocksdb_num_files_at_level0 counter
#HELP rocksdb_num_files_at_level0 rocksdb_num_files_at_level0
rocksdb_num_files_at_level0 0
#TYPE rocksdb_num_files_at_level1 counter
#HELP rocksdb_num_files_at_level1 rocksdb_num_files_at_level1
rocksdb_num_files_at_level1 0
#TYPE rocksdb_num_files_at_level2 counter
#HELP rocksdb_num_files_at_level2 rocksdb_num_files_at_level2
rocksdb_num_files_at_level2 0
#TYPE rocksdb_num_files_at_level3 counter
#HELP rocksdb_num_files_at_level3 rocksdb_num_files_at_level3
rocksdb_num_files_at_level3 0
#TYPE rocksdb_num_files_at_level4 counter
#HELP rocksdb_num_files_at_level4 rocksdb_num_files_at_level4
rocksdb_num_files_at_level4 0
#TYPE rocksdb_num_files_at_level5 counter
#HELP rocksdb_num_files_at_level5 rocksdb_num_files_at_level5
rocksdb_num_files_at_level5 0
#TYPE rocksdb_num_files_at_level6 counter
#HELP rocksdb_num_files_at_level6 rocksdb_num_files_at_level6
rocksdb_num_files_at_level6 6
#TYPE rocksdb_num_immutable_mem_table counter
#HELP rocksdb_num_immutable_mem_table rocksdb_num_immutable_mem_table
rocksdb_num_immutable_mem_table 0
#TYPE rocksdb_num_immutable_mem_table_flushed counter
#HELP rocksdb_num_immutable_mem_table_flushed rocksdb_num_immutable_mem_table_flushed
rocksdb_num_immutable_mem_table_flushed 6
#TYPE rocksdb_num_live_versions counter
#HELP rocksdb_num_live_versions rocksdb_num_live_versions
rocksdb_num_live_versions 7
#TYPE rocksdb_num_running_compactions counter
#HELP rocksdb_num_running_compactions rocksdb_num_running_compactions
rocksdb_num_running_compactions 1
#TYPE rocksdb_num_running_flushes counter
#HELP rocksdb_num_running_flushes rocksdb_num_running_flushes
rocksdb_num_running_flushes 0
#TYPE rocksdb_num_snapshots counter
#HELP rocksdb_num_snapshots rocksdb_num_snapshots
rocksdb_num_snapshots 0
#TYPE rocksdb_oldest_snapshot_time counter
#HELP rocksdb_oldest_snapshot_time rocksdb_oldest_snapshot_time
rocksdb_oldest_snapshot_time 0
#TYPE rocksdb_size_all_mem_tables counter
#HELP rocksdb_size_all_mem_tables rocksdb_size_all_mem_tables
rocksdb_size_all_mem_tables 172566504
#TYPE rocksdb_total_sst_files_size counter
#HELP rocksdb_total_sst_files_size rocksdb_total_sst_files_size
rocksdb_total_sst_files_size 1855748
#TYPE rocksdbengine_throttle_bps counter
#HELP rocksdbengine_throttle_bps rocksdbengine_throttle_bps
rocksdbengine_throttle_bps 0

Cluster

Return whether or not a server is in read-only mode

Return the mode of this server (read-only or default)

GET /_admin/server/mode

Return mode information about a server. The json response will contain a field mode with the value readonly or default. In a read-only server all write operations will fail with an error code of 1004 (ERROR_READ_ONLY). Creating or dropping of databases and collections will also fail with error code 11 (ERROR_FORBIDDEN).

This is a public API so it does not require authentication.

Return codes

  • 200: This API will return HTTP 200 if everything is ok

Update whether or not a server is in read-only mode

Update the mode of this server (read-only or default)

PUT /_admin/server/mode

A JSON object with these properties is required:

  • mode: The mode of the server readonly or default.

Update mode information about a server. The json response will contain a field mode with the value readonly or default. In a read-only server all write operations will fail with an error code of 1004 (ERROR_READ_ONLY). Creating or dropping of databases and collections will also fail with error code 11 (ERROR_FORBIDDEN).

This API so it does require authentication and administrative server rights.

Return codes

  • 200: This API will return HTTP 200 if everything is ok

  • 401: if the request was not authenticated as a user with sufficient rights

Return id of a server in a cluster

Get to know the internal id of the server

GET /_admin/server/id

Returns the id of a server in a cluster. The request will fail if the server is not running in cluster mode.

Return codes

  • 200: Is returned when the server is running in cluster mode.

  • 500: Is returned when the server is not running in cluster mode.

Return the role of a server in a cluster

Return the role of a server in a cluster

GET /_admin/server/role

Returns the role of a server in a cluster. The role is returned in the role attribute of the result. Possible return values for role are:

  • SINGLE: the server is a standalone server without clustering
  • COORDINATOR: the server is a Coordinator in a cluster
  • PRIMARY: the server is a DBServer in a cluster
  • SECONDARY: this role is not used anymore
  • AGENT: the server is an Agency node in a cluster
  • UNDEFINED: in a cluster, UNDEFINED is returned if the server role cannot be determined.

HTTP 200 Is returned in all cases.

  • error: always false

  • code: the HTTP status code, always 200

  • errorNum: the server error number

  • role: one of [ SINGLE, COORDINATOR, PRIMARY, SECONDARY, AGENT, UNDEFINED]

Return whether or not a server is available

Return whether or not a server is available

GET /_admin/server/availability

Return availability information about a server.

This is a public API so it does not require authentication. It is meant to be used only in the context of server monitoring only.

Return codes

  • 200: This API will return HTTP 200 in case the server is up and running and usable for arbitrary operations, is not set to read-only mode and is currently not a follower in case of an active failover setup.

  • 503: HTTP 503 will be returned in case the server is during startup or during shutdown, is set to read-only mode or is currently a follower in an active failover setup.

In addition, since ArangoDB version 3.7.6, HTTP 503 will be returned in case the fill grade of the scheduler queue exceeds the configured high-water mark (adjustable via startup option --server.unavailability-queue-fill-grade), which by default is set to 100 % of the maximum queue length. I

Queries statistics of DBserver

allows to query the statistics of a DBserver in the cluster

GET /_admin/clusterStatistics

Query Parameters

  • DBserver (required): Queries the statistics of the given DBserver

Return codes

  • 200:

  • 400: ID of a DBserver

  • 403:

Queries the health of cluster for monitoring

Returns the health of the cluster as assessed by the supervision (agency)

GET /_admin/cluster/health

Queries the health of the cluster for monitoring purposes. The response is a JSON object, containing the standard code, error, errorNum, and errorMessage fields as appropriate. The endpoint-specific fields are as follows:

  • ClusterId: A UUID string identifying the cluster
  • Health: An object containing a descriptive sub-object for each node in the cluster.
    • <nodeID>: Each entry in Health will be keyed by the node ID and contain the following attributes:
      • Endpoint: A string representing the network endpoint of the server.
      • Role: The role the server plays. Possible values are "AGENT", "COORDINATOR", and "DBSERVER".
      • CanBeDeleted: Boolean representing whether the node can safely be removed from the cluster.
      • Version: Version String of ArangoDB used by that node.
      • Engine: Storage Engine used by that node.
      • Status: A string indicating the health of the node as assessed by the supervision (agency). This should be considered primary source of truth for coordinator and dbservers node health. If the node is responding normally to requests, it is "GOOD". If it has missed one heartbeat, it is "BAD". If it has been declared failed by the supervision, which occurs after missing heartbeats for about 15 seconds, it will be marked "FAILED".

      Additionally it will also have the following attributes for:

      Coordinators and DBServers

      • SyncStatus: The last sync status reported by the node. This value is primarily used to determine the value of Status. Possible values include "UNKNOWN", "UNDEFINED", "STARTUP", "STOPPING", "STOPPED", "SERVING", "SHUTDOWN".
      • LastAckedTime: ISO 8601 timestamp specifying the last heartbeat received.
      • ShortName: A string representing the shortname of the server, e.g. "Coordinator0001".
      • Timestamp: ISO 8601 timestamp specifying the last heartbeat received. (deprecated)
      • Host: An optional string, specifying the host machine if known.

      Coordinators only

      • AdvertisedEndpoint: A string representing the advertised endpoint, if set. (e.g. external IP address or load balancer, optional)

      Agents

      • Leader: ID of the agent this node regards as leader.
      • Leading: Whether this agent is the leader (true) or not (false).
      • LastAckedTime: Time since last acked in seconds.

Return codes

  • 200:

Other

Compact the entire database system data

compact all databases

PUT /_admin/compact

This command can cause a full rewrite of all data in all databases, which may take very long for large databases. It should thus only be used with care and only when additional I/O load can be tolerated for a prolonged time.

A JSON object with these properties is required:

  • changeLevel: whether or not compacted data should be moved to the minimum possible level. The default value is false.

  • compactBottomMostLevel: Whether or not to compact the bottommost level of data. The default value is false.

This endpoint can be used to reclaim disk space after substantial data deletions have taken place. It requires superuser access.

Return codes

  • 200: Compaction started successfully

  • 401: if the request was not authenticated as a user with sufficient rights

Examples

shell> curl -X PUT --header 'accept: application/json' --dump - http://localhost:8529/_admin/compact

HTTP/1.1 200 OK
content-type: application/json
connection: Keep-Alive
content-length: 2
server: ArangoDB
x-content-type-options: nosniff

{ 
}

Reloads the routing information

Reload the routing table.

POST /_admin/routing/reload

Reloads the routing information from the collection routing.

Return codes

  • 200: Routing information was reloaded successfully.