From 78744a1c971fcf881c6afaa6fdeacc7c879f4240 Mon Sep 17 00:00:00 2001 From: Rakhi Prathap Date: Thu, 10 Apr 2025 15:40:48 +0530 Subject: [PATCH 1/2] add system:group_info and system:bucket_info --- modules/n1ql/pages/n1ql-intro/sysinfo.adoc | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/modules/n1ql/pages/n1ql-intro/sysinfo.adoc b/modules/n1ql/pages/n1ql-intro/sysinfo.adoc index db3fb4399..c6e82fa7e 100644 --- a/modules/n1ql/pages/n1ql-intro/sysinfo.adoc +++ b/modules/n1ql/pages/n1ql-intro/sysinfo.adoc @@ -23,12 +23,15 @@ a| [%hardbreaks] <> <> <> +<> +<> a| [%hardbreaks] xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#vitals[system:vitals] xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-active-req[system:active_requests] xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-prepared[system:prepareds] xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-completed-req[system:completed_requests] +xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-history[system:completed_requests_history] a| [%hardbreaks] <> @@ -424,6 +427,85 @@ SELECT 2+5 FROM system:dual The query returns the result of the expression, 7 in this case. +[#querying-groups] +== Query Groups + +You can query group information using the `system:group_info` keyspace as follows: + +[source,sqlpp] +---- +SELECT * FROM system:group_info; +---- + +This catalog contains the following attributes: + +[options="header", cols="~a,~a,~a"] +|=== +|Name|Description|Schema + +|**description** + +__required__ +|User-defined description associated with the group. +|String + +|**id** + +__required__ +|ID of the group. +|String + +|**ldap_group_ref** + +__optional__ +|LDAP mapping associated with the group. +|String + +|**roles** + +__required__ +|List of RBAC roles for the group. +|Array of <> objects +|=== + +[[roles]] +**Roles** +[options="header", cols="~a,~a,~a"] +|=== +|Name|Description|Schema + +|**bucket_name** + +__optional__ +|Name of the bucket to which the role applies. +|String + +|**collection_name** + +__optional__ +|Name of the collection to which the role applies. +|String + +|**role** + +__required__ +|Specifies the RBAC role. +|String + +|**scope_name** + +__optional__ +|Name of the scope to which the role applies. +|String +|=== + +[#querying-bucket-info] +== Query Bucket Information + +The `system:bucket_info` (alias: `system:database_info`) keyspace provides comprehensive information about all buckets, including their metadata, configuration settings, memory usage, and other details. + +You can query the keyspace as follows: + +[source,sqlpp] +---- +SELECT * FROM system:bucket_info; +---- + +The query returns the same data as the xref:server:rest-api:rest-buckets-summary.adoc[pools/default/buckets] REST API. +However, the `vBucketServerMap.vBucketMap` field is returned in a more compact format as a pipe-delimited string, rather than an array of arrays. + [#sys_my-user-info] == Monitor Your User Info From a739ce7b3e59e184a716cd5ae23a44cbba68e419 Mon Sep 17 00:00:00 2001 From: Rakhi Prathap Date: Thu, 10 Apr 2025 15:48:36 +0530 Subject: [PATCH 2/2] remove a line --- modules/n1ql/pages/n1ql-intro/sysinfo.adoc | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/n1ql/pages/n1ql-intro/sysinfo.adoc b/modules/n1ql/pages/n1ql-intro/sysinfo.adoc index c6e82fa7e..993e2e38e 100644 --- a/modules/n1ql/pages/n1ql-intro/sysinfo.adoc +++ b/modules/n1ql/pages/n1ql-intro/sysinfo.adoc @@ -31,7 +31,6 @@ xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#vitals[system:vitals] xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-active-req[system:active_requests] xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-prepared[system:prepareds] xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-completed-req[system:completed_requests] -xref:n1ql:n1ql-manage/monitoring-n1ql-query.adoc#sys-history[system:completed_requests_history] a| [%hardbreaks] <>