Navigation

mongocli ops-manager performanceAdvisor namespaces list

The performanceAdvisor namespaces list command retrieves a list of collection namespaces experiencing slow queries for a specified host. Each namespace includes the database name, the dot (.) separator, and the collection name (e.g. <database>.<collection>).

mongocli ops-manager|om performanceadvisor|performanceAdvisor namespaces list|ls
--hostId <host-id>
[ --since <unix-epoch-timestamp> ]
[ --duration <milliseconds> ]
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
[ --projectId <project-ID> ]
Note

Use -h or --help to view the command-line help for this command.

Option
Type
Description
Required?
--hostId
string
The unique identifier of the host of a MongoDB process.
yes
--since
integer
Point in time, specified as a timestamp in the number of milliseconds that have elapsed since the UNIX epoch, from which you want to retrieve results.
no
--duration
string
Length of time from the since parameter, in milliseconds, for which you want to retrieve results.
no
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string
Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.
no
--projectId
string

Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable.

no

If the command succeeds, it returns the following output in the default format. If the command returns errors, see Troubleshooting for recommended solutions.

NAMESPACE TYPE
<database>.<collection> collection

The default output is a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the Public API reference for your MongoDB service:

The following command retrieves the namespaces for collections experiencing slow queries for a project using the default profile, which contains credentials to access the project and the project ID. The output is returned in the default format.

mongocli om performanceAdvisor namespaces list --hostId 78b0e5ae329f98047bddeac69ab40bc5

The previous command prints the following to the terminal.

NAMESPACE TYPE
sample_weatherdata.data collection
sample_mflix.movies collection
sample_analytics.transactions collection
sample_training.grades collection
sample_training.companies collection
sample_restaurants.neighborhoods collection
sample_training.inspections collection
sample_training.posts collection
sample_airbnb.listingsAndReviews collection
Give Feedback