Skip to content

Commit

Permalink
Update config for Redocly from sync_gateway source
Browse files Browse the repository at this point in the history
This will update x-internal settings.

via #781
and discussion with @torcolvin
  • Loading branch information
osfameron committed Feb 20, 2024
1 parent 7bfb90e commit 709cabb
Show file tree
Hide file tree
Showing 10 changed files with 1,810 additions and 510 deletions.
313 changes: 203 additions & 110 deletions modules/ROOT/assets/attachments/bundled-admin.yaml

Large diffs are not rendered by default.

80 changes: 68 additions & 12 deletions modules/ROOT/assets/attachments/bundled-metric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: Sync Gateway
description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server
version: 3.1.0
version: 3.2.0
license:
name: Business Source License 1.1 (BSL)
url: https://github.com/couchbase/sync_gateway/blob/master/LICENSE
Expand All @@ -19,9 +19,39 @@ servers:
hostname:
description: The hostname to use
default: localhost
tags:
- name: Prometheus
description: Endpoints for use with Prometheus
externalDocs:
description: Sync Gateway Quickstart | Couchbase Docs
url: https://docs.couchbase.com/sync-gateway/current/index.html
paths:
/_metrics:
/_ping:
get:
summary: Check if API is available
description: Returns OK status if API is available.
responses:
'200':
description: Returned status
content:
text/plain:
schema:
type: string
example: OK
tags:
- Server
operationId: get__ping
head:
responses:
'200':
description: Server is available
tags:
- Server
summary: Check if API is available
description: Returns OK status if API is available.
operationId: head__ping
/_metrics:
get: &ref_0
summary: Debugging/monitoring runtime stats in Prometheus Exposition format
description: |-
Returns Sync Gateway statistics and other runtime variables in Prometheus Exposition format.
Expand All @@ -40,7 +70,9 @@ paths:
type: string
tags:
- Prometheus
operationId: get__metrics
operationId: get_metrics
/metrics:
get: *ref_0
/_expvar:
get:
summary: Get all Sync Gateway statistics
Expand All @@ -61,7 +93,7 @@ paths:
application/javascript:
schema:
type: object
properties: &ref_0
properties: &ref_1
cmdline:
description: Built-in variables from the Go runtime, lists the command-line arguments
type: object
Expand Down Expand Up @@ -151,42 +183,72 @@ paths:
properties:
admin_net_bytes_recv:
type: integer
description: The total number of bytes received (since node start-up) on the network interface to which the Sync Gateway api.admin_interface is bound.
admin_net_bytes_sent:
type: integer
description: The total number of bytes sent (since node start-up) on the network interface to which the Sync Gateway api.admin_interface is bound.
error_count:
type: integer
description: The total number of errors logged.
go_memstats_heapalloc:
type: integer
description: HeapAlloc is bytes of allocated heap objects. Allocated heap objects include all reachable objects, as well as unreachable objects that the garbage collector has not yet freed. Specifically, HeapAlloc increases as heap objects are allocated and decreases as the heap is swept and unreachable objects are freed. Sweeping occurs incrementally between GC cycles, so these two processes occur simultaneously, and as a result HeapAlloc tends to change smoothly (in contrast with the sawtooth that is typical of stop-the-world garbage collectors).
go_memstats_heapidle:
type: integer
description: HeapIdle is bytes in idle (unused) spans. Idle spans have no objects in them. These spans could be (and may already have been) returned to the OS, or they can be reused for heap allocations, or they can be reused as stack memory. HeapIdle minus HeapReleased estimates the amount of memory that could be returned to the OS, but is being retained by the runtime so it can grow the heap without requesting more memory from the OS. If this difference is significantly larger than the heap size, it indicates there was a recent transient spike in live heap size.
go_memstats_heapinuse:
type: integer
description: HeapInuse is bytes in in-use spans. In-use spans have at least one object in them. These spans an only be used for other objects of roughly the same size. HeapInuse minus HeapAlloc estimates the amount of memory that has been dedicated to particular size classes, but is not currently being used. This is an upper bound on fragmentation, but in general this memory can be reused efficiently.
go_memstats_heapreleased:
type: integer
description: HeapReleased is bytes of physical memory returned to the OS. This counts heap memory from idle spans that was returned to the OS and has not yet been reacquired for the heap.
go_memstats_pausetotalns:
type: integer
description: PauseTotalNs is the cumulative nanoseconds in GC stop-the-world pauses since the program started. During a stop-the-world pause, all goroutines are paused and only the garbage collector can run.
go_memstats_stackinuse:
type: integer
description: StackInuse is bytes in stack spans. In-use stack spans have at least one stack in them. These spans can only be used for other stacks of the same size. There is no StackIdle because unused stack spans are returned to the heap (and hence counted toward HeapIdle).
go_memstats_stacksys:
type: integer
description: StackSys is bytes of stack memory obtained from the OS. StackSys is StackInuse, plus any memory obtained directly from the OS for OS thread stacks (which should be minimal).
go_memstats_sys:
type: integer
description: Sys is the total bytes of memory obtained from the OS. Sys is the sum of the XSys fields below. Sys measures the virtual address space reserved by the Go runtime for the heap, stacks, and other internal data structures. It's likely that not all of the virtual address space is backed by physical memory at any given moment, though in general it all was at some point.
goroutines_high_watermark:
type: integer
description: Peak number of go routines since process start.
num_goroutines:
type: integer
process_cpu_percent_utilization:
description: The total number of goroutines.
num_idle_kv_ops:
type: integer
description: The total number of idle kv operations.
process_cpu_percent_utilization:
type: number
format: float
description: The CPU utilization as percentage value * 10. The extra 10 multiplier is a mistake left for backwards compatibility. Please consider using node_cpu_percent_utilization as of version 3.2. The CPU usage calculation is performed based on user and system CPU time, but it does not include components such as iowait. The derivation means that the values of process_cpu_percent_utilization and %Cpu, returned when running the top command, will differ.
node_cpu_percent_utilization:
type: number
format: float
description: The node CPU utilization as percentage value, since the last time this stat was called. The CPU usage calculation is performed based on user and system CPU time, but it does not include components such as iowait.
process_memory_resident:
type: integer
description: The memory utilization (Resident Set Size) for the process, in bytes.
pub_net_bytes_recv:
type: integer
description: The total number of bytes received (since node start-up) on the network interface to which the Sync Gateway api.public_interface is bound. By default, that is the number of bytes received on 127.0.0.1:4984 since node start-up
pub_net_bytes_sent:
type: integer
description: The total number of bytes sent (since node start-up) on the network interface to which Sync Gateway api.public_interface is bound. By default, that is the number of bytes sent on 127.0.0.1:4984 since node start-up.
system_memory_total:
type: integer
description: The total memory available on the system in bytes.
warn_count:
type: integer
description: The total number of warnings logged.
uptime:
type: integer
description: The total uptime.
per_db:
description: |-
This array contains stats for all databases declared in the config file -- see the [Sync Gateway Statistics Schema](./../stats-monitoring.html) for more details on the metrics collected and reported by Sync Gateway.
Expand Down Expand Up @@ -262,14 +324,8 @@ paths:
type: integer
deprecated: true
operationId: get__expvar
tags:
- name: Prometheus
description: Endpoints for use with Prometheus
externalDocs:
description: Sync Gateway Quickstart | Couchbase Docs
url: https://docs.couchbase.com/sync-gateway/current/index.html
components:
schemas:
ExpVars:
type: object
properties: *ref_0
properties: *ref_1
68 changes: 46 additions & 22 deletions modules/ROOT/assets/attachments/bundled-public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
title: Sync Gateway
description: Sync Gateway manages access and synchronization between Couchbase Lite and Couchbase Server
version: 3.1.0
version: 3.2.0
license:
name: Business Source License 1.1 (BSL)
url: https://github.com/couchbase/sync_gateway/blob/master/LICENSE
Expand All @@ -19,6 +19,26 @@ servers:
hostname:
description: The hostname to use
default: localhost
tags:
- name: Server
description: Manage server activities
- name: Database Management
description: Create and manage Sync Gateway databases
- name: Session
description: Manage user sessions
- name: Authentication
description: Manage OpenID Connect Authentication
- name: Document
description: Create and manage documents
- name: Document Attachment
description: Create and manage document attachments
- name: Replication
description: Create and manage inter-Sync Gateway replications
- name: Unsupported
description: Endpoints that are not supported by Sync Gateway
externalDocs:
description: Sync Gateway Quickstart | Couchbase Docs
url: https://docs.couchbase.com/sync-gateway/current/index.html
paths:
/{db}/_session:
parameters:
Expand Down Expand Up @@ -362,6 +382,30 @@ paths:
summary: Check if server online
description: Check if the server is online by checking the status code of response.
operationId: head_-
/_ping:
get:
summary: Check if API is available
description: Returns OK status if API is available.
responses:
'200':
description: Returned status
content:
text/plain:
schema:
type: string
example: OK
tags:
- Server
operationId: get__ping
head:
responses:
'200':
description: Server is available
tags:
- Server
summary: Check if API is available
description: Returns OK status if API is available.
operationId: head__ping
/{keyspace}/:
parameters:
- name: keyspace
Expand Down Expand Up @@ -414,7 +458,7 @@ paths:
type: string
_exp:
description: |-
Expiry time after which the document will be purged. The expiration time is set and managed on the Couchbase Server document. The value can be specified in two ways; in ISO-8601 format, for example the 6th of July 2022 at 17:00 in the BST timezone would be `2016-07-06T17:00:00+01:00`; it can also be specified as a numeric Couchbase Server expiry value. Couchbase Server expiries are specified as Unix time, and if the desired TTL is below 30 days then it can also represent an interval in seconds from the current time (for example, a value of 5 will remove the document 5 seconds after it is written to Couchbase Server). The document expiration time is returned in the response of `GET /{db}/{doc} ` when `show_exp=true` is included in the query.
Expiry time after which the document will be purged. The expiration time is set and managed on the Couchbase Server document. The value can be specified in two ways; in ISO-8601 format, for example the 6th of July 2022 at 17:00 in the BST timezone would be `2016-07-06T17:00:00+01:00`; it can also be specified as a numeric Couchbase Server expiry value. Couchbase Server expiry values are specified as Unix time, and if the desired TTL is below 30 days then it can also represent an interval in seconds from the current time (for example, a value of 5 will remove the document 5 seconds after it is written to Couchbase Server). The document expiration time is returned in the response of `GET /{db}/{doc} ` when `show_exp=true` is included in the query.
As with the existing explicit purge mechanism, this applies only to the local database; it has nothing to do with replication. This expiration time is not propagated when the document is replicated. The purge of the document does not cause it to be deleted on any other database.
type: string
Expand Down Expand Up @@ -2881,26 +2925,6 @@ paths:
tags:
- Replication
operationId: get_db-_blipsync
tags:
- name: Server
description: Manage server activities
- name: Database Management
description: Create and manage Sync Gateway databases
- name: Session
description: Manage user sessions
- name: Authentication
description: Manage OpenID Connect Authentication
- name: Document
description: Create and manage documents
- name: Document Attachment
description: Create and manage document attachments
- name: Replication
description: Create and manage inter-Sync Gateway replications
- name: Unsupported
description: Endpoints that are not supported by Sync Gateway
externalDocs:
description: Sync Gateway Quickstart | Couchbase Docs
url: https://docs.couchbase.com/sync-gateway/current/index.html
components:
parameters:
db:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.0
7.3.0
Loading

0 comments on commit 709cabb

Please sign in to comment.