-
Notifications
You must be signed in to change notification settings - Fork 3
/
_mongostat
41 lines (38 loc) · 2.33 KB
/
_mongostat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#compdef mongostat
verbose_values=( 1 2 3 4 5 )
_arguments -S \
"--help[Show this usage information]" \
"--version[Show version information]" \
"--verbose[More detailed log output (specify a numeric value from 1 to 5)]:arg:" \
"--quiet[Hide all log output]" \
{-h,--host}"[Server to connect to]:arg:(localhost)" \
"--port[Port to connect to]:arg:(27017)" \
"--ssl[Use SSL for all connections]" \
"--sslCAFile=[Certificate authority file for SSL]:filename:_files" \
"--sslPEMKeyFile=[PEM certificate/key file for SSl]:filename:_files" \
"--sslPEMKeyPassword=[Password for key in PEM file for SSL]:arg:" \
"--sslCRLFile=[Certificate revocation list file for SSL]:filename:_files" \
"--sslAllowInvalidHostnames[Allow connections to servers with non-matching hostnames]" \
"--sslAllowInvalidCertificates[Allow connections to servers with invalid certificates]" \
"--sslFIPSMode[Activate FIPS 140-2 mode at startup]" \
{-u,--username}"[Username for authentication]:arg:" \
{-p,--password}"[Password for authentication]:arg:" \
"--authenticationDatabase=[User source (defaults to dbname)]:arg:(admin)" \
"--authenticationMechanism=[Authentication mechanism]:arg:(SCRAM-SHA-256)" \
"--awsSessionToken=[Session token to authenticate via AWS IAM]:arg:" \
"--gssapiServiceName=[Service name to use when authenticating using GSSAPI/Kerberos]:arg:" \
"--gssapiHostName=[Remote host name to use for purpose of GSSAPI/Kerberos authentication]:arg:" \
"--uri=[MongoDB URI connection string]:arg:" \
"--humanReadable[Print sizes and time in human readable format (e.g. 1K 234M 2G). To use the more precise machine readable format, use --humanReadable=false (default: true)]:arg:" \
"--noheaders[Don't output column names]" \
{-n,--rowcount}"[Number of stats lines to print (0 for indefinite)]:arg:" \
"--discover[Discover nodes and display stats for all]" \
"--http[Use HTTP instead of raw db connection]" \
"--all[All optional fields]" \
"--json[Output as JSON rather than a formatted table]" \
"--useDeprecatedJsonKeys[Use old key names; only valid with the --json output option]" \
{-i,--interactive}"[Display stats in a non-scrolling interface]" \
"-o[Fields to show: -o=<field>,<field>, ...]:arg:" \
"-O[Like -o, but preloaded with default fields. Specified fields inserted after default output]:arg:" \
&& return 0
return 1