nzlosh / stackstorm-mongodb

StackStorm intergratation for MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mongodb integration pack

StackStorm integration for MongoDB administration. Carlos nzlosh@yahoo.com

Configuration

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

High available setups

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.

Actions

The pack provides the following actions:

collection_list

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.

collection_list

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.

user_create

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.

user_list

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.

collection_delete

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.

database_list

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.

user_update

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'.

user_delete

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.

database_delete

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.

database_create

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.

Sensors

There are no sensors available for this pack.

Authentication

  • 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:

Limitations

  • This pack is intended for MongoDB administration only and does not provide any data querying functionality.

References

  • pymongo Python module is used in this pack.

Acknowledgements

  • Antü Plasma Suite for the use of the mongodb icon under the CREATIVE COMMONS BY-SA 3.0. licence.

Documentation generated using pack2md

About

StackStorm intergratation for MongoDB

License:Apache License 2.0


Languages

Language:Python 56.0%Language:Makefile 44.0%