Apacheload grafisch anzeigen

Nagios, Munin, Serverstats, etc.
Post Reply
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Apacheload grafisch anzeigen

Post by Sponge »

Hallo,

ich habe mich ein bisschen durchs Forum geklickt aber bin leider nicht fündig geworden :-/ Ich suche ein Tool oder generell eine Möglichkeit mit den aktuellen Load des Apache (optional auch den vom Server) anzeigen zu lassen.

Habt ihr da eine Idee? Weil das was ich bei RRDtool und Mumin oder wie es heisst zeigt er das ja nicht mit an. :-/

Grüße
Sponge
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Apacheload grafisch anzeigen

Post by Roger Wilco »

Du suchst vermutlich mod_status.
User avatar
daemotron
Administrator
Administrator
Posts: 2641
Joined: 2004-01-21 17:44
Contact:
 

Re: Apacheload grafisch anzeigen

Post by daemotron »

Mit Munin kann man das durchaus tun, man muss nur die richtigen Plugins aktivieren - allerdings greifen apache_status, apache_accesses und apache_volume auch wieder nur auf von mod_status bereitgestellte Informationen zu.
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

Hallo Roger,

hmm ja das ist schon nicht schlecht aber nicht so das was ich mir vorgestellt hatte :-/ Ich hab mehr an eine Ausgabe der Daten/Leistung/Verbrauch in einem einfachen Diagramm oa. gedacht was mir sagt, 80% Apacheauslastung und gut. Aber sowas gibts bestimmt nicht oder?

Grüße
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

Also ich habe mir mal Munin installiert und es ist ja recht nett muss ich sagen ABER kann es sein das es HttpS nicht unterstützt? Weil ich versuche vergebens was vom Port 443 mir anzeigen zu lassen aber nichts is :-/


EDIT: Es hat gedauert aber ich habs hinbekommen :lol:
Last edited by Sponge on 2011-01-31 17:25, edited 1 time in total.
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

Hallo again :)

so neuer Server neues Spiel.
Jedoch laufen alle plugins bis auf die die mit dem Apache zu tun haben.
Und ich hab keinen schimmer warum....

a2enmod status ist aktiviert und zeigt auch Daten an.
Die Plugins sind ordentlich verlinkt, es werden auch Graphen erstellt.
apt-get install libwww-perl ist auch vorhanden.

Hat jemand eine Idee ?
User avatar
daemotron
Administrator
Administrator
Posts: 2641
Joined: 2004-01-21 17:44
Contact:
 

Re: Apacheload grafisch anzeigen

Post by daemotron »

Schon mal versucht, per telnet auf den Munin-Agent zuzugreifen? Irgendwo in deren Doku war das beschrieben; das Protokoll ist ziemlich simpel. Vielleicht gibt Dir das weitere Aufschlüsse.
“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying 'End-of-the-World Switch. PLEASE DO NOT TOUCH', the paint wouldn't even have time to dry.” — Terry Pratchett, Thief of Time
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

Naja die Frage ist ja ob mir das hilft, weil bis auf die Apacheplugins geht ja alles. Zumal ich das Ganze ja schonmal hinbekommen habe, nur ist es jetzt wohl eine andere Version oder so und da weiß ich nicht wo das Problem ist. Ich kann in den Apache Plugins eingeben was ich will er wirft immer ein U aus wenn man es direkt anspricht oder laufen lässt.
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

Hallo,

eine erweiterte Statusinformation?
Wie meinst du das?
Ich weiß nur das mod_status aktiviert ist und man es auch unter meinerurl/server-status aufrufbar ist. Gibt es dort noch eine Modifikation?

Grüße
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

Ah ich verstehe du meinst die erweiterung server-status?auto richtig?
Weil alles andere ist ja standart kann man sagen oder seh ich das nur nicht was du meinst?

Also das mit dem server-status?auto ist bei mir auch aktiviert und wenn man es über den browser aufruft sieht man folgendes:

