next up previous contents
Next: Configuring Events and States Up: Configuring peep.conf Previous: The ''General'' Section   Contents

Configuring Classes

Classes are the mechanism for grouping servers and clients together. A single server or client can belong to several classes simultaneously. Upon startup, both clients and servers broadcast a string of all the classes they belong to. If the broadcaster is a server and the receiver is a client, then that client checks in with that server. If the broadcaster is a client, then the appropriate servers indicate to the client that they exist.

To define a class in the configuration file, the following syntax is used:

class <CLASSNAME>
  port <PORT NO>      # The ports used by the clients in this class
  server <SERVER_NAME>:<PORT>
end class <CLASSNAME> # (The class <CLASSNAME> is optional)

Multiple ports and multiple servers can be specified on a single line. Alternatively, you can have a separate port and server entry for each client port and server. The following is an example entry that has a single server darktower in test and text classes:

class test
  port 2000                   # Broadcast to clients use port 2000
  server darktower:2001       # This says that server darktower is
                              # responsible for this class and runs
                              # on port 2001
end class test

class text
  port 2000 1999                             # Broadcast to two client ports
  server darktower:2001 snowy:2001           # Server darktower and snowy are part
                                             # of this class
end class text

Clients are added into class in their respective sections. For example, logparser can be part of the text and test class with the following configuration example:

client logparser
  class text test             # All logparser clients send data to servers
    .                         # in classes text and test
    .
    .
end client logparser

If you do not wish to use auto-discovery, then defining classes is not necessary. One thing to note is that the hostname supplied in the class must match either the short hostname, the fully qualified hostname, or the ip address of the machine. If you see a warning saying you that the server couldn't assemble an identifier string, it may be due to the name you are supplying in the class. You can tell what peepd thinks your name is by looking at the line similar to (Note the underlined part):

darktower | Using INET Address: 10.0.0.2:2001


next up previous contents
Next: Configuring Events and States Up: Configuring peep.conf Previous: The ''General'' Section   Contents
Collin Starkweather 2002-11-03