<@U08614ZV82F> Can I somehow see if `permitio/pdp-...
# permit-saas
m
@Ask Inkeep Can I somehow see if
permitio/pdp-v2
container is healthy?
a
Thanks for tagging me @Míla Votradovec. I'll look through relevant sources and get back to you shortly.
Yes, you can check the health of your
permitio/pdp-v2
container through the health endpoint (1) . The PDP provides a health check endpoint at:
Copy code
<http://localhost:7766/health>
This endpoint gives you real-time information about your container status, policy sync status, and connection health while tracking resource utilization metrics to optimize performance . You can also check the container status using the standard Docker command
docker ps
in your terminal (2) , (3) , (4) , (5) , (6) , (7) . Additionally, the PDP provides other monitoring endpoints (1) : • ​*Metrics endpoint*​:
<http://localhost:7766/metrics>
- for detailed performance metrics, request latency, decision counts, cache hit rates, and error rates • ​*API documentation*​:
<http://localhost:7766/redoc>
- to view the complete PDP API documentation
To learn more, see the sources I considered: [[1] Run Local Authorization Microservice | Permit.io Documentation](https://docs.permit.io/overview/local-authorization-microservice) [[2] Run the PDP (Policy Decision Point)](https://docs.permit.io/overview/run-pdp) [[3] Running a demo](https://docs.permit.io/overview/connecting-your-app) [[4] Java Quickstart](https://docs.permit.io/sdk/java/quickstart-java) [[5] Ruby Quickstart](https://docs.permit.io/sdk/ruby/quickstart-ruby) [[6] Dot Net Quickstart](https://docs.permit.io/sdk/dotnet/quickstart-dotnet) [[7] Python Quickstart Async](https://docs.permit.io/sdk/python/quickstart-python)
m
@Ask Inkeep I want to do something similar in docker-compose:
Copy code
healthcheck:
      test: ["CMD-SHELL", "temporal operator cluster health"]
      interval: 200ms
      timeout: 5s
      retries: 50
a
Thanks for tagging me @Míla Votradovec. I'll look through relevant sources and get back to you shortly.
Yes, you can add a healthcheck for the
permitio/pdp-v2
container in your docker-compose file. Here's the configuration:
Copy code
healthcheck:
  test: "wget --no-verbose --tries=1 --spider <http://127.0.0.1:7000/healthy> || exit 1"
(1) The PDP health check endpoint is
/healthy
at port 7000 (often mapped to 7766 when running locally) . You can use wget for health checks as shown above . For a complete docker-compose healthcheck configuration:
Copy code
healthcheck:
  test: "wget --no-verbose --tries=1 --spider <http://127.0.0.1:7000/healthy> || exit 1"
  interval: 200ms
  timeout: 5s
  retries: 50
If you need more advanced policy-level healthchecks, OPAL provides additional options . You can query OPA's ready and healthy rules:
Copy code
curl --request POST '<http://localhost:8181/v1/data/system/opal/ready>'
(2)
To learn more, see the sources I considered: [[1] at Scale](https://docs.permit.io/how-to/deploy/overview) [[2] How to use data update callbacks and OPA healthcheck policy](https://docs.opal.ac/tutorials/healthcheck_policy_and_update_callbacks)
m
@Ask Inkeep I'd prefer similar approach to run just shell command
a
Thanks for tagging me @Míla Votradovec. I'll look through relevant sources and get back to you shortly.
You can use curl as a shell command for the healthcheck (1) . Here's the configuration for your docker-compose:
Copy code
healthcheck:
  test: ["CMD-SHELL", "curl --request POST '<http://localhost:8181/v1/data/system/opal/ready>'"]
  interval: 200ms
  timeout: 5s
  retries: 50
The PDP exposes health endpoints that you can query with curl : For checking if the policy is ready :
Copy code
curl --request POST '<http://localhost:8181/v1/data/system/opal/ready>'
For checking if the system is healthy :
Copy code
curl --request POST '<http://localhost:8181/v1/data/system/opal/healthy>'
Both return :
Copy code
{
  "result": true
}
The health endpoint is also available at port 7766 (2) :
Copy code
healthcheck:
  test: ["CMD-SHELL", "curl -f <http://localhost:7766/health> || exit 1"]
  interval: 200ms
  timeout: 5s
  retries: 50
To learn more, see the sources I considered: [[1] How to use data update callbacks and OPA healthcheck policy](https://docs.opal.ac/tutorials/healthcheck_policy_and_update_callbacks) [[2] Run Local Authorization Microservice | Permit.io Documentation](https://docs.permit.io/overview/local-authorization-microservice)
m
@Ask Inkeep I made it working, but I see too many logs from the container. Every health-check produces three lines:
Copy code
aisle-permit-pdp.local    | 2025-10-06T15:58:25.334897+0000 | uvicorn.protocols.http.httptools_impl   | INFO  | 127.0.0.1:53914 - "GET /healthy HTTP/1.1" 200
aisle-permit-pdp.local    | 2025-10-06T15:58:25.335353+0000 | opal_client.engine.logger               | INFO  | Received request.    GET /health
aisle-permit-pdp.local    | 2025-10-06T15:58:25.337017+0000 | opal_client.engine.logger               | INFO  | Sent response.       GET /health -> 200
How can I mute it?
a
Thanks for tagging me @Míla Votradovec. I'll look through relevant sources and get back to you shortly.
You can reduce the OPA logging by configuring the
OPAL_INLINE_OPA_LOG_FORMAT
environment variable (1) . Set it to control the log verbosity for OPA logs :
Copy code
OPAL_INLINE_OPA_LOG_FORMAT=none
The available options are : •
none
- no logs •
minimal
- only the event name is logged •
http
- log HTTP method, path, and status code •
full
- log the entire data returned Setting it to
none
will eliminate the OPA engine logs from your health checks . Add this to your docker-compose environment variables:
Copy code
environment:
  - OPAL_INLINE_OPA_LOG_FORMAT=none
This configuration controls the OPA logs specifically . The default value is
none
, so if you're still seeing logs, you may want to verify your current configuration.
To learn more, see the sources I considered: [[1] Configurations](https://docs.permit.io/concepts/pdp/configuration)
m
@Ask Inkeep It is still producing wall of text:
aisle-permit-pdp.local    | 2025-10-07T07:58:11.923388+0000 | uvicorn.protocols.http.httptools_impl   | INFO  | 127.0.0.1:39558 - "GET /healthy HTTP/1.1" 200
every 200ms
a
Thanks for tagging me @Míla Votradovec. I'll look through relevant sources and get back to you shortly.
You can control the logging verbosity using the
OPAL_LOG_MODULE_EXCLUDE_LIST
environment variable to exclude the
uvicorn.protocols.http
module from logging (1) . Add this to your docker-compose environment variables:
Copy code
environment:
  - OPAL_LOG_MODULE_EXCLUDE_LIST=["uvicorn.protocols.http.httptools_impl"]
The documentation explains that
OPAL_LOG_MODULE_EXCLUDE_LIST
allows you to ignore logs emitted by specific modules . By default it's set to
["uvicorn"]
, but you can customize it to exclude the specific HTTP protocol module that's generating your healthcheck logs (2) (3) . Alternatively, you can use
OPAL_LOG_MODULE_INCLUDE_LIST
and only include the modules you want to see logs from (1) . To get all logs except the ones you don't want, you'd set the exclude list accordingly . For the PDP specifically, you can also adjust the overall log level using: •
OPAL_LOG_LEVEL
- Set to
WARNING
,
ERROR
, or
CRITICAL
to reduce verbosity (default is
INFO
) (2) (3)
To learn more, see the sources I considered: [[1] Troubleshooting](https://docs.opal.ac/getting-started/running-opal/troubleshooting) [[2] OPAL Configuration Guide | OPAL](https://docs.opal.ac/getting-started/configuration) [[3] OPAL Configuration Guide | OPAL](https://docs.opal.ac/getting-started/configuration)