We migrated from using supervisor to having all our services managed by pebble. One of the benefits we got from switching is pebble’s native ability to ship logs to Loki or any other Loki compatible system. This capability allows us to run and collect logs from our services using one solution which is super convenient as it reduces one operational burden.
In this article, we will show how to configure pebble for shipping application logs to VictoriaLogs.
What is VictoriaLogs?
VictoriaLogs is an open source user-friendly database for logs from VictoriaMetrics . It comes with a great built in UI and query language.
After using Loki with Grafana for a while, we decided to try out VictoriaLogs and preferred it because it felt better to query from, it also feels more lightweight as advertised.
Sending Logs to VictoriaLogs from Pebble
Pebble comes with out-of-the-box functionality to ship Logs to Loki. Fortunately for us, VictoriaLogs supports the Loki protocol accepts requests from Loki clients for ingesting data. So whatever you can send to Loki, you can also send to VictoriaLogs.
This makes the configuration for pebble straightforward, as all we have to adjust is the URL to point it to a running Victoria Logs server instance.
As part of this work we also contributed a minor fix to VictoriaLogs for handling situation where pebble pushes data into it.
services:
myprogram:
command: /path/to/program
user: pebble
group: pebble
logging:
myprogram-logging:
url: "http://localhost:6379/v1/loki"
services: [ all ]
labels: staging
Considerations
When configuring log shipping from Pebble to VictoriaLogs, keep the following points in mind:
- Labeling: Use the
labelsfield to add metadata (likeenvironment,service_name, orregion). VictoriaLogs uses these labels for efficient filtering and querying. - Endpoint Compatibility: VictoriaLogs supports the standard Loki push API. Ensure your URL points to the correct ingestion path (often
/v1/lokior/insert/loki/api/v1/push) and the correct port (default for VictoriaLogs is usually9428). - Network Security: If Pebble and VictoriaLogs are running on different hosts, ensure you use HTTPS and potentially basic authentication to protect your log data in transit.
- Buffering and Retries: Pebble handles the heavy lifting of buffering logs and retrying failed requests, which reduces the risk of log loss during temporary network outages.
Conclusion
By leveraging Pebble’s built-in logging layer, we’ve significantly simplified our observability pipeline. We no longer need to maintain separate log-shipping agents like Promtail or Fluent Bit on every host for standard service logs.
This “batteries-included” approach to service management makes Pebble an excellent choice for teams looking to reduce infrastructure complexity while maintaining deep visibility into their applications.
Looking for more on Pebble? Check out our guide on Switching from Supervisor to Pebble.