AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

hello (데이터베이스 명령)

hello

버전 4.2에 추가 되었습니다.

hello returns a document that describes the role of the mongod instance. If the optional field saslSupportedMechs is specified, the command also returns an array of SASL mechanisms used to create the specified user's credentials.

If the instance is a member of a replica set, then hello returns a subset of the replica set configuration and status including whether or not the instance is the primary of the replica set.

When sent to a mongod instance that is not a member of a replica set, hello returns a subset of this information.

MongoDB drivers and clients use hello to determine the state of the replica set members and to discover additional members of a replica set.

이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

참고

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

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

db.runCommand(
{
hello: 1
}
)

The hello command accepts optional fields saslSupportedMechs: <db.user> to return an additional field hello.saslSupportedMechs in its result and comment <any> to add a log comment associated with the command.

db.runCommand(
{
hello: 1,
saslSupportedMechs: "<db.username>",
comment: <any>
}
)

The db.hello() method in mongosh provides a wrapper around hello.

If the client that issued hello disconnects before the operation completes, MongoDB marks hello for termination using killOp.

The following hello fields are common across all roles:

hello.isWritablePrimary

이 노드가 쓰기 가능한 시점을 보고하는 부울 값입니다. true인 경우, 이 인스턴스는 복제본 세트의 프라이머리 인스턴스이거나 mongos 인스턴스 또는 독립형 mongod입니다.

인스턴스가 복제본 집합의 보조 멤버이거나 멤버가 복제본 집합의 중재자인 경우 이 필드는 false이(가) 됩니다.

hello.topologyVersion

MongoDB에서 내부용으로 사용합니다.

hello.maxBsonObjectSize

mongod 프로세스에 대한BSON 객체의 최대 허용 크기(바이트)입니다. 제공되지 않을 경우 클라이언트는 최대 크기가 '16 * 1024 * 1024'인 것으로 가정해야 합니다.

hello.maxMessageSizeBytes

BSON 유선 프로토콜 메시지의 최대 허용 크기입니다. 기본값은 48000000바이트입니다.

hello.maxWriteBatchSize

쓰기 배치에 허용되는 최대 쓰기 작업 수입니다. 배치가 이 제한을 초과하면 클라이언트 드라이버는 배치를 이 필드 값보다 작거나 같은 수의 작은 그룹으로 나눕니다.

이 제한값은 100,000회 쓰기입니다.

hello.localTime

로컬 서버 시간을 UTC로 반환합니다. 이 값은 ISO 날짜입니다.

hello.logicalSessionTimeoutMinutes

세션이 가장 최근에 사용한 후 활성 상태로 유지되는 시간 (분). 클라이언트로부터 새 읽기/쓰기 작업을 받지 못했거나 이 임계값 내에서 refreshSessions 로 새로 고쳐지지 않은 세션은 캐시에서 지워집니다. 만료된 세션과 관련된 상태는 언제든지 서버에 의해 정리될 수 있습니다.

featureCompatibilityVersion이(가) "3.6" 이상인 경우에만 사용할 수 있습니다.

hello.connectionId

클라이언트에 대한 mongod / mongos 인스턴스의 발신 연결 식별자입니다.

hello.minWireVersion

이 mongod 또는 mongos 인스턴스가 클라이언트와 통신하는 데 사용할 수 있는 유선 프로토콜의 최신 버전입니다.

Clients may use minWireVersion to help negotiate compatibility with MongoDB.

hello.maxWireVersion

이 mongod 또는 mongos 인스턴스가 클라이언트와 통신하는 데 사용할 수 있는 유선 프로토콜의 최신 버전

Clients may use maxWireVersion to help negotiate compatibility with MongoDB.

hello.readOnly

true일 때 mongod 또는 mongos가 읽기 전용 모드로 실행 중임을 나타내는 부울 값입니다.

hello.compression

클라이언트와 mongod 또는 mongos 인스턴스 간의 통신을 압축하는 데 사용되었거나 사용 가능한 압축 알고리즘(즉, 클라이언트와 mongod 또는 mongos 인스턴스 모두에 공통)을 나열하는 배열입니다.