Total Accesses: 542257
Total kBytes: 367297
CPULoad: .0243872
Uptime: 80534
ReqPerSec: 6.73327
BytesPerSec: 4670.23
BytesPerReq: 693.605
BusyWorkers: 16
IdleWorkers: 12
Scoreboard: K___KK_KK_K...C_.KK..._K.._KK_.C_...W_R.K_......................................................................................................................................................................................................................

Und das ist ja das worauf die Plugins zugreifen:

[apache_*]
env.url http://localhost/server-status?auto
env.ports 443
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apacheload grafisch anzeigen

Post by Joe User »

http://httpd.apache.org/docs/2.2/mod/mod_status.html -> ExtendedStatus
Der muss aktiviert sein, dann sollte munin die Graphen zeichnen können.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

443 weil ich die Werte von 443 haben will, daher habe ich das ganze so umgeschrieben:

[apache_*]
env.url http://localhost/server-status?auto
env.ports 443


und

my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://localhost:443/server-status?auto";
my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (443);

hatte so auch beim anderen Server funktioniert wenn ich mich recht entsinne.
Ich hab da auch schon versucht mit der Ip oder der Domain das aufzurufen aber das wollte auch nicht.

Und zu dem Status, das sieht bei mir so aus:

<IfModule mod_status.c>
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Uncomment and change the ".example.com" to allow
# access from other hosts.
#
ExtendedStatus On
<Location /server-status>
SetHandler server-status
# Order deny,allow
# Deny from all
Allow from localhost ip6-localhost
Allow from localdomain
</Location>

</IfModule>
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: Apacheload grafisch anzeigen

Post by Joe User »

mod_info und mod_status sind beide geladen?

Code: Select all


<IfModule info_module>
    <IfModule status_module>
        <Location "/server-status">
            SetHandler server-status
            Order Deny,Allow
            Deny from all
            Allow from localhost
        </Location>
        ExtendedStatus On
        <Location "/server-info">
            SetHandler server-info
            Order Deny,Allow
            Deny from all
            Allow from localhost
        </Location>
    </IfModule>
</IfModule>
Aus der Hilfe vom munin-Plugin:

Code: Select all

The plugin needs access to http://localhost/server-status?auto (or
modify the URL for another host). See your Apache documentation on
how to set up this URL in your httpd.conf. Apache needs ExtendedStatus
enabled for this plugin to work.

Tip: To see if it's already set up correctly, just run this plugin
with the parameter "autoconf". If you get a "yes", everything should
work like a charm already.

This configuration section shows the defaults of the plugin:

  [apache_*]
     env.url   http://127.0.0.1:%d/server-status?auto
     env.ports 80

The %d in the url will be replaced with the port.  The default port is
80 as shown.

The port list is a space separated list of ports.  NOTE that one
single Apache can have several open ports, and the plugin needs only
to contact one to get the servers global status.  The list of ports is
only needed if you have several B<different> Apaches configured on
your host.

If you need authenticated access to the URL you can specify the
username and password in the URL.  For example:

  [apache_volume]
     env.url http://munin:spamalot@localhost/server-status?auto

This will provide for HTTP basic authentication.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

Wow also ich weiß nich woran es lag aber es scheint zu gehen.
mod_info hatte ich noch nicht aktiviert (muss ich wohl übersehen haben das man das braucht) und die plugins hab ich auf standart gesetzt also mit %d und der localadresse.

Und was über port 80 geht is same wie 443, also beim auslesen?
Sponge
Posts: 34
Joined: 2011-01-10 16:55
 

Re: Apacheload grafisch anzeigen

Post by Sponge »

Aha, gut zu wissen, danke für die Info und die Hilfe natürlich.
Also es läuft nur ein Apache und der ist auf Http und https konfiguriert und so wie die Werte aussehen sollte das so passen. :)
Post Reply