Setting LOG_LEVEL in Netpicker for troubleshooting

Netpicker uses INFO logging by default. When Netpicker Support needs more detail for troubleshooting, you can temporarily set selected services to DEBUG in docker-compose.override.yml without editing the supplied docker-compose.yml file.

DEBUG logging is more verbose and may include operational details, so enable it only while investigating a problem and return the services to INFO afterward.

1. Set LOG_LEVEL to DEBUG in docker-compose.override.yml

In the standard Netpicker Compose configuration, LOG_LEVEL is defined in the shared x-api settings and separately on the kibbitzer service. Add or update the following entries in docker-compose.override.yml:

x-api: &api_common
  environment:
    LOG_LEVEL: DEBUG

services:
  api:
    <<: *api_common

  celery:
    <<: *api_common

  kibbitzer:
    environment:
      LOG_LEVEL: DEBUG

The x-api block is reusable configuration. The api and celery service entries apply that block, while kibbitzer receives its own explicit setting. Other services are unchanged.

If you only need debug logging for one service, include only the corresponding service override. For example, to change only kibbitzer:

services:
  kibbitzer:
    environment:
      LOG_LEVEL: DEBUG

2. Validate the merged Compose configuration

Run this command from the Netpicker installation directory to validate the complete merged configuration:

docker compose config --quiet

No output means that Docker Compose accepted the configuration.

Next, inspect the resolved configuration for the specific service you are troubleshooting:

docker compose config api | grep LOG_LEVEL
docker compose config celery | grep LOG_LEVEL
docker compose config kibbitzer | grep LOG_LEVEL

Each service that you changed should show:

LOG_LEVEL: DEBUG

You can also run docker compose config SERVICE without grep to inspect the complete resolved configuration for that service. Replace SERVICE with a service name such as api, celery, or kibbitzer.

3. Apply the change

After verifying the merged configuration, recreate the services whose environment you changed:

docker compose up -d api celery kibbitzer

If you changed only one service, specify only that service. For example:

docker compose up -d kibbitzer

Use docker compose up -d rather than only restarting the existing container, because the container must be recreated to receive its changed environment.

4. Collect the debug logs

Follow the logs for the service you are troubleshooting:

docker compose logs --follow api
docker compose logs --follow celery
docker compose logs --follow kibbitzer

Press Ctrl+C to stop following the logs. You can also save recent logs to a file, for example:

docker compose logs --since 30m --timestamps api > api-debug.log 2>&1

5. Return the services to INFO

When troubleshooting is complete, change each temporary override from DEBUG back to INFO, or remove the temporary LOG_LEVEL entries so the defaults apply again. Then validate and recreate the affected services:

docker compose config --quiet
docker compose up -d api celery kibbitzer

For more detail, see the current Netpicker Compose configuration and Docker’s documentation for docker compose config.

Would you like a hands-on session?

A couple times a week our in-house trainer is available for a private or group session. In this session we can cover our Slurp'it or Mock'it solution but also integrations with Netpicker, NetBox, Nautobot & Infrahub.

Yes, keep me informed

Connect with us on LinkedIn to stay updated on the latest happenings, news, and exciting developments at Slurp'it. Just click the button below to follow us and be a part of our professional network.

Newsletter