Logs monitor
Send your application logs to Uptiva and alert on errors, a message, or silence.
What it checks
Your application sends logs to Uptiva. A Logs monitor counts the logs of one service in a time window and alerts when matching logs reach a number you set, or when no matching logs arrive. It is evaluated every minute.
Before you start
- Plan. Logs need the Business plan. They are not on Free or Pro. Without it the Logs tile shows Not on your plan and sending logs is refused.
- Daily quota. The plan sets how many megabytes you may send per day. The Business default is 200 MB per day; Uptiva can change it for your account. The API page shows today's usage.
- Privacy. See the privacy notes at the end of this page.
Step 1: create a log token
- Open /app and go to API in the menu.
- In the Log sources card enter a Token name (for example
production) and click Create log token. - Copy the token now. It starts with
upl_and is shown only once. Treat it like a password: keep it in your secret store, not in code. - You can have up to 5 tokens, one per application or environment. Revoke a token from the same card; anything still using it is then refused.
Step 2: send logs
Send a POST request with JSON to https://uptiva.linuxmaster.cloud/api/ingest/logs. Put the token in the Authorization: Bearer header (the header X-Uptiva-Token also works). A successful request answers 202 with {"accepted": 1}.
curl
curl -fsS -X POST https://uptiva.linuxmaster.cloud/api/ingest/logs \
-H "Authorization: Bearer upl_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"logs":[{"message":"payment failed","level":"error","attributes":{"order":"o-1"}}],"service":"checkout"}'JavaScript
await fetch("https://uptiva.linuxmaster.cloud/api/ingest/logs", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.UPTIVA_LOG_TOKEN,
"Content-Type": "application/json",
},
body: JSON.stringify({
service: "checkout",
logs: [{ message: "payment failed", level: "error", attributes: { order: "o-1" } }],
}),
});Python
import os, requests
requests.post(
"https://uptiva.linuxmaster.cloud/api/ingest/logs",
headers={"Authorization": "Bearer " + os.environ["UPTIVA_LOG_TOKEN"]},
json={
"service": "checkout",
"logs": [{"message": "payment failed", "level": "error", "attributes": {"order": "o-1"}}],
},
timeout=10,
)Fields
| Field | Meaning |
|---|---|
service | Name of the application, for example checkout. Letters, digits, dots, dashes and underscores. A service is created the first time you use a new name. You can have up to 10 services. If you send none, the logs go to a service called default. |
logs[].message | The log line. Up to 8 KiB; longer text is cut. |
logs[].level | trace, debug, info, warn, error or fatal. Also accepted: warning, information, err, critical. A missing level means info. |
logs[].attributes | Extra key/value details, for example {"order": "o-1"}. Up to 20 per log; keys up to 64 characters, values cut at 512. |
logs[].time | Optional ISO time or epoch milliseconds. Times older than 7 days or more than 5 minutes ahead are replaced by now. |
OpenTelemetry
An OpenTelemetry collector or SDK can send OTLP/HTTP with a JSON body to https://uptiva.linuxmaster.cloud/api/ingest/otlp/v1/logs. Protobuf is not supported. Gzip-compressed bodies (Content-Encoding: gzip) are accepted. With the standard environment variables:
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://uptiva.linuxmaster.cloud/api/ingest/otlp/v1/logs
OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/json
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20upl_YOUR_TOKEN
OTEL_SERVICE_NAME=checkoutLimits and responses
| Limit | Value |
|---|---|
| Request size | 256 KiB (also after unzipping) |
| Logs per request | 500 |
| Message | 8 KiB |
| Attributes | 20 per log |
| Requests | 120 per minute per token |
| Services | 10 |
| Tokens | 5 |
| Daily quota | Set by your plan (Business default: 200 MB per day). Counted by request size, resets at midnight UTC. |
| Retention | Logs are kept for 7 days |
| Status | Meaning |
|---|---|
| 202 | Accepted. Logs appear within a few seconds. |
| 401 | The token is missing, wrong or revoked. |
| 403 | Your plan does not include logs. |
| 413 | Too large: over 256 KiB, or more than 500 logs in one request. |
| 415 | Content-Encoding is not gzip. |
| 422 | The body is not valid, is protobuf, or you reached the 10-service limit. |
| 429 | Too many requests (120 per minute per token) or the daily quota is used up. Wait for the Retry-After time. A refused request is not counted. |
Logs are passed on in the background. If Uptiva is restarted or overloaded, logs still waiting can be lost, so do not use logs as your only record of something important.
Step 3: create the monitor
- Open /app and click New monitor.
- Under What to monitor choose Logs. Enter a Name.
- Under Logs to watch choose the Service. Pick one that has received logs, or choose New service and type the name you will send.
- Look at the last: 1 minute, 5 minutes, 15 minutes, 30 minutes or 1 hour. The window is re-checked every minute.
- Levels to count: Trace, Debug, Info, Warning, Error, Fatal. Leave all off to count every level.
- Text the log must contain (optional): plain text, not case sensitive, for example
payment failed. It is not a pattern. - Alert when: Matching logs reach a number and set Number of logs (1 alerts on the first matching log), or No matching logs arrive.
- Under Alerts choose where alerts go. Click Create monitor.
Two examples
- Error spike. Service
checkout, levels Error and Fatal, window 5 minutes, alert when matching logs reach5. - App went silent. Service
worker, all levels, window 15 minutes, alert when No matching logs arrive.
Check interval
There is no interval to choose. A Logs monitor is evaluated every minute. Windows overlap, so after a burst the count stays high for up to one window and the recovery comes that much later.
What the monitor page shows
- Logs card: what the monitor alerts on, Matching logs in the current window, Last log received and Last counted.
- Send logs card: the address, a curl example and the OpenTelemetry settings.
- Log token card to create or revoke tokens, with today's usage.
Alerts
Alerts work like for any other monitor: the monitor goes down when the condition is met and recovers when it is not. Alert after counts consecutive one-minute evaluations. Channels, quiet hours, reminders and escalation are described in Alerts.
Privacy
- Do not send passwords, tokens, card numbers or personal data in logs. Remove or mask them before sending.
- Logs are kept for 7 days.
- Logs are stored by Uptiva and the operator of Uptiva can access stored logs.
- Other customers cannot see your logs: a monitor only reads the logs of its owner's own services.
Troubleshooting
| Problem | What to check |
|---|---|
| 401 Invalid log token | The token is wrong, has a typo or was revoked. Create a new one on the API page. |
| 403 Your plan does not include logs | Logs need the Business plan. |
| 429 Daily log quota reached | You used the day's quota. It resets at midnight UTC. Send fewer or shorter logs, or ask for a higher quota. |
| 429 Too many requests | More than 120 requests per minute with one token. Send logs in batches (up to 500 per request). |
| Monitor is Offline in No matching logs arrive mode | Zero matching logs counts as none received. This also happens when the service has never received logs, or the service name differs: it must be spelled as in the monitor. |
| Count stays 0 | Check the service name, the levels and the search text. Logs appear within a few seconds; the count refreshes every minute. |
| The Logs tile is greyed out | Your plan does not include logs. |