Access CouchDB 2.x stats

After installing CouchDB I wanted to be able to access the /_stats page which is supposed to contain a lot of statistics about the running instance. The thing is that page is now displaying

{"error":"not_found","reason":"Database does not exist."}

After looking for a long time, the solution came from IRC channel #couchdb, and I need to access /_node/couchdb@, where couchdb@ is the node name you find in vm.args on ArchLinux.

# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

# Each node in the system must have a unique name. These are specified through
# the Erlang -name flag, which takes the form nodename@hostname. CouchDB
# recommends the following values for this flag:
# 1. If this is a single node, not in a cluster, use:
#    -name couchdb@
# 2. If DNS is configured for this host, use the FQDN, such as:
#    -name
# 3. If DNS isn't configured for this host, use IP addresses only, such as:
#    -name couchdb@
# Do not rely on tricks with /etc/hosts or libresolv to handle anything
# other than the above 3 approaches correctly.
# Multiple CouchDBs running on the same machine can use couchdb1@, couchdb2@,
# etc.
-name couchdb@

# All nodes must share the same magic cookie for distributed Erlang to work.
# Comment out this line if you synchronized the cookies by other means (using
# the ~/.erlang.cookie file, for example).
-setcookie monster

# Tell kernel and SASL not to log anything
-kernel error_logger silent
-sasl sasl_error_logger false

# Use kernel poll functionality if supported by emulator
+K true

# Start a pool of asynchronous IO threads
+A 16

# Comment this line out to enable the interactive Erlang shell on startup
+Bd -noinput

comments powered by Disqus