Route Slack commands to server stat scripts

BotsArtificial IntelligenceDocument/File

What it does

When someone runs the acme query server command in Slack, this automation executes the server_stats script. It posts CPU usage or IP address results back to Slack based on what was requested.

Who it's for

IT teams who need to check server stats from Slack without accessing command line tools directly.

How teams use this

Check CPU usage from Slack

Run the acme query server command and request CPU usage to see real-time processor load without logging into the server. The result posts immediately in the channel.

Look up server IP address

Query the server IP address through Slack when you need to connect to a system but do not have the address handy. The automation retrieves and posts it in the same conversation.

Add memory usage to server queries

Extend the server_stats script to include memory usage alongside CPU data, then add a condition to post memory results when someone requests it. The command structure stays the same.

Monitor server health from on-call channel

Invite the bot to an on-call channel so engineers can check CPU usage and IP address during incidents without leaving Slack. The same commands work in any channel where the bot is present.

How it works

  1. Run the acme query server command. Type the acme query server command in Slack with a request for either CPU usage or IP address information.
  2. Execute the server_stats script. Run the server_stats script on the on-premises system to gather the requested server information.
  3. Post CPU usage results to Slack. Reply in Slack with the CPU usage data from Onprem Command Line Scripts if that was requested in the command.
  4. Post IP address results to Slack. Reply in Slack with the IP address data from Onprem Command Line Scripts if that was the query instead.