Skip to main content

4. Protocol Operation

The HMP is built around the idea that most of the intelligence needed to monitor a host should reside in a monitoring center, not in the host. The host should be required only to collect data and send it to the monitoring center, either spontaneously or on request from the monitoring center. The host is not responsible for insuring that the data arrives reliably (except that it checksums the data); instead, the monitoring center is responsible for ensuring that the data it requests is received correctly.

Consequently, the HMP is based on polling hosts for messages. When the monitoring center requires a particular type of data (e.g., throughput data), it sends a poll to the host requesting that type of report. The host, upon receiving the poll, responds with its latest set of collected data. If the host finds that the poll is incorrect (e.g., if the poll was for throughput data and the host is not collecting throughput data), it responds with an error message. The monitoring center waits a reasonable length of time for the host to answer its poll. If no response is received, it sends another poll for the same data. In this way, if either a poll or the response is lost, the correct data is still collected.

The HMP is used to collect three different classes of data:

  • Spontaneous Events (or Traps)
  • Current status
  • Statistical data collected over time

These classes of data allow a host to send data in a manner best suited to the data. For instance, the host may quickly inform the monitoring center that a particular event has happened by sending a trap message, while the monitoring center is reliably collecting the host's throughput and accounting data.

Traps report spontaneous events, as they occur, to the monitoring center. In order to insure their prompt delivery, the traps are sent as datagrams with no reliability mechanisms (except checksums) such as acknowledgments and retransmissions. Trap messages usually contain an identifier to indicate which event is being reported, the local time in the host that the event occured, and data pertinent to the event. The data portion is intended to be host and event specific.

Status information, the second type of data collected by the Host Monitoring Protocol describes the current state of the host. Status information is useful at one point, but it does not have to be collected cumulatively over a certain period of time. Only the latest status is of interest; old status provides no useful information. The monitoring center collects status information by sending a poll for status to a host. Upon receiving the poll, the host responds with its latest status information, always creating a new status message. If the monitoring center does not receive a response to its poll, it sends another poll. The monitoring center can decide if the host is up or down based on whether the host responds to its polls.

The third type of data collected by the HMP is statistical data. These are measurements taken over time, such as the number of packets sent or received by a host and the count of packets dropped for a particular reason. It is important that none of this type of data be lost. Statistical data is collected in a host over a time interval. When the collection time interval expires, the current data is copied to another area, and the counters are cleared. The copied data is sent to the monitoring center when the host receives a poll requesting statistical information. If another poll is received before the collection time interval has expired, the data in the buffer is sent again. The monitoring center can detect duplicate messages by using the sequence number in the header of the message, since each type of statistical data has its own sequence number counter.

The collection frequency for statistics messages from a particular host must be relatively long compared to the average round trip message time between the monitoring center and that host inorder to allow the monitoring center to re-poll if it does not receive an answer. With this restriction, it should be possible to avoid missing any statistics messages. Each statistics message contains a field giving the local time when the data was collected and the time at which the message was sent. This information allows the monitoring center to schedule when it sends a poll so that the poll arrives near the beginning of each collection period. This ensures that if a message is lost, the monitoring center will have sufficient time to poll again for the statistics message for that period.

The HMP also includes a provision to send data to and read parameters in hosts. The data may be used to set switches or interval timers used to control measurements in a host, or to control the host itself (e.g. a restart switch). The format of the data and parameters is host specific.

To send data to a host, the monitoring center sends the host a poll for a control-acknowledgment message. This poll message includes the type of the data and the data being sent. When the host receives this poll, it processes the data and responds with a control-acknowledgment message.

To read parameters in a host, the monitoring center will send a poll for parameters to the host. This poll includes the type of the parameters being read. When the host receives this poll, it will send the parameters of the requested type to the monitoring center in a parameters message.