Dogfooding: How We Monitor needful-apps.de with Leif

We built Leif for manufacturing environments. But a central log server is valuable everywhere systems run unattended, a website included. This site, needful-apps.de, reports its own events to Leif. Here is how it works.

Why a website needs central logging

Server errors, failed form deliveries, an unusual number of 404 hits: all of it happens while nobody is watching. Instead of searching log files over SSH, we see every message live in Leif, filtered by service and level, and critical errors land in Microsoft Teams immediately.

The integration: a single REST call is enough

Leif accepts logs via TCP or REST. For the website we use the REST ingest: a POST to /api/v1/logs with the client ID and API key from the Leif admin panel. Fault tolerant with a short timeout, so the website never waits for logging:

// src/leif.ts (excerpt): reporting website events to Leif
await fetch(`${LEIF_URL}/api/v1/logs`, {
  method: 'POST',
  headers: {
    'X-Client-Id': LEIF_CLIENT_ID, // created in the Leif admin panel
    'X-Api-Key': LEIF_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    level: 'ERROR',
    message: 'Contact form: SMTP delivery failed',
    service: 'na-site',
    host: 'web-1',
    metadata: { path: '/kontakt/', lang: 'de' },
  }),
  signal: AbortSignal.timeout(1500),
});

What we report and what we do not

  • Server errors (5xx) and unhandled exceptions: level ERROR, with a Teams alert
  • Failed email delivery of contact requests: level ERROR
  • New contact requests: level INFO, as an event record
  • No personal data: names, email addresses and message texts stay in the database, not in the log

Conclusion

The same infrastructure that monitors robots on the shop floor monitors our website: proof of how flexible a self-hosted log server really is. If you would like to evaluate Leif for your machines or for your IT, we will show it to you live in 30 minutes.

Frequently asked questions

Can Leif monitor systems outside of robotics as well?

Yes. Leif accepts logs from anything that speaks TCP or REST: websites, backend services, PLCs, test rigs or scripts. Each system gets its own client ID with an API key in the admin panel.

Does the logging slow the website down?

No. The integration works asynchronously and with a short timeout. If Leif cannot be reached, the website continues without any delay and the message is discarded.

Let us talk.

Free initial consultation: We will get back to you as soon as possible.