GNOSIS/Kraken

From Genunix

http://docs.google.com/Doc?id=df6hcjb2_12fvc6tq

Contents

Description

There is an unfilled need for a Solaris open source system inventory application. There are also no open source data center automation tools available. This lead us to start working on a project dedicated to filling these needs.

Goals

Initial

  1. It will be as automated as possible, both populating its own information and cross-checking with reality.
    1. A simple example would be to query DNS to make sure that forward and reverse records for a given host reflect what's in the database.
    2. As a more complex example, the database should be able to probe the remote systems for say, MAC addresses/HostIDs, devices attached to its SCSI/Fibre-channel buses, Veritas volume layouts, etc.
    3. Automation here is key; manually maintained databases are liable to fall into suboptimal states.
  2. Describe the assets as instances of classes and subclasses. Design the structure with object inheritance. (Preferable use Ruby or Python to implement)
  3. The presentation (and not just the database itself) should be relational.
    • For example, Photons would be inventory items in their own right, but their records will hang off the system(s) that they are attached to (glue records will hold connection information; SCSI bus numbers and/or the like).
  4. Support multiple methods of data entry
  5. A high level of integration with information about contracts, BIND?DHCP et al. and a Grand Unified Monitoring System (Nagios, SunMC, OpenNMS)
  6. Make sure the system is extend-able.
  7. The system will be as flexible as possible to include many different types of assets to be tracked. (starting initially with Solaris hosts)

Future

  1. Add functionality to actually do system management from the website. e.g. migrate a container from one system to another.
  2. Integrate with cfgengine
  3. Integrate Inventory system with RT Workflow
  4. Integrate inventory system with QIP
  5. Integrate Inventory system with Nagios
  6. Setup a method to send email from a pager and query for data about a system. e.g. - Send an email to qhost@vj.com, which brings back a small summary of data about the host. Most likely data would include location.
  7. Ideal we should be able to verify that patchsets and package sets match what they are supposed to be
  8. Add other OSes. (Way down the road)

Object Classes

Host class

  • Management IP
  • DNS name
  • Serial #
  • Bar-code ID
  • Manufacturer
  • Model
  • Description

Host subclasses

Server
Server Model
(Sun)
  • Hostid
  • Disk Drive(s)
  • Memory Slots
  • Memory Module
  • Slots
  • PCI Card
  • CPU Module
  • HBA
  • NIC
  • Architecture
    • x86-64
    • Sparc
      • OBP Version
  • OS
    • OS Version
    • Kernel Rev
Storage unit
SAN Switch
Tape Library
Console Server
  • Cyclades
NAS Head
         o Onstor
         o Netapp 
Load Balancers
         o F5 Bigip LTM
         o F5 Bigip GTM 
NTP Servers
Tape Encryption Device
Misc
         o VIP
Workstation

Location (Site) (Would link to a table of sites)

         o Sub-location (floor? etc)
         o Rack # 

Person

Scriptlets

Host Name

hostname

Host Address(es)

host `hostname`|nawk '{print $4}' (Maybe I need to change this to parse /etc/hosts?)

Host ID

hostid

Serial Number

x86: /usr/sbin/smbios Sun: sneep

System Model

prtconf -pv|grep banner-name|awk -F"'" '{ print $2 }'

Main Memory

prtconf -pv|grep Mem|awk ' { print $3/1024"GB" }'

Virtual Memory

Number of CPUs (Physical)

psrinfo -p

Number of CPUs (Virtual)

psrinfo | wc -l |awk '{print $1" processors"}'

CPU Type

prtconf -pv|grep Ultra|grep name|uniq|awk -F"'" '{ print $2 }'|awk -F"," '{ print $2 }' (I just realized this doesn't work for non Sparc)

App Architecture

isainfo -n

Kernel Architecture

isainfo -k

Kernel Bit size

isainfo -b

OS Name

OS Version

OS Distribution

OS Distribution Name

OS Distribution Name

OS Distribution Version

Libc Name

Libc Version

Kernel Version

uname -v|awk -F"_" '{ print $2 }'

Boot Time

who -b

Current Time

date

FQDN

  • host `hostname`|nawk '{print $1}'

OBP Version

prtconf -V

Ecache Size

prtconf -pv | grep ecache-size: |uniq|nawk '{print "base=16;"$2}'|bc|nawk '{print $1/1024/1024"MB Ecache"}' (Does not work w/ x86)

OS HW Release (broken - need stable interface)

grep HW /etc/release |nawk '{print $2" ("$4") "}'

Veritas vxio

modinfo |grep vxio|nawk '{print $8}'

Veritas vxfs

modinfo |grep vxfs|nawk '{print $8}'|nawk -F"," '{print $1}'

Veritas root diskgroup

ls /dev/dsk/`vxprint -g rootdg|grep dm |nawk '{print $3}'|cut -b1-2|uniq`*s0|wc -l|nawk '{print $1,"internal disks"}'

Veritas root diskgroup

rootdiskcontroller=`vxprint -g rootdg|grep dm |nawk '{print $3}'|cut -b1-2|uniq`

Veritas root diskgroup

for disk in `ls /dev/rdsk/${rootdiskcontroller}*s0` do luxadm inq $disk |grep Product|nawk '{print $3}' done | uniq -c

Additional Queryable data

   * Veritas VM version
   * Veritas FS version
   * Root is mirrored
   * SMC running
   * Netbackup configured
   * Has external disk
   * Network interface info
   * IP address(es)
   * standard root .forward configured
   * standard idled configured
   * savecore enabled
   * ssh verison
   * release/release.build version
   * Package list
   * patch list 

Meta data

   * Serial number
   * Contacts
   * Site Code (NYC, TPA, whatever)
   * Location (Site) (Would link to a table of sites)
         o Sublocation (floor? etc)
         o Rack # 
   * Description
   * Sarbox compliance status

Tasks

Collaborators

  • dagobert@familie-michelsen.de
  • manishchaks@gmail.com
  • Chung Hang Christopher Chan <chrisfz@yahoo.com>
  • Dagobert Michelsen <dam@baltic-online.de>
  • Ian Collins <ian@ianshome.com>
  • Mark McCoy <realmcking@gmail.com>
  • Brian Gupta <brian.gupta@gmail.com>
  • Louwtjie Burger <zabermeister@gmail.com>
  • John Martinez <rolnif@mac.com>