Skill: SSH Server Monitor
Overview
This skill allows monitoring of server resources such as hostname, disk usage, CPU load, and memory usage by connecting to the server via SSH.
Dependencies
sshpass: Used to handle non-interactive password input for SSH connections. Install it using the following command based on your Linux distribution:
Ensure# For Debian/Ubuntu-based systems: sudo apt-get install sshpass # For Red Hat/CentOS systems: sudo yum install sshpasssshpassis properly configured on systems where the SSH Server Monitor will run.bash: The script relies on standard bash commands available in most Linux systems.
Dynamic Input Parameters
The skill accepts the following inputs dynamically:
server_ip(string): The IP address of the target server.username(string): The SSH username for authentication.password(string): The SSH password for authentication.
Outputs
The skill returns a JSON object containing:
hostname(string): The hostname of the server.disk_usage(string): Disk usage summary.cpu_load(string): CPU load information.memory_info(string): Memory usage details.
Example Usage
Input:
{
"server_ip": "192.168.1.100",
"username": "admin",
"password": "password123"
}
Output:
{
"hostname": "example-server",
"disk_usage": "45% used of 100GB",
"cpu_load": "1.23 (1m), 1.10 (5m), 0.95 (15m)",
"memory_info": "2GB used of 8GB"
}