Skip to main content

Health check endpoints

phoss SMP exposes two HTTP endpoints useful for monitoring and container orchestration:
PathPurposeEnabled by default
/ping/Liveness probe — returns HTTP 200 when the servlet container is runningYes
/smp-status/Detailed JSON health/status dataNo

/ping/

The PingPongServlet mapped to /ping/ is always active and returns a minimal HTTP 200 response. Use it as a liveness probe in Docker or Kubernetes health checks:
curl -f http://localhost/ping/

/smp-status/

The status endpoint is disabled by default for security. Enable it in application.properties:
smp.status.enabled = true
Once enabled, a GET request returns a JSON object:
curl http://localhost/smp-status/

Disabling long-running operations

For use as a readiness probe you can request a lightweight response that skips any slow internal checks:
curl "http://localhost/smp-status/?disable-long-running=true"

Status response fields

When enabled, the response is a flat JSON object. The table below describes the fields emitted by the built-in SMPStatusProvider (since v5.4.0):
FieldTypeDescription
build.timestampstringBuild timestamp of the running WAR
startup.datetimestring (ISO 8601)Server startup time
status.datetimestring (ISO 8601)Time the status was generated (local TZ)
status.datetime.utcstring (ISO 8601)Time the status was generated (UTC)
version.smpstringphoss SMP version (e.g. 8.1.3)
version.javastringJVM version in use
global.debugbooleanWhether debug mode is active
global.productionbooleanWhether production mode is active
smp.applicationstringApplication title string
smp.backendstringActive backend (xml, sql, mongodb)
smp.modestringtest or production
smp.resttypestringREST API type (peppol or bdxr)
smp.identifiertypestringIdentifier scheme in use
smp.idstringSML SMP ID
smp.writable-rest-api.enabledbooleanWhether write REST API is enabled
smp.rest-remote-query-api.enabledbooleanWhether the remote query API is enabled
smp.publicurlstringConfigured public server URL
smp.forcerootbooleanWhether forceroot is active
smp.publicurl.modestringPublic URL detection mode
smp.rest.log-exceptionsbooleanREST exception logging flag
smp.rest.payload-on-errorbooleanWhether error responses include payload
smp.sml.enabledbooleanSML integration enabled
smp.sml.neededbooleanSML integration required
smp.sml.urlstringSML management service URL (if configured)
smp.sml.dnszonestringSML DNS zone (if configured)
smp.sml.connection-timeout-msnumberSML connection timeout
smp.sml.request-timeout-msnumberSML request timeout
smp.pd.enabledbooleanPeppol Directory integration enabled
smp.pd.neededbooleanPeppol Directory integration required
smp.pd.auto-updatebooleanAuto-push to Directory on change
smp.pd.hostnamestringDirectory host name
smp.certificate.configuration-validbooleanWhether keystore loaded successfully
smp.certificate.issuerstringCertificate issuer DN
smp.certificate.subjectstringCertificate subject DN
smp.certificate.expiredbooleanWhether the SMP certificate has expired
smp.certificate.notbeforestring (ISO 8601)Certificate validity start (if smp.status.showcertificatedates=true)
smp.certificate.notafterstring (ISO 8601)Certificate expiry date (if smp.status.showcertificatedates=true)
proxy.http.configuredbooleanHTTP proxy configured
proxy.https.configuredbooleanHTTPS proxy configured
proxy.username.configuredbooleanProxy username configured
csp.enabledbooleanContent Security Policy enabled
csp.reporting.onlybooleanCSP in report-only mode
csp.reporting.enabledbooleanCSP reporting enabled
Additional fields may be present if a custom ISMPStatusProviderExtensionSPI implementation is registered via the Java ServiceLoader mechanism.

Example response (enabled)

{
  "build.timestamp": "2025-01-15T10:30:00Z",
  "startup.datetime": "2026-03-19T08:00:00+01:00",
  "status.datetime": "2026-03-19T09:15:00+01:00",
  "status.datetime.utc": "2026-03-19T08:15:00Z",
  "version.smp": "8.1.3",
  "version.java": "17.0.10",
  "global.debug": false,
  "global.production": true,
  "smp.application": "phoss SMP",
  "smp.backend": "sql",
  "smp.mode": "production",
  "smp.resttype": "peppol",
  "smp.identifiertype": "peppol",
  "smp.writable-rest-api.enabled": true,
  "smp.publicurl": "https://smp.example.org",
  "smp.certificate.configuration-valid": true,
  "smp.certificate.expired": false,
  "csp.enabled": true
}

Response when disabled

If smp.status.enabled = false (the default), the endpoint still returns HTTP 200 but with a minimal JSON body:
{
  "status.enabled": false
}

Logging

Log4j 2

phoss SMP uses Log4j 2 with SLF4J as the logging facade. The Log4j configuration file is log4j2.xml, bundled in the WAR. Override it for production by placing a log4j2.xml on the classpath or specifying its path via the system property:
-Dlog4j2.configurationFile=/etc/smp/log4j2.xml
Recommended production log level:
<Configuration>
  <Loggers>
    <Root level="warn">
      <AppenderRef ref="FILE"/>
    </Root>
    <Logger name="com.helger.phoss.smp" level="info" additivity="false">
      <AppenderRef ref="FILE"/>
    </Logger>
  </Loggers>
</Configuration>

Tomcat log files

When deployed on Tomcat, application output goes to the standard Tomcat logs directory (typically /opt/tomcat/logs/ or /var/log/tomcat/):
FileContents
catalina.outAll stdout/stderr from the JVM
catalina.YYYY-MM-DD.logTomcat internal log, rotated daily
localhost.YYYY-MM-DD.logPer-host log

Docker log access

If running via the official Docker image, logs are written to stdout and accessible with:
docker logs phoss-smp
Follow logs in real time:
docker logs -f phoss-smp
Inside the container, Tomcat rotates catalina.out daily:
/usr/local/tomcat/logs/catalina.out.YYYY-MM-DD

Key metrics to monitor

The following operational indicators are worth tracking in an alerting or observability system:
IndicatorHow to checkAlert condition
SMP process aliveGET /ping/Non-200 response
Certificate validitysmp.certificate.expired in /smp-status/true
Certificate configurationsmp.certificate.configuration-valid in /smp-status/false
JVM versionversion.java in /smp-status/Below Java 17
Debug mode activeglobal.debug in /smp-status/true in production
SML connectivitySML operations in application logERROR log entries
Set smp.status.enabled = true in staging and production, and scrape /smp-status/ from your monitoring system (Prometheus blackbox exporter, Datadog HTTP check, etc.) to detect certificate expiry before it causes outages.

Build docs developers (and LLMs) love