Question
Maks Atygaev · Mar 27, 2017

Chat bot for Cache instance control.

Dear InterSystems Community! Do you control your Caché or Caché controls you?

Recently, I decided to start the project about control of Caché instance. The control is based on communication with chat bot.

For example, below text message shows current statistics of the certain Cache instance.

/stat <cache-instance>

Another example (start the certain Caché instance).

/start <cache-instance>

One more example (stop the certain Caché instance).

/stop <cache-instance>

What do you think about the project? What do you think about additional functionality?

Please, feel free to share your thoughts.


UPDATE (from comments).

0. Clone instance.

/clone <cache-instance>

1. View list of Caché instances.

/list

2. Request for the status of license usage.

/license

3. Request for  the status of freespace and CPU load.

/system

4. Restart the server or some services (e.g. restart the CSP Gateway).

/restart <cache-instance or server or services>

5. Get push messages for severe alerts

/push

00
4 0 9 497
Log in or sign up to continue

Replies

Nowadays when somebody says "chatbot", it means, that such a chatbot will work on one of the popular chats. Like, Slack, Telegram, or maybe Skype. So, where your chat bot will work?

About functionality. Some time in the organization could be useful, such commands as create the new instance, or maybe clone some old one. And anyway you missed at least one command, it is a list of available instances.

But for such bot, I think should be much more than just to start or to stop instances. It is also should support, something like deploying some services there.

Thank you for your question!

Now, I think about using Telegram Bots API.

Can you provide some examples or detains about "deploying some services there"?

I think it would be really the very helpful option to run any COS command via Telegram bot.

I think what you are suggesting here is a kind of Telegram bot for several/all your Caché instances.

Great idea BTW. But what would be on the "other side" of the bot? Another Caché app or something else?

Yeah, really interesting functionality)

What about execution some kind of command directly from the chat bot?

I mean some kind of terminal directly on your device in chat bot.

Can you explain "Get push messages for severe alerts" please?

I think maybe something like this

/deploy <cache-instance> webterminal

I plan to use little lightweight http server which communicates with Telegram server.

Every action inside Telegram app generates event. The app sends every event to Telegram server.

Telegram server notifies my little lightweight http server about new events.

My server processes the events and do some certain action. For example, restart certain Cache instance.

I think it would be great to have a Telegram bot with Caché server.

Suppose you are and admin of a certain Caché server.

It would be great to have a telegram channel with it to do the following:

1. Restart the server or some services (e.g. restart the CSP Gateway).

2. Request for the status of license usage.

3. Request for  the status of freespace and CPU load.

4. Get push messages for severe alerts.

Of course, it should be secured and available for the admin of the server only. I think Telegram can provide such a functionality.