StackStorm integration for MongoDB administration. Carlos nzlosh@yahoo.com
The following options are required to be configured for the pack to work correctly.
Option | Type | Required | Secret | Description |
---|---|---|---|---|
default_profile |
string | True | The name of the default profile to use in actions. | |
profiles |
array | True | MongoDB cluster/server profiles |
Mongo databases using replication must have the replica set in the packs configuration otherwise the action will not automatically switch to the PRIMARY server and will fail.
The pack provides the following actions:
List the available collections for a database.
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
db_name |
string | True | default | The name of database to list collections. |
Create a collection in a database.
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
db_name |
string | True | default | The name of database to create the collection on. |
name |
string | True | default | The name of collection to created. |
Create a database user.
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
username |
string | True | default | Name of the user to be created. |
password |
string | True | True | Password of the user to be created. |
roles |
array | True | default | The list of Mongo roles to applied to the user. |
db_name |
string | True | default | The name of database to create the collection on. |
List users in a database.
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
db_name |
string | True | default | The name of database to create the collection on. |
Delete a collection in a database.
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
db_name |
string | True | default | The name of database to delete the collection on. |
name |
string | True | default | The name of collection to deleted. |
List the available databases in a mongo server
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
Update an existing database user.
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
username |
string | True | default | Name of the user to be created. |
password |
string | True | True | Password of the user to be created. |
roles |
array | True | default | The list of Mongo roles to applied to the user. |
db_name |
string | True | default | The name of database to create the collection on. |
mode |
string | True | default | Mode of update. 'replace' or 'merge'. |
Delete an existing database user.
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
username |
string | True | default | Name of the user to be created. |
db_name |
string | True | default | The name of database to create the collection on. |
Delete a database.
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
db_name |
string | True | default | The name of database to be dropped. |
Create a database on a mongo server
Parameter | Type | Required | Secret | Description |
---|---|---|---|---|
profile_name |
string | False | default | Mongodb profile to be used for the action. |
db_name |
string | True | default | The name of the database to be created. |
There are no sensors available for this pack.
-
To be able to administer MongoDB using this pack, a user account that has the privileges to manipulate databases, collections, documents is required.
For simlicity sakes, the
root
role has above and beyond the required access to preform any actions in this pack. However, it is not recommended to use such a role in production. The exact permissions to grant to the user will depend on the security policies of the organisation operating MongoDB.As an example of creating a root user account:
db.createUser("<db_admin_account>", { roles: [{role: "root", db: "admin"}], pwd: "<db_admin_password>"})
For more information on authentication and authorisation, seek help from the Mongo manual:
- This pack is intended for MongoDB administration only and does not provide any data querying functionality.
- pymongo Python module is used in this pack.
- Antü Plasma Suite for the use of the mongodb icon under the CREATIVE COMMONS BY-SA 3.0. licence.
Documentation generated using pack2md