Send server stats from Slack to on-premises script
BotsArtificial IntelligenceDocument/File
What it does
When someone runs the acme query server command in Slack, this automation executes a Python script on the on-premises server. It returns either processor and memory stats or the host name, depending on the parameter passed.
Who it's for
Engineering teams who need to check server performance metrics from Slack without accessing the command line directly.
How teams use this
Check processor and memory from Slack
Run the acme query server cpu command to get instant processor percentage and memory usage stats posted to the channel. The team monitors performance without leaving Slack.
Retrieve host name for troubleshooting
Run the acme query server ip command to get the host name posted to Slack during incident response. This helps the team identify the server quickly.
Add disk space check to the script
Extend the Python script to include a disk parameter that returns available disk space when someone runs acme query server disk. Only the script needs to be updated.
How it works
- Run the acme query server command. Type the acme query server command in Slack with either cpu or ip as the parameter to specify which stats to retrieve.
- Execute Get Server Stats script. Onprem Command Line Scripts runs the Python script on the on-premises server with the parameter from Slack to gather the requested server information.
- Reply with processor and memory stats. Post the script output as a message in the Slack channel so the team sees processor and memory usage or the host name based on what was requested.