Lemonldap::Cluster::Status - Perl extension for apache cluster server-status


Lemonldap-Cluster-Status documentation  | view source Contained in the Lemonldap-Cluster-Status distribution.

Index


NAME

Top

Lemonldap::Cluster::Status - Perl extension for apache cluster server-status

SYNOPSIS

Top

    use Lemonldap::Cluster::Status ;
    my $serverstatus = Lemonldap::Cluster::Status->new (
                  'ADMIN' => 'title on top of page' ,
                  'node1' => '10.ip.ip.ip',
                  'node2' => 'server1.net',
                  'foo' => 'server2.net',
                  'bar' => '10.ip.ip.ip',
		);
   $serverstatus->analyze;
   my $a=$serverstatus->PrintHtml;







DESCRIPTION

Top

This module aggregates sereval server-status pages (from apache) in one page.

It's usefull in order to manage cluster, or for working with nagios and cacti

This version understands refresh=nb_of_second parameters like mod_status

Your servers (nodes) MUST TO BE turn on extended status mode (see apache doc)

This module may be used in sereval ways :

 1) Like a package (see bellow) 
 2) Embeded in CGI script :(see StatusCGI.pl)
 3) With modperl : (see StatusMP.pm) 
 4) Like lemonldap websso composant :(see Statuslemonldap.pm)

 ONLY last way NEEDS another Lemonldap composant . Thus this module is independent of lemonldap websso. 

The server-status report seems to be issu of real apache server.

 The apache server wich implements server-status summary  doesn't need to be a nodes .

METHODS

Top

new ('ADMIN' => 'name' , 'foo' => 'bar.fr' );

The word ADMIN is REQUIRED . This method does the GET http://bar.fr/server-status (This for every nodes).

analize () ;

Does the calculation and summarizes stat.

printHtml()

return the whole html page .

StatusCGI.pl

Top

first, puts a copy of StatusCGI.pl in your apache cgi-bin directory . next, you MUST modify the script in order to add your address servers. last, try with the url http://myserver.net/cgi-bin/StatusCGI.pl.

(you can addd '?refresh=5' (in second) at the end of URL )

StatusPM.pm (under mod_perl)

Top

Just add those lines in httpd.conf

 <Location /clusterstatus >
    SetHandler perl-script
    PerlHandler Lemonldap::Cluster::StatusMP
    perlsetvar ADMIN name_of_group
    perlsetvar node1 10.ip.ip.ip
    perlsetvar foo   server1.net
    perlsetvar bar   sever2.net
 </Location>

Restart httpd daemon and point on location /clusterstatus

Statuslemonldap.pm (with lemonldap::Config::Parameters)

Top

 Add this in lemonldap_config.xml 

  <cluster  id ="ADMIN" >
        <node id="node"
              address="10.ip.ip.ip" />
        <node id="other"
              address="10.ip.ip.ip" />
        <node id="last"
              address="server.net" />
  </cluster>

 Add also this in httpd.conf 

 <Location /statuslemon >
  SetHandler perl-script
  PerlHandler Lemonldap::Cluster::Statuslemonldap
  perlsetvar LemonldapConfig /etc/apache-perl/lemonldap_config.xml
  perlsetvar LemonldapConfigipckey /var/cache/lemondb/CONF
 </Location>

Restart httpd daemon and point on location /statuslemon

INSTALLATION

Top

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install







EXPORT

Top

None by default.

SEE ALSO

Top

 Lemonldap websso
 server-status of apache
 LWP

 Lemonldap::Cluster::StatusMP  (under mod_perl)
 Lemonldap::Cluster::StatusCGI (under CGI) 
 Lemonldap::Cluster::Statuslemonldap (embeded in lemonldap config) 
 (all files are in tarball ) 




AUTHOR

Top

Eric German, <germanlinux@yahoo.fr>

COPYRIGHT AND LICENSE

Top


Lemonldap-Cluster-Status documentation  | view source Contained in the Lemonldap-Cluster-Status distribution.