Docs/SysAdmin/Server/Monitoring/Hobbit

From Mandriva Community Wiki

Jump to: navigation, search
Monitoring with Hobbit

Hobbit is an open-source clone of the popular shareware-like monitoring tool Big Brother.

Contents

[edit] Installation

Assuming you are running Mandriva 2007.0 or later, and you have a contrib medium available, installing the server should comprise of running:

urpmi hobbit rrdtool

This should pull in a number of packages, including apache (rrdtool must be specified, as even though hobbit depends on the rrd libraries, the fonts required for graphs to work correctly are in the rrdtool package - a dependency will be added for 2008.0). Start up Hobbit with:

service hobbit start

Ensure apache is running, if not, start it with:

service httpd start

If apache was running before you installed hobbit, you may have to reload it (to pick up the config file):

service httpd reload


Load up http://hobbitserver/hobbit, and you should soon see the default Hobbit page (looking something like this page on the demo site. In the default configuration, Hobbit provides some statistics on itself on the bbgen and bbtest tests, checks that the bbd port (1984) is available, runs the agent software (to report load average, memory usage, disk usage, monitoring of specified processes, ports and file), and checks that the http port responds correctly. Clicking on one tests will show you some detail, and in most cases a graph.

[edit] Configuration

[edit] Adding a new host

To configure a new host to be monitored, edit /etc/hobbit/bb-hosts, and add a line such as:

#IP Address      Hostname reported by client  # Tests and options
192.168.2.253    comanche                     # 

This configures Hobbit to accept reports about this client, and by default, hobbit will run the "conn" test against it. Note that by default Hobbit will try and resolve the hostname in the same way the system does (e.g. getent hosts comanche), so usually first by looking in /etc/hosts, then DNS. If you want to prevent this, and force Hobbit to use the IP in the bb-hosts file, use the 'testip' option, e.g.:

192.168.2.253    comanche                     # testip

To get the host-reported data (load average, memory utilisation etc.), you need to install hobbit-client on the client, and configure it to report the data to the Hobbit server. For a Mandriva client, you can do this by:

urpmi hobbit-client
vi /etc/sysconfig/hobbit-client # Set HOBBITSERVERS to the IP/hostname of the Hobbit server
/etc/init.d/hobbit-client start

For other Linux distributions, packages may be available from the Hobbit sourceforge page. The Mandriva SRPM builds fine on Fedora/RedHat systems with the compatibility macros from the Backports page. Solaris packages (for 8 and newer) are available from Blastwave. For all other Unix versions, the source should build (building the client only is less effort as other libraries less common on proprietary Unix are only required by the server). For Windows clients, install BBWin.

[edit] Monitoring more services

To monitor more services that are supported directly by Hobbit, add the name of the service to the line in bb-hosts for the server. For example, to monitor DNS on the Hobbit server, change the line for localhost from:

127.0.0.1   localhost      # bbd http://localhost/

to

127.0.0.1   localhost      # bbd http://localhost/ dns

Save the file, and within a few minutes you should see an extra dns test on the Hobbit page.

For more information on the tests supported by Hobbit, see the bb-hosts man page.

For services that are not supported directly by Hobbit, there may be extension scripts available, for example from The Shire.

[edit] Thresholds

[edit] Configuring client tests

You may notice that three of the default tests (files, ports, procs) are white, because they have not been configured to monitor anything. To configure them, edit /etc/hobbit/hobbit-ciients.cfg. See the hobbit-clients.cfg man page for more details.

But, you may wonder how the client can send logs for all the LOG entries and file details for the FILE entries you just added to hobbit-clients.cfg ... well, you have to configure Hobbit to tell the clients to send the data. Edit /etc/hobbit/client-local.cfg to configure which log files to monitor, and how many bytes of the log file to send. See the client-local.cfg man page for more details.

Note that you may need to make some changes to allow Hobbit to read log files you have configured for monitoring. For example, the default log file monitored (/var/log/messages) is probably not readable. One option is to make the file group-owned by the adm group, and add the hobbit user to the adm group, so run chgrp adm /var/log/messages and gpasswd -a hobbit adm and then restart hobbit to allow hobbit to read this log file.

[edit] Authentication

Personal tools