You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Harrie Hazewinkel <ha...@jrc.it> on 1999/04/26 19:41:46 UTC

An approach to change server-settings at runtime.

Hi all,


The idea behind the SNMP-module is that a larger ISP, webhosting
sites, colocation sites, etc, etc can as well monitor apache using
SNMP, but also control in real time some important values.

This SNMP module might enable someone not only to detect when a
service is hanging, spinning out ot control, etc., but also to 
make it possible to make some reconfiguration changes so that the 
server as such, and any other services it renders for
perhaps other customers, are not affected that much. Another
much needed use is switching "ON" extensive logging dynamically
for a short period of time to investigate a problem.

Especially, the module could be of interest when organisations
have a NOC that already uses SNMP based management applications 
of their network and services. Such a management application 
consists most likely of an easy to use (GUI) interface for managing
the network and its services. Therefore, this module can help to 
fit the WEb-server management in the overall framework and can 
be prefered above an approach of 'ssh'ing into the system, vi-ing a 
configuration file and doing a kill -HUP.

By no means it is the intention to make the complete configuration
SNMP controlled, but it should give the networking staff enough tools
and information to work around problems; to win some time whilst
calling a web-weenie out of bed, etc, etc.
 
Therefore, I have an SNMP based approach for changing server
settings during run-time. An SNMP-agent attached to the HTTP-server
could manage server variables.

The approach is as follows:
1) The main process reads them as currently done during
   configuration.
2) During the initialisation of the SNMP-agent the variables
        are placed in shared memory (scoreboard).
3) From this point there are 3 types of processes.
   a) The main process which has read-only access to the
      variables as soon as it starts spawning off the childeren.
   b) The childeren which have read-only access to the variables.
   c) The SNMP-agent which has read-write access to the 
      variables.  

The variables I currently have in mind are the following:
        KeepAlive
        MaxKeepAliveRequests
        KeepAliveTimeout
        MinSpareServers
        MaxSpareServers
        MaxClients
        MaxRequestsPerChild
        ExtendedStatus
        HostnameLookups
        LogLevel
        ServerSignature

Maybe this could be extended with variables that switches
virtual hosts on or off and some proxy variables.

I have made a small prototype with only the ExtendedStatus
which is available at 
http://sikorsky.ceo.sai.jrc.it/~harrie/mod_snmp/config-prototype.tar.gz

I also have made some support scripts with which you can read 
and write the value of ExtendedStatus. These scripts are Perl-Based and
use the SNMP-module of Perl that builds on top of UCD-SNMP.
(UCD         ftp://ucd-snmp.ucdavis.edu/ucd-snmp-3.6.1.tar.gz)
(SNMP-perl:  http://www.cpan.org/authors/id/GSM/SNMP-1.8.tar.gz)

More information of this can be found in the 
file "htdocs/manual/snmp/index.html"
or on http://sikorsky.ceo.sai.jrc.it/~harrie/mod_snmp/



Harrie
0- Harrie Hazewinkel --------------------------------------0
 mailto:harrie.hazewinkel@jrc.it       phone:+39+0332786322
 http://operations.ceo.org/~harrie/      fax:+39+0332785641
 postal: JRC of the E.C.  -       -  Ispra 21020 (VA) Italy
0----------------------------------------------------------0