mongo-rs-status

command module
v0.0.0-...-7c9c2d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: BSD-2-Clause Imports: 10 Imported by: 0

README

mongo-rs-status

This app checks the replicaSet status of a mongo cluster, as seeen by one of its members, and (optionally) starts a replicaSet in the cluster.

Usage

mongo-rs-status [-uri mongodb://uri] [-timeout timeoutSeconds] [-admindb AdminDB] [-initiate rsConfigDocument]

Where:

  • -uri is the mongodb URL of the mongo server to connect to. Defaults to the value of the environment variable MONGODB_URI, or mongodb://localhost:27017 if it is not defined.
  • -timeout is the timeout for any request to mongo. Defaults to 10 seconds.
  • -admindb is the name of the administrative db. Defaults to admin.

By default, the program prints the result of running the replSetGetStatus command in the server, if -initiate is not provided.

If -initiate is provided, with the path to a replicaSet initial configuration document (a json file in the same format as would be used to call rs.initiate), the application prints the result of running the replSetInitiate command with that document.

The value of initiate can be -, in which case the replicaSet initial configuration document is read from stdin.

Build

To build the image, run:

docker build --rm -t warpcomdev/mongo-rs-status:latest .

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL