EXPRESS_PORT (Port number where the hubot will run) MONITOR_INTERVAL (Time Interval for monitoring bot) MONITOR_RETENSION (mapped to 1 (stores a jsonobj in elasticsearch which has all hubot metrics of a current second)) MONGO_DB_URL (mongodb database name for approval process of bot actions) MONGO_COLL (mongodb collection name for approval process of bot actions) MONGO_COUNTER (mongodb collection name for storing the number of next ticket to be generated) MONGO_TICKETIDGEN (stores the Id of the collection referred by MONGO_COUNTER) APPROVAL_APP_URL (middleware application endpoint which will handle approval flow in mattermost) MONGO_DB_NAME (The database name which has MONGO_COLL and MONGO_COUNTER in it) ELASTIC_SEARCH_IP (elasticsearch ip address) ELASTIC_SEARCH_PORT (elasticsearch port) HUBOT_SLACK_TOKEN (API token for connecting with slack)
Panel
borderColor
#31B3EB
borderStyle
dashed
title
MongoDB Collections Required For Approval Flow
To implement the approval flow with the bot, the whichever collection name you stored put in MONGO_COUNTER variable(mentioned above) should be pre-created present inside the db set as by MONGO_DB_NAME.
For example- suppose you have MONGO_COUNTER=counters and MONGO_DB_NAME=hubot set in your environment. Then you should have a database called "hubot" inside your mongodb. This "hubot" should contain a collection called named "counters" having this structure: { _id: "ticketIdGenerator",seq: 100} To create a collection like this, go to your mongo shell and execute below steps:
The MONGO_TICKETIDGEN should contain the Id of the collection referred by MONGO_COUNTER. Therefore, for the above example, MONGO_TICKETIDGEN=ticketIdGenerator.