GNOSIS/Kraken
From Genunix
http://docs.google.com/Doc?id=df6hcjb2_12fvc6tq
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
- It will be as automated as possible, both populating its own information and cross-checking with reality.
- 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.
- 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.
- Automation here is key; manually maintained databases are liable to fall into suboptimal states.
- Describe the assets as instances of classes and subclasses. Design the structure with object inheritance. (Preferable use Ruby or Python to implement)
- 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).
- Support multiple methods of data entry
- A high level of integration with information about contracts, BIND?DHCP et al. and a Grand Unified Monitoring System (Nagios, SunMC, OpenNMS)
- Make sure the system is extend-able.
- The system will be as flexible as possible to include many different types of assets to be tracked. (starting initially with Solaris hosts)
Future
- Add functionality to actually do system management from the website. e.g. migrate a container from one system to another.
- Integrate with cfgengine
- Integrate Inventory system with RT Workflow
- Integrate inventory system with QIP
- Integrate Inventory system with Nagios
- 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.
- Ideal we should be able to verify that patchsets and package sets match what they are supposed to be
- 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
- Define Object Hierarchy for Sun/Solaris servers
- Continue to review third party options (Lots are for Linux)
- How do we handle VMs/LPARs and containers?
- Figure out what is stored in SVN, and what is stored in database.
- Upload data gathering scriplets to wiki (Brian)
- Setup mailing list
- Setup SVN repository
- Open Source systems and tools to investigate
- puppet: cfengine-like
- http://www.hyperic.com/
- http://www.ocsinventory-ng.org/
- http://public.carnet.hr/~ddelija/sysaudit/
- http://www.sun.com/bigadmin/scripts/submittedScripts/disk_info.sh.txt
- http://freshmeat.net/projects/assettracker/
- http://freshmeat.net/projects/feta_asset/
- http://freshmeat.net/projects/linia/
- http://demo.h-inventory.com/index.php?do=login
- http://www.enfoldsystems.com/Products/Open/SIP
- H-Inventory. Polls Linux systems to generate inventory data.
- Script to plump inventory invormation from a Linux system:
- PHP ZOPE thing
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>
