Ladda ner
https://nexus.inera.se/repository/maven-public/se/skltp/components/status-probe/<version>/status-probe-<version>.jar
Installera
Förväntande katalog struktur:
/statusProbe status-probe.jar statusProbe.pid /config application.properties services.json log4j2.xml /log ... /vp-camel probeFile |
Se katalogstruktur ovan för beskrivning av konfigurationsfiler
status-probe-<version>.jar
- probe application
statusProbe.pid
- innehåller startade processens PID
/log
- Här hamnar alla loggfiler
/config
application.properties
- konfiguration fil
services.json
- services för övervaka
log4j2.xml
- logfile konfig
probeFile
- file som signalerar att VP(eller anan application) är tillgänglig/inte tillgänglig
Konfigurera
Innehållet i konfigurationsfilerna beskrivs här
Köra
För köra status probe:
<path_till_jre/bin/java> -jar -Dlog4j.configurationFile=file://<path_till_log4j_config>/log4j2.xml status-probe.jar
Verifera
Curl anrop till tjänsten, säkerställ att port och adress stämmer överens med vad som står i application.properties
, server.servlet.context-path och server.port
curl -v http://localhost:8081/mule-probe/probe |
OK svar
OK |
Probe är konfigurerad till DOWN
Konfigureras i probe-filen, se probe fil konfiguration):
[ { "name" : "vp-camel", "url" : "http://ine-tit-app04.sth.basefarm.net:8080/status", "probeAvailable" : false, "probeMessage" : "StatusProbe probeFile signals DOWN, no check against producers will be performed", "serviceAvailable" : false, "serviceMessage" : null, "connecttimeout" : "1000", "responsetimeout" : "2000" } ] |
Probens probe-fil är borttagen
[ { "name" : "vp-camel", "url" : "http://ine-tit-app04.sth.basefarm.net:8080/status", "probeAvailable" : false, "probeMessage" : "Configured probeFile /var/spool/vp-camel/probeFile does not exist, StatusProbe signals unavailable when file is missing.", "serviceAvailable" : false, "serviceMessage" : null, "connecttimeout" : "1000", "responsetimeout" : "2000" } ] |