Written by

Java Software Engineer
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

Comments

Dmitry Maslennikov · Mar 27, 2017

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.

0
Maks Atygaev  Mar 27, 2017 to Dmitry Maslennikov

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"?

0
Evgeny Shvarov  Mar 27, 2017 to Maks Atygaev

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

0
Evgeny Shvarov  Mar 27, 2017 to Dmitry Maslennikov

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?

0
Maks Atygaev  Mar 27, 2017 to Evgeny Shvarov

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.

0
Maks Atygaev  Mar 27, 2017 to Evgeny Shvarov

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

0
Dmitry Maslennikov  Mar 27, 2017 to Maks Atygaev

I think maybe something like this

/deploy <cache-instance> webterminal
0
Maks Atygaev  Mar 27, 2017 to Evgeny Shvarov

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.

0
Evgeny Shvarov · Mar 27, 2017

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.

0