MonitorCapabilities
From MapbenderWiki
User:Christoph Baudson (Module maintainer)
Contents |
Description
english
The monitoring module keeps the Mapbender database up to date and informs the operator of all changes. Statistics for each service are supplied.
- mod_monitorCapabilities_main.php: Assembles a list of WMS that will be monitored. For now all WMS of the root user will be monitored. For each WMS an individual monitoring process will be started. The main process itself may be run via cronjob, command line or browser. The path to the PHP engine (PHP_PATH) has to be specified in mapbender.conf.
command line: php mod_monitorCapabilties_main.php user:<username> [gui:<guiname>]
- mod_monitorCapabilities_write.php: Monitors a single WMS. Invoked by mod_monitorCapabilities_main.php. The results of the monitoring will be inserted into the table mb_monitor (see Database_Changes_2.4). The time limit (in seconds) for this process is set in mapbender.conf (TIME_LIMIT). The constant AUTO_UPDATE in mapbender.conf must be set to 1, if the monitoring module shall update all out-of-date WMS automatically. Otherwise, the administrator may update these WMS manually (see mod_monitorCapabilities_read.php).
- mod_monitorCapabilities_read.php: The current monitoring status will be displayed in a browser window, non-up-to-date local WMS getCapabilities documents may be updated.
- mod_monitorCapabilities_read_single.php: All monitoring results for a single WMS will be displayed in a new window (triggered by a mouse click in mod_monitorCapabilities_read.php).
Query all WMS services owned by the logged user for availability and check whether the cached Capabilities documents are up to date. If it needs updating, the Capabilities document is requested from the server and the changes are updated in the database.
status in the db
- 1 = reachable and in sync with db
- 0 = reachable and out of sync with db
- -1 = unreachable
- -2 = monitoring in progress
- -3 = reachable but not an image (TO DO --Christoph Baudson 16:12, 9 August 2007 (CEST))
Please note: The update/connect process may fail for few WMS. Further analysis is required.
deutsch
Dieses Modul aktualisiert die Mapbender Datenbank mit allen Änderungen der eingebundenen WMS Dienste. Momentan werden alle WMS des root-Benutzers überwacht. Darüberhinaus wird eine Serverstatistik erstellt, aus der hervorgeht, welche Verfügbarkeit der Dienst hat.
- mod_monitorCapabilities_main.php: Erstellt eine Liste der zu überwachenden WMS und startet für jeden WMS einen eigenen Prozess. Kann über einen cronjob, über die Kommandozeile oder im Browser gestartet werden. Der Pfad zu PHP muß in mapbender.conf angegeben werden (PHP_PATH).
Kommandozeile: php mod_monitorCapabilties_main.php user:<username> [gui:<guiname>]
- mod_monitorCapabilities_write.php: Prüft einen einzelnen WMS. Wird von mod_monitorCapabilities_main.php aufgerufen. Die Ergebnisse werden in der Tabelle mb_monitor (siehe Database_Changes_2.4) eingetragen. In mapbender.conf wird in TIME_LIMIT die maximale zur Verfügung stehende Zeit zur Ausführung des Monitorprozesses eines einzelnen WMS gesetzt. Desweiteren gibt es in mapbender.conf eine Konstante AUTO_UPDATE, falls deren Wert 1 ist, werden alle veralteten WMS automatisch aktualisiert. Ist der Wert 0, können diese WMS später beim Betrachten der Ergebnisse im Browserfenster manuell aktualisiert werden (in mod_monitorCapabilities_read.php).
- mod_monitorCapabilities_read.php: Stellt die Ergebnisse des letzten Monitorzyklus im Browserfenster dar. Nicht aktuelle getCapabilities-Doumente können manuell auf den neuesten Stand gebracht werden.
- mod_monitorCapabilities_read_single.php: Zeigt alle Monitoring-Ergebnisse eines einzelnen WMS (wird durch einen Mausklick in mod_monitorCapabilities_read.php aufgerufen).
Alle lokal in der Datenbank gespeicherten WMS Capabilities Dokumente werden auf Aktualität überprüft. Falls ein Dokument nicht mehr aktuell ist, wird das neue Dokument angefordert und in der Datenbank gespeichert.
Bitte beachten: Der Update/Verbindungs-Vorgang kann für einzelne WMS scheitern, eine tiefergreifende Analyse ist erforderlich.
Files
For this module the following files are required / Für dieses Modul werden die folgenden Dateien benötigt:
known issues
see all trac tickets for tools
- Beta!
- See also: Talk:MonitorCapabilities
- technical knick-knack: monitoring

