$ curl localhost:9102/getIndexStatus
{
"code": "success",
"status": [
{
"defnId": 15184130463866081000,
"name": "breweries",
"bucket": "beer-sample",
"secExprs": [ "`name`" ],
"status": "Ready",
"hosts": [ "127.0.0.1:8091" ]
},
{
"defnId": 16833079877526070000,
"name": "#primary",
"bucket": "beer-sample",
"isPrimary": true,
"status": "Ready",
"hosts": [ "127.0.0.1:8091" ]
},
]
}
- defnId = Internal id of the index
- name = User supplied name
- bucket = The bucket the index is defined on
- secExpres = Expressions defining the index fields (ordered)
- status = Index status (Not Available / Created / Build / Ready)
- isPrimary = Indicates if index is primary (index on document key)
- host = Indexer node serving this index
$ curl localhost:9102/stats
{
"default:num_mutations_queued" : 0,
"default:first_name:scan_bytes_read" : 0,
"default:first_name:avg_scan_latency" : 0,
"default:first_name:total_scan_duration" : 0,
"default:first_name:get_bytes" : 0,
"default:first_name:num_docs_queued" : 0,
"default:first_name:num_compactions" : 0,
"memory_quota" : 268435456,
"needs_restart" : false,
"memory_used" : 823296,
"default:first_name:num_docs_pending" : 0,
"default:first_name:scan_wait_duration" : 0,
"default:first_name:delete_bytes" : 0,
"default:first_name:flush_queue_size" : 0,
"default:first_name:num_flush_queued" : 0,
"default:first_name:num_rows_returned" : 0,
"default:first_name:avg_ts_interval" : 0,
"default:mutation_queue_size" : 0,
"default:first_name:num_snapshots" : 0,
"default:first_name:disk_size" : 20480,
"default:first_name:insert_bytes" : 0,
"default:first_name:items_count" : 0,
"default:first_name:data_size" : 0,
"num_connections" : 0,
"default:first_name:num_commits" : 0,
"default:first_name:avg_scan_wait_latency" : 0,
"default:first_name:build_progress" : 100,
"default:first_name:num_requests" : 0,
"default:first_name:num_docs_indexed" : 0
}
For each index following set of stats will be published with bucket:index_name:stats_name format:
Number of scan requests served by the indexer
Number of items currently in the flusher queue
Number of items inserted into flusher queue so far
Mean scan latency
Mean latency incurred in waiting for read snapshot
Number of compactions performed the indexer
Number of database commits performed by the indexer
Number of storage snapshots generated
Average interval for snapshot generation
Number of documents yet to be received from KV by the indexer.
Total number rows returned so far by the indexer
Number of documents queued in indexer, but not indexed yet
Total number of docs indexed so far by the indexer from the time indexer has restarted.
Total number of item mutations applied in the index. For array indexes, one document mutation may lead to multiple items to be updated.
Total number of docs processed by the indexer with respect to the bucket. This stat is computed based on latest kv sequence numbers seen by the indexer for all vbuckets.
Total disk file size consumed by the index
Actual data size consumed by the index
Total decoded bytes read from the index for serving scan requests
Current total number of rows in the index. This is an approximate count and may be incorrect.
Initial build progress for the index. When index has completed initial build, this stat will disappear from the stats.
Bytes requested to forestdb operations (insert, delete, get)
Current num connections used by indexer
Whether indexer needs restart to apply current mem_quota settings
Total time taken (ns) for readable snapshot to be available for consistent query (similar to stale=false)
Time taken for index scans
Total mutations queued so far
Current number of items in the mutations queue
Memory quota set for the indexer
Memory used by the storage engine
All normal setings get/set should go through metakv.
Indexer will be able to dynamically update all the settings during runtime except memory_quota.
Persisted snapshot intervals should be multiple of inmemory snapshot interval
Minimum: 100ms
Minimum file size required to trigger compaction
Minimum: 50MB
Intervals to check if compaction threshold has reached
Minimum: 60s
Minimum fragmentation percentage to trigger compaction
Minimum: 5%
Time interval during which compaction should be allowed to run (start_hr:start_min, end_hr:end_min)
Default value "00:00,00:00" means anytime.
Minimum: 100%
If it is set to 0, indexer will use all cpus
Indexer memory quota for forestdb.
Minimum: 0 (Disabled)
Maximum number of snapshots to be kept even after compaction on forestdb
Minimum: 1
All normal get/set should go through metakv.
For reading settings for debugging:
$ curl localhost:9102/settings
{
"settings:compaction:min_frag" : 30,
"settings:persisted_snapshot:interval" : 200,
"settings:inmemory_snapshot:interval" : 200,
"settings:max_cpu_percent" : 100,
"settings:compaction:check_period" : 60,
"settings:compaction:min_size" : 1048576,
"settings:memory_quota" : 0,
"settings:recovery:max_rollbacks" : 5,
"settings:compaction:interval" : "00:00,00:00"
}
To writing settings for debugging, read settings into a file, modify and
curl localhost:9102/settings -d @settings:json
$ curl localhost:9102/triggerCompaction