From Matt's Network Monitor
[edit] Description
The "hosts" table contains all hosts detected by various host discovery methods. It is built the first time the application is run, and rebuilt subsequent times by way of the Rebuild Known Host Cache page.
[edit] Fields
| Name
| Data Type
| Description
|
| ipaddr
| varchar(30)
| An IPv4 address in the format 255.255.255.255.
|
| ipaddr_int32
| integer(16)
| An 32-bit integer representation of the "ipaddr" field.
|
| macaddr
| varchar(16)
| MAC Address for this host, if available.
|
| macaddr_vendor
| varchar(64)
| Vendor associated with the "macaddr" field, if available.
|
| hostname
| varchar(255)
| The hostname the "ipaddr" field resolves to, if any.
|
| uptime_lastboot
| datetime
| Date/Time stamp when this host was last rebooted, if available.
|
| status
| integer(1)
| The status of this host. (-1 = OFFLINE, 0 = MIXED STATUS, 1 = ONLINE). A mixed status indicates that this host has some interfaces that online, and other known interfaces that are offline or some known ports that are offline, that were previously detected as online.
|
[edit] Relationships
[edit] Model Validation
validates_presence_of :ipaddr, :ipaddr_int32, :status
validates_uniqueness_of :ipaddr
validates_format_of :ipaddr, :with => /\A(?:25[0-5]|(?:2[0-4]|1\d|[1-9])?\d)(?:\.(?:25[0-5]|(?:2[0-4]|1\d|[1-9])?\d)){3}\z/
validates_numericality_of :ipaddr_int32, :only_integer => true
validates_inclusion_of :status, :in => -1..1