Sysinfo Module

Alfred Botman

Compatibility:

Description

This module fetch various system informations, and stores them on Alfred.
You can also abuse this module to create access to various system commands.

Configuration


{
   "vars" : [
      "raid_status",
      "disk_full"
   ]
}
The vars array contains the list of custom variables to be shown when the .sysinfo command will list matching bots.

{
   "hw" : [
      {
         "name" : "manufacturer",
         "command" : "/usr/local/sbin/dmidecode -t system | grep 'Manufacturer:' | cut -d: -f2"
      },
      {
         "name" : "product_name",
         "command" : "/usr/local/sbin/dmidecode -t system | grep 'Product Name:' | cut -d: -f2"
      },
      {
         "name" : "serial_number",
         "command" : "/usr/local/sbin/dmidecode -t system | grep 'Serial Number:' | cut -d: -f2"
      }
   ],
   "commands" : [
      {
         "name" : ".uptime",
         "command" : "/usr/bin/uptime"
      },
      {
         "name" : ".psax",
         "command" : "/bin/ps ax"
      },
      {
         "name" : ".reboot",
         "command" : "/sbin/reboot"
      }
   ]
}


Commands

List system informations of a particular bot

Alfred

(09:49:42) guillaume.friloux@botnet.master.com: .sysinfo xxx
(09:49:42) Alfred Pennyworth:
Contacts that matched :
   online botman-xxx@botnet.master.com

online botman-xxx@botnet.master.com :
   manufacturer : Dell Inc.
   serial_number : XXXXX
   product_name : OptiPlex 780