CIS Host Manager Bryce Johnston CIS 597 May 8, 2009
CIS Host Manager (HM) Purpose Registration of hosts Assign/Remove static or dynamic IPs Manage Static & Dynamic Address Pools Generate dhcp config file Automate Nagios Configuration Assign checks to specific groups Assign hosts to groups Assign checks to individual hosts Generate nagios config files
CIS Host Manager (HM) Need for New System Old system had database issues Not user friendly Had potential security problems Not easily maintainable Needed additional features
CIS Host Manager (HM) Development Information Language: Ruby on Rails (RoR) Database: MySQL Active Record => Object Relational Mapping Framework built into RoR 1. Tables to Classes 2. Columns to Attributes 3. Primary Keys to Ids 4. Rows to Object
Usability & Maintenance Better Usability Site is now cleaner and better organized Contains search capabilities Easier Maintenance Seperate from our Selfserv Application Doesn't rely upon multiple frameworks Code is well documented and broken down into multiple controllers & views RoR is more suited to web application dev.
Active Record Example # Model class IpAddress :destroy has_one :reserved_ip_address, :dependent => :destroy end
Active Record Example # = IpAddress.find(:all, :order => "address_pool_id ASC, fourth_octet ASC") # View Render something like this:
Features – Use Case
DHCP DHCP Server distributes IP addresses to hosts on the network Dynamic Allocation (Usually Windows Hosts) Host recieves an available IP from an address pool Static Allocation (Usually Linux Hosts) Host recieves a specific IP based on its MAC address
HM DHCP Features Register New Host Approve / Deny New Host Assign / Remove Static or Dynamic IP Show all Hosts Search for host (by hostname or IP) Manage Address Space Allocate / Unallocate IP in a range Generate new dhcp config file
DHCP DB Schema
Nagios Network Monitoring Software Network Service (SMTP, HTTP, SSH, etc.) Resources (processer load, disk usage, etc.) Configuration Currently all configuration is done manually through editing config files
HM Nagios Features Add / Remove service check to a group Create nagios profile for host and assign to a group Assign / Remove specific service checks for an individual host Generates nagios config files
Nagios DB Schema
User Accounts Uses Restful Authentication Plugin Include in main controller class ApplicationController < ActionController::Base Include AuthenticatedSystem.... end Add Filter to individual controllers class HostController < ApplicationController before_filter :login_required # <= Causes all methods to require auth def index … end def show … end end
User Account Control Basic Functions Add New User Change Password Logout Next Step Write LDAP authentication class so CIS Accounts in admin group can be used
Demo – New Host Scenario Run through of a scenario of adding a new host and configuring its settings...