FHEM Forum

FHEM - Hausautomations-Systeme => Unterstützende Dienste => Thema gestartet von: nesges am 20 Februar 2017, 23:29:37

Titel: 98_ApacheStatus: Apaches mod_status Server-Status als Readings
Beitrag von: nesges am 20 Februar 2017, 23:29:37
Das Modul basiert auf HttpUtils und stellt sämtliche Werte einer durch Apaches mod_status erzeugten Server-Status-Page als Readings zur Verfügung. Da die Anzahl an Readings leicht in die hunderte gehen kann, sind verschiedene Readings-Gruppen per Attribut zu aktivieren. Details dazu unten.

Getestet gegen Server Version: Apache/2.4.10 (Raspbian) PHP/5.6.29-0+deb8u1 OpenSSL/1.0.1t

Commandref:

ApacheStatus
    ApacheStatus queries a server-statuspage generated by Apaches mod_status (https://httpd.apache.org/docs/2.4/mod/mod_status.html) and generates various readings from it. The query is repeated in a given interval.

    Prerequisites
       
    Define
        define <name> ApacheStatus <URL> [<INTERVAL>]
       
        Example: define APACHESTATUS ApacheStatus http://localhost/server-status 300

        URL is the url of a server-statuspage generated by mod_status. User and password for HTTP basic authentication may be provided in standard notation: http://user:pass@host
        INTERVAL is the refresh interval in seconds. Default: 300

        Since ApacheStatus is designed to create very differentiated readings from the info mod_status provides, it can easily make for hundreds of readings. To avoid that, you'll have to explicitly enable groups of readings by setting associated attributes. For details see below.
        A newly created device has some attributes set to default values:
                Caution: If your editing fhem.cfg to add a new device none of these attributes are set automatically
   
    Set
       
    Attributes
           
    Values of STATE
       
Titel: Antw:98_ApacheStatus: Apaches mod_status Server-Status als Readings
Beitrag von: Dr. Boris Neubert am 21 Februar 2017, 06:07:46
Hallo,

was sind denn mögliche Anwendungsfälle für das Modul?

Viele Grüße
Boris
Titel: Antw:98_ApacheStatus: Apaches mod_status Server-Status als Readings
Beitrag von: nesges am 21 Februar 2017, 10:32:32
Das Modul kann dazu dienen für bestimmte HTTP-Requests in Fhem-Events auszulösen um zB auf externe Requests zu reagieren. Hauptsächlich sehe ich darin aber ein Analysetool: Ich suche grade die Ursache für öfter auftretende "Aussetzer" (mehrsekündiger Stillstand) in Fhem, bzw. FHEMWEB. Apache ist als Proxy für Requests an FHEMWEB vorgeschaltet. Ich benutze die Readings  um die Anzahl Requests verschiedener lokaler Clients in Relation zu Load und Responsetime zu plotten. Bisher übrigens leider ohne Erkenntnisse über den Verursacher :-)