Hive Configuration

From Wiki

Jump to: navigation, search

Contents

Web Interfaces

CPU-Stats Local Interface

In the given example the local CPU Stats interface for Hive will be accessible at:

1h.serverdemo.com/cpustats

The CPU Stats local interface by default is not password protected. However, if you would like to password-protect it, we have generated a sample .htaccess file for you. The default file is located under the following path:

/home/1h/public_html/htaccess.default

If you would like to password protect your software, please use the following command:

mv /home/1h/public_html/htaccess.default /home/1h/public_html/.htaccess

You will be assigned login details for your local interface. The username is admin and you can recover the password we have assigned by using the following command:

grep access_pass /usr/local/1h/etc/web.conf | cut -d = -f 2

The Hive/CPU Stats will provide you with system usage graphics for the server. There are several sub-categories for which you can explore the graphics and the overall resource usage for the server. Detailed information can be found under the CPU Stats Local Web Interface section.

Portal Centralized Interface

The 1H Portal interface provides you with general information for all your servers with 1H Software installed on them. The 1H Portal interface is available via the following URL:

1h.serverdemo.com/portal

The Portal interface is also password protected. The username for the login is always admin and the password can be withdrawn running the following command on the server:

grep access_pass /usr/local/1h/etc/web.conf

You will get:

access_pass=<passwordhere>

NB: You should have received an email with the needed login details for the 1H Portal at the administrative email for WHM upon finalizing the portal installation. In any case you can use the procedure described above to reclaim the password.

IMPORTANT: In order to have a server included in the Portal Centralized interface, under the under the CPU Stats section, it should be added to an existing Server Group in the 1H Admin Portal. Server Groups and Servers management are explained in details in the Server Groups section. Generally all you need to do is follow these steps:

NB: Note that it will take up to 24 hours for the data in the centralized interface to be updated after you have added a new server.

The Admin Portal Web Interface for Hive will provide you with system usage graphics for all servers added under Server Groups for the portal. There are several sub-categories for which you can explore the graphics and the overall resource usage for the servers and they are separated in tabs under the CPU Stats interface. More detailed information you can find in the CPU Stats Admin Portal Web Interface

Hive Configuration

mod_hive configuration

Hive is enabled for the server by simply including the 1H mod_hive Apache module in the Apache configuration.

/usr/local/apache/modules/mod_hive.so

and including the 1h.conf file:

/usr/local/apache/conf/includes/1h.conf 

This module comes with its own setuid root binary and it is handling the web scripts executions. mod_hive is taking precedence before other modules loaded in Apache (libphp, mod_suphp, mod_cgi, mod_cgid, mod_fcgid, mod_php, mod_suphp, mod_perl, mod_python) which means that mod_hive will always execute the scripts (.php/.pl/.cgi) before these modules.

All other Hive configuration options are located in

/usr/local/apache/conf/includes/1h.conf 

All options are explained in details in file itself. Note that each of the options can be used globally for the server or per Vhost only.

NB: When you are adding a custom option to your web server configuration, make sure to include it in an IfModule statement. For example:

<IfModule mod_hive.c>
  DisableStats
</IfModule>

This way you will not be experiencing any issues, should you decide to disable mod_hive.

Configuration trough cPanel/WHM plugin

The Hive configuration is accessible via WHM -> Plugins -> 1H Software -> Hive configuration

Here are the options available for the Hive configuration. Most of them are quite self-explanatory.

Hive Limits

Under Hive Limits you will see the following:

User limits 1.png

The CPU Limit defines the maximum number of CPU seconds a processes can run for a single user. For better understanding what CPU Tick is we recommend to check the CPU Time article.

The Memory Limit is the maximum memory that can be used by a single process for one user at any given time.

Process Limit - limits the number of processes that can be ran simultaneously by one user.

Open files - limits the maximum number of files that can be opened by a single process ran by one user at any given time.

Max File size - defines the maximum size for files that a process can open or create.

SSH chroot users - If checked all users that are given SSH access will be using it in a chrooted environment.
Note: this option is available only if the server is running OpenSSH Version 4.9+ which supports both ChrootDirectory and Match options.

In SSH chroot whitelist - you can add users that should not be chrooted.


Note: Here you can change only the default server limits. If you want to apply specific limitations per user check the following article for detailed instructions how to do so:

How to Change Single User Limits in Hive

Graph Settings

Under Graph Settings you will be able to adjust how statistic graphs are displayed:

User limits 2.png

You have 2 options:

In this case you can define the desired average value as constant and user usage will be displayed according to it.

Automated Actions

Enable automated actions - Enabling this option will allow you to specify hourly and daily limitations for users on your server.

Automated actions 01.png

Detailed instructions what each option is used for can be found in the Automated Actions article.

Manual Configuration

The limits configuration file of Hive is /usr/local/apache/conf/rlimit-config

In this file you can see 3 types of lines:

  1. comments - lines starting with #
  2. default - a single line beginning with 00. on this line you configure the default limits (if you wish different then the ones compiled into suexec).
    You can check the compiled limits with the following command: /usr/local/apache/bin/suexec -V
  3. user - lines beginning with a single username

Here are some examples:

#this is a comment
#this is also a commend
#user:mem:cputime:numprocs:max_file_size:max_files
# replacing the default limits
00:920000000:120:40:2000000000:256
# user231
user231:92000000:100:40:200000000:120
# user435
user435:220000000:140:60:800000000:300
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox