Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ /
Atlas CLI
/ /

Atlas accessLogs list

クラスター名またはホスト名で識別されるクラスターのアクセス ログを検索します。

このコマンドを使用するには、プロジェクト モニタリング管理者ロールのユーザー アカウントまたは API キーで認証する必要があります。

コマンド構文
atlas accessLogs list [options]
名前
タイプ
必須
説明

--authResult

string

false

Atlas が返す認証試行。 成功に設定すると、Atlas はログをフィルタリングして、成功した認証試行のみを返します。 失敗するように設定すると、Atlas はログをフィルタリングして失敗した認証試行のみを返します。

--clusterName

string

false

クラスターの名前。 詳しくは、 https://docub.mongodb.org/core/create-cluster-api を参照してください。

--hostname と相互に排他的。

--end

string

false

Atlas がデータベース アクセス ログから返す最後のエントリの、UNIX エポックからの経過ミリ秒単位のタイムスタンプ。

-h, --help

false

リスト用のヘルプ

--hostname

string

false

認証試行を受信するターゲット ノードの完全修飾ドメイン名(FQDN)。

--clusterName と相互に排他的です。

--ip

string

false

データベースへの認証を試みた IP アドレス。 Atlas は返されたログをフィルタリングして、この IP アドレスのみを持つドキュメントを含めます。

--nLog

整数

false

返されるログの最大行数。

-o, --output

string

false

出力形式。 有効な値は、 JSON 、 JSON -path、go-template、または go-template-file です。 完全な出力を表示するには、 -o JSONオプションを使用します。

--projectId

string

false

使用するプロジェクトを識別する 16 進数の string。 このオプションは、構成ファイルまたは環境変数の 設定を上書きします。

--start

string

false

Atlas がデータベース アクセス ログから返す最初のエントリの、UNIX エポックからの経過ミリ秒単位のタイムスタンプ。

名前
タイプ
必須
説明

-P, --profile

string

false

構成ファイルから使用するプロファイルの名前。 Atlas CLI のプロファイルの詳細については、 https://docub.mongodb.org/core/atlas-cli-save- connection-settings を参照してください。

# Return a JSON-formatted list of all authentication requests made against the cluster named Cluster0 for the project with ID 618d48e05277a606ed2496fe:
atlas accesslogs list --output json --projectId 618d48e05277a606ed2496fe --clusterName Cluster0
# Return a JSON-formatted list of all authentication requests made against the hostname named atlas-dqrlj4-shard-00-00.g1nxq.mongodb-dev.net for the project stored in the profile atlas-dev:
atlas accesslogs list --hostname atlas-dqrlj4-shard-00-00.g1nxq.mongodb-dev.net --profile atlas-dev --output json

戻る

accessLogs

項目一覧