문서 메뉴

문서 홈애플리케이션 개발MongoDB 매뉴얼

getClusterParameter

이 페이지의 내용

  • 정의
  • 구문
  • 명령 필드
  • 행동
  • 예제
getClusterParameter

getClusterParameter클러스터 매개변수 의 값을 검색하기 위한 관리 명령입니다. 클러스터 매개변수는 샤드 클러스터의 모든 노드에 영향을 미치는 구성 가능한 매개변수입니다.

getClusterParameter 을(를) 실행하려면 db.adminCommand( { command } ) 메서드를 사용합니다.

getClusterParameter 명령은 자체 관리형 설치에서만 사용할 수 있습니다. getClusterParameter 명령은 MongoDB Atlas에서 사용할 수 없습니다.

명령은 다음과 같은 구문을 가집니다:

db.adminCommand(
{
getClusterParameter: <parameter> | [<parameter>, <parameter>] | "'*'"
}
)

이 명령은 다음 필드를 사용합니다.

필드
유형
설명
<parameter>
문자열 또는 문자열 배열

다음 중 하나를 지정할 수 있습니다.

  • 조회하려는 매개변수의 이름입니다.

  • 여러 매개변수의 이름이 포함된 배열입니다.

  • '*'getClusterParameter 에 사용할 수 있는 모든 매개변수의 값을 반환합니다.

  • admin 데이터베이스에서는 getClusterParameter 만 실행할 수 있습니다. 다른 데이터베이스에서 명령을 실행하면 MongoDB에서 오류를 반환합니다.

  • 복제본 세트 또는 샤드 클러스터의 모든 노드에서 getClusterParameter 를 실행할 수 있습니다.

  • mongod 에서 getClusterParameter 를 실행하면 getClusterParameter 는 캐시된 매개변수 값을 반환합니다.

  • 에서 를 getClusterParameter 실행하면 는 mongosgetClusterParameter config 서버 에서 cluster 매개변수의 지속형 값을 반환합니다.

인증 이 활성화되면 getClusterParameter 은(는) getClusterParameter 작업에 액세스할 수 있는 역할이 있는 사용자로 인증된 경우에만 작동합니다.

참고

다음 예제의 출력은 실행 중인 MongoDB deployment의 특정 구성에 따라 달라질 수 있습니다.

다음 작업은 hostName 값을 사용하여 admin 데이터베이스에서 getClusterParameter 을 실행하여 hostName 이라는 가상의 cluster 매개변수의 값을 조회합니다.

use admin
db.adminCommand( { getClusterParameter : "hostName" } )

다음 작업은 hostNametestParameter 값을 사용하여 admin 데이터베이스에서 getClusterParameter 을 실행하여 hostNametestParameter 라는 가상의 cluster 매개변수의 값을 조회합니다.

use admin
db.adminCommand( { getClusterParameter: [ "hostName", "testParameter" ] } )

다음 작업은 '*' 값으로 getClusterParameter 를 실행하여 모든 cluster 매개변수에서 값을 검색합니다.

use admin
db.adminCommand( { getClusterParameter : '*' } )

다음도 참조하세요.

setClusterParameter 에서 이러한 매개변수에 대해 자세히 알아보세요.

← getAuditConfig