Log Monitoring (Beta)
Closed beta
Log monitoring is in closed beta. It is available only to a small number of invited beta testers, and it is not visible in other accounts. If you would like to join, contact Xitoring support.
Log monitoring lets Xitogent read the logs on your servers and send them to Xitoring. You can search them, see which errors repeat, get an incident when a critical line appears, and look at the lines around an incident without logging in to the server.
Requirements
- Xitogent 2.13 or later on a Linux server. See Update Xitogent.
- Xitogent 2.14 or later on a Windows server. See Update Xitogent on Windows.
- Log monitoring enabled for your account by the Xitoring team during the beta.
Turn it on
Only the account owner can turn log monitoring on. Sub-accounts cannot.
- Open a server in Xitoring.
- Open the
Logstab. - Select
Enable log monitoring.
You turn it on once and it applies to all of your servers. Xitogent starts sending logs after it receives the new configuration.
Turn it off
Only the account owner can turn log monitoring off.
- Open a server in Xitoring.
- Open the
Logstab and selectSources and settings. - Select
Turn off log monitoringand confirm.
Collection stops on all of your servers once Xitogent receives the new configuration, and Xitogent deletes the logs it was still holding on each server. Logs that were already sent to Xitoring stay until they expire under your retention period.
What is collected
Linux
Xitogent reads these sources by default:
- The systemd journal
/var/log/messages/var/log/syslog/var/log/kern.log- Docker container logs, only when Xitogent detects Docker on the server
- The usual log paths of the integrations detected on the server: Nginx, Apache, MySQL, PostgreSQL, Redis and PHP-FPM
Windows
Xitogent reads these sources by default:
- The
SystemEvent Log channel - The
ApplicationEvent Log channel - IIS logs in
C:\inetpub\logs\LogFiles\W3SVC*\*.log, when IIS is detected on the server - The SQL Server
ERRORLOGfile, when SQL Server is detected on the server
Each Event Log entry becomes one line in the form [Provider] EventID: message, with the level and the time of the event. After a restart or a reboot, Xitogent continues from where it stopped.
Log files on Windows can be encoded as UTF-16, for example the SQL Server ERRORLOG. Xitogent detects this and reads them correctly.
The Security channel and other Event Log channels are not collected by default. During the beta, other channels can be added on request. Contact support.
Add your own log files
You can add your own file paths in the Log sources panel of the server's Logs tab. Use File path and Add file. A server can have up to 50 sources that you added.
On Linux, enter an absolute path such as /opt/myapp/logs/app.log. On Windows, enter a path that starts with a drive letter and uses backslashes, such as D:\myapp\logs\app.log.
A path under /var/log or one of the integration paths is read straight away. Any other path shows as Pending approval until you approve it on the server. The panel shows the exact command to run.
On Linux:
sudo xitogent logs approve '/opt/myapp/logs/app.log'
sudo xitogent logs list
sudo xitogent logs revoke '/opt/myapp/logs/app.log'
On Windows, run the same commands from an elevated prompt (Run as administrator):
xitogent logs approve "D:\myapp\logs\app.log"
xitogent logs list
xitogent logs revoke "D:\myapp\logs\app.log"
This way nobody can make Xitogent read a file on your server without someone with access to that server agreeing to it.
Paths that are always refused
Xitogent refuses some paths even if you try to approve them:
- On Linux:
/etc/shadow,/etc/gshadowand/etc/sudoersfiles, anything inside/proc,/sysor/dev, and Xitogent's own configuration files. - On Windows: network and device paths, the registry hive folder (
System32\config), Xitogent's own data folder andxitogent.ini. - On both: any
.sshfolder, files ending in.pemor.key, and anything that is not a regular file.
Source states
Each source in the Log sources panel has one of these states:
| State | Meaning |
|---|---|
Default | A source Xitoring chose for this server. |
Active | Xitogent is reading it. |
Pending approval | The path needs xitogent logs approve on the server. |
Refused | Xitogent will not read it. The reason is shown under the path. |
File missing | The file or Event Log channel does not exist on the server. |
Masking of sensitive data
Xitogent masks sensitive values on your server, before the logs leave it. The masking covers:
- Passwords
- Tokens and API keys
Authorizationheaders- Cookies
- Credentials inside URLs
- Private key blocks
- Common vendor tokens
You can add your own regular expressions for values that are specific to your applications. Open the Logs tab, select Sources and settings, and enter one regular expression per line under Masking patterns. You can add up to 50 patterns of up to 512 characters each. Only the account owner can change them.
Warning
Masking looks for secrets, it does not remove personal data. IP addresses, email addresses and usernames can remain in the logs that are sent to Xitoring.
The log explorer
Open the Logs tab of a server to see the explorer.
- Latest abnormal line: the most recent abnormal line is pinned at the top. Use
Jump to lineto see it in context. - Volume chart: shows how many lines the server logged over time. Errors are shown separately. Hatched periods mean the server sent nothing, for example because it was off or could not reach Xitoring.
- Patterns: similar lines are grouped together with a count. A
Newtag marks a group that has not been seen before. Open a group to see when it was first and last seen, the file, its last 30 days, and the lines around it. - Raw lines: every line in the selected time range, newest first. Use
Load older linesto go further back. - Search and filters: search the text of the logs, and filter by level (
Critical,Error,Warning,Info,Debug) and by source file. - Alerts: your log alert rules. See below.
If the explorer shows Logs are delayed, recent lines may be missing while ingestion catches up.
When an incident comes from a log alert, its notification links to the explorer at the matching line. In the explorer, Back to incident takes you back to the incident.
Log alerts
A log alert opens a normal Xitoring incident on the server. The incident notifies the same people and channels as the server's other incidents, and it follows the same escalation. The message contains the rule name, the server, the matching line, how many times it happened and when it was first and last seen.
Manage them in the Alerts view of the server's Logs tab. From the dashboard, the account owner manages log alerts.
Default rules
These rules are on by default. You can switch each one off for a server.
| Rule | When it opens an incident |
|---|---|
| Critical signal | A line logged at critical level, or a Linux line that matches one of these: an out-of-memory kill (Out of memory: Killed process, invoked oom-killer), No space left on device, segfault at, kernel BUG at, general protection fault, kernel panic, an ext2-fs, ext3-fs or ext4-fs error, or a disk I/O error (Buffer I/O error, I/O error, dev). One incident per error group. |
| Error surge | Error lines in 5 minutes exceed both 20 and 5 times this server's usual 5-minute count over the last 24 hours. One incident per server. |
| New error | An error group this server has not produced in 30 days, once the server has 7 days of history. One incident per error group. |
On Windows, unclean restarts, stop errors, low memory, crashed services and disk faults are classed critical.
Your own rules
Use Add rule to create a rule. A rule has:
- A name of up to 100 characters.
Line contains: text of up to 200 characters. The match is case-insensitive.Levels: leave empty to match any level.File: optional. Use*as a wildcard. Leave empty to match any file.More than (times)within a window of 1, 5, 10 or 15 minutes. The number is from 1 to 100000.
For example, "payment failed" more than 5 times in 10 minutes.
Use Test against the last hour to see if the rule would have fired before you save it. A server can have up to 20 rules. You can switch a rule off, edit it or delete it. When you delete or switch off a rule, its open incident is resolved.
Muted groups
Open a group in the Patterns view and select Mute group to stop alerts for it. Muting resolves its open incident. Muted groups are listed in the Alerts view, where you can Unmute them. A server can have up to 200 muted groups.
Limits and resolving
- A server has at most 10 open log incidents and at most 20 new ones per day. After that, one
Log alert limit reachedincident stands in for the rest. - A log incident resolves by itself after 30 minutes with no matching line. If the same alert fires again within 2 hours, the incident is reopened.
- A server that is paused, or under a maintenance schedule, does not get log alerts.
Allowance and retention
Log monitoring has a monthly allowance of log data per account and a retention period.
- Usage: the
Logstab showsUsage this month, measured in GB, against your allowance. The allowance resets at the start of each month (UTC). The reset date is shown in the panel. - Emails: the account owner gets an email when usage reaches 80% of the allowance and another when it reaches 100%.
- At the limit: ingestion pauses and the explorer shows
Log ingestion is paused. Critical and error lines still arrive from a 1 GB reserve until it runs out. Ingestion resumes at the next reset, or when the allowance is raised. - Retention: logs are kept for the retention period shown in the panel. A beta account has a retention period set for the account. The default is 30 days. The tiers for paid log capacity are 7, 30 and 90 days. A new retention period applies to lines received after the change. Lines already stored keep the retention they had when they were received.
During the beta, capacity for beta testers is agreed with the Xitoring team. Extra capacity can be added from Billing where it is offered, using Add a log pack or Change allowance in the Logs tab.
Troubleshooting
The Logs tab is not there. Log monitoring is in closed beta and is only shown to invited accounts. Contact support to ask about joining.
Nothing is collected from a server. Check that log monitoring is on, and that the server runs Xitogent 2.13 or later on Linux, or 2.14 or later on Windows. Xitogent receives its new configuration shortly after you change it.
A source is Pending approval. Run the command shown under the path on the server. On Linux, Xitogent ignores the approval file when it is writable by group or others.
A source is Refused. The reason is shown under the path. Common reasons are:
it is inside an .ssh directoryit looks like a private key or certificateit is a credential fileit is an agent configuration fileit is inside the registry hive folderit is a network or device paththe path must be absolute and at most 1024 bytesonly regular files under an allowed or approved path can be read
A source is File missing. The file does not exist yet, or on Linux journalctl is not available. On Windows, the event log channel does not exist means the channel name is wrong or not installed on that server.
A Windows Event Log channel shows Refused with access to the event log channel is denied. The account Xitogent runs under cannot read that channel.
A Windows Event Log channel shows the event log could not be read, retrying. Xitogent could not read the channel and will try again. The text after it is the error from Windows.
Logs are delayed. Recent lines may be missing while ingestion catches up. The banner shows when the last line arrived.
Log ingestion is paused. The monthly allowance is used up. See Allowance and retention.
Notes
- Log monitoring does not change how your server metrics are collected.
- If the server loses its network connection, Xitogent keeps up to 256 MiB of logs on disk and sends them once the connection is back.
- The last few seconds before a sudden crash, for example a power loss or a kernel panic, may not reach Xitoring.