이 필드는 압축을 사용하는 경우에만 사용할 수 있습니다. 예시:

  • If the mongod is enabled to use both the snappy,zlib compressors and a client has specified zlib, the compression field would contain:

    "compression": [ "zlib" ]
  • If the mongod is enabled to use both the snappy,zlib compressors and a client has specified zlib,snappy, the compression field would contain:

    "compression": [ "zlib", "snappy" ]
  • If the mongod is enabled to use the snappy compressor and a client has specified zlib,snappy, the compression field would contain :

    "compression": [ "snappy" ]
  • mongod이(가) snappy 압축기를 사용하도록 활성화되어 있고 클라이언트가 zlib을(를) 지정했거나 클라이언트가 압축기를 지정하지 않은 경우 이 필드는 생략됩니다.

즉, 클라이언트가 압축을 지정하지 않거나 클라이언트가 연결된 mongod 또는 mongos 인스턴스에 대해 활성화되지 않은 압축기를 지정하는 경우 필드가 반환되지 않습니다.

hello.saslSupportedMechs

하나 이상의 사용자 자격 증명을 생성하는 데 사용되는 SASL 메커니즘의 배열입니다. 지원되는 SASL 메커니즘은 다음과 같습니다.

  • GSSAPI

  • SCRAM-SHA-256

  • SCRAM-SHA-1

필드는 saslSupportedMechs 필드와 함께 명령이 실행되는 경우에만 반환됩니다.

db.runCommand( { hello: 1, saslSupportedMechs: "<db.username>" } )

mongos instances add the following field to the hello response document:

hello.msg

Contains the value isdbgrid when hello returns from a mongos instance.

hello 은(는) 복제본 세트의 멤버가 반환할 때 다음 필드를 포함합니다.

hello.hosts

숨김, 수동 또는 중재자가 아닌 복제본 세트의 모든 멤버를 나열하는 "[hostname]:[port]" 형식의 문자열 배열입니다.

Drivers use this array and the hello.passives to determine which members to read from.

hello.setName

현재 복제본 세트의 이름입니다.

hello.setVersion

현재 복제본 세트 구성 버전

hello.secondary

true일 때 mongod가 복제본 세트의 세컨더리 멤버인지 여부를 나타내는 부울 값입니다.

hello.passives

members[n].priority이(가) 0인 복제본 세트의 모든 멤버를 나열하는 "[hostname]:[port]" 형식의 문자열 배열입니다.

이 필드는 members[n].priority가 0인 멤버가 한 명 이상 있는 경우에만 표시됩니다.

Drivers use this array and the hello.hosts to determine which members to read from.

hello.arbiters

중재자인 복제본 세트의 모든 구성원을 나열하는 "[hostname]:[port]" 형식의 문자열 배열입니다.

이 필드는 복제본 세트에 중재자가 한 명 이상 있는 경우에만 표시됩니다.

hello.primary

복제본 세트의 현재 프라이머리 멤버를 나열하는 "[hostname]:[port]" 형식의 문자열

hello.arbiterOnly

A boolean value that , when true, indicates that the current instance is an arbiter. The arbiterOnly field is only present, if the instance is an arbiter.

hello.passive

A boolean value that, when true, indicates that the current instance is passive. The passive field is only present for members with a members[n].priority of 0.

hello.hidden

A boolean value that, when true, indicates that the current instance is hidden. The hidden field is only present for hidden members.

hello.tags

tags 문서에는 복제본 세트 멤버를 위한 사용자 정의 태그 필드와 값 쌍이 포함되어 있습니다.

{ "<tag1>": "<string1>", "<tag2>": "<string2>",... }

자세한 내용은 복제본 세트 태그 세트 구성에서 확인하세요.

hello.me

The [hostname]:[port] of the member that returned hello.

hello.electionId

A unique identifier for each election. Included only in the output of hello for the primary. Used by clients to determine when elections occur.

hello.lastWrite

데이터베이스의 가장 최근 쓰기 작업에 대한 optime 및 날짜 정보가 포함된 문서입니다.

hello.lastWrite.opTime

마지막 쓰기 작업의 optime을 제공하는 객체입니다.

hello.lastWrite.lastWriteDate

마지막 쓰기 작업의 시간을 포함하는 날짜 객체입니다.

hello.lastWrite.majorityOpTime

majority 읽기로 읽을 수 있는 마지막 쓰기 작업의 optime을 제공하는 객체입니다.

hello.lastWrite.majorityWriteDate

majority 읽기로 읽을 수 있는 마지막 쓰기 작업 시간을 포함하는 날짜 객체입니다.

ok 상태 필드, operationTime 필드, $clusterTime 필드에 대한 자세한 내용은 명령 응답을 참조하세요.

이 페이지 평가하기

이 페이지의 내용