Beta: log monitoring is in closed beta for a small group of invited testers. It is not yet available in every Xitoring account. To request access, contact us.
What Is Log Monitoring?
Log monitoring lets Xitogent read the logs on your Linux and Windows servers and send them to Xitoring. You can search them, see which errors repeat, get alerted on the lines that matter, and open the lines around an incident without logging in to the server.
Log monitoring is enabled per account by Xitoring.
Requirements
- Xitogent version 2.13 or later on a Linux server, or 2.14 or later on a Windows server.
- Log monitoring enabled for your account. Contact us to request beta access.
Turn It On
Only the account owner can turn log monitoring on, sub-accounts cannot.
- Open a server in Xitoring.
- Open the Logs tab.
- Turn log monitoring on.
You do this once, and it applies to all of your servers.
Turn It Off
Only the account owner can turn log monitoring off.
- Open a server in Xitoring.
- Open the Logs tab and select Sources and settings.
- Select Turn off log monitoring and confirm.
Collection stops on all of your servers. Logs already sent to Xitoring are not deleted straight away: each line is kept for the retention period of your account.
What Is Collected
Linux
By default Xitogent reads:
- The systemd journal
/var/log/messages,/var/log/syslogand/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
By default Xitogent reads:
- The System and Application Event Log channels
- The IIS logs, when Xitogent detects IIS on the server
- The SQL Server error log, when Xitogent detects SQL Server on the server
The dashboard adds log file paths. During the beta, other Event Log channels can be added on request: contact support. Log files saved as UTF-16, which is common on Windows, are read correctly.
Add Your Own Log Files
You can add your own file paths in the sources panel of the server's Logs tab. A path under /var/log on Linux or one of the integration paths is read straight away. Any other path stays pending approval until it is approved on the server. 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, open an elevated (Administrator) prompt and use a Windows path, without sudo:
xitogent logs approve "D:\MyApp\logs\app.log"
xitogent logs list
xitogent logs revoke "D:\MyApp\logs\app.log"
Credential files such as /etc/shadow, SSH keys, private keys (.pem and .key files), the Windows registry hives and the agent's own configuration file are always refused.
What Is Masked
Xitogent masks sensitive values on your server, before logs leave it:
- Passwords
- Tokens and API keys
Authorizationheaders- Cookies
- Credentials inside URLs
- Private key blocks
- Common vendor tokens
You can add up to 50 regular expressions of your own for values specific to your applications under Masking patterns in the server's Logs tab. Only the account owner can change them.
Masking looks for secrets, it does not remove personal data. IP addresses, email addresses and usernames can remain in logs.
Use the Log Explorer
The Logs tab of a server shows:
- Latest abnormal line, pinned at the top. Use Jump to line to see it in context.
- Volume chart, with errors in red. Hatched periods mean the server sent nothing.
- Grouped errors with a count, and a New tag for errors not seen before.
- Search and filters by level and by file.
Open a group to see when it was first and last seen, and the lines around it. Incident notifications for a server with log monitoring link to the explorer at the time the incident started.
Log Alerts
Log alerts open a normal Xitoring incident and notify the usual people and channels of the server. The incident links to the explorer at that line. Manage them in the Alerts panel of the server's Logs tab. From the dashboard, the account owner manages log alerts.
Three default rules are on:
- Critical signal: a line classed as critical, such as an out-of-memory kill, a full disk, a segfault, a kernel panic, a filesystem error or a disk I/O error. One incident per error group.
- Error surge: error lines in 5 minutes exceed both 20 and 5 times the usual 5-minute count of the server over the last 24 hours. One incident per server.
- New error: an error group the server has not produced in 30 days, once the server has 7 days of history. One incident per error group.
You can also add your own rules: a text to look for, optionally limited to levels and to one file, with a threshold over a time window. A rule fires when it matches more than 1 to 100,000 times within 1, 5, 10 or 15 minutes. A server can have up to 20 custom rules, and Test against the last hour shows whether a rule would have fired before you save it. You can mute an error group so it stops alerting.
To avoid floods, a server can have at most 10 open log incidents and 20 new ones a day.
Retention and Limits
- Each line is kept for the retention period of your account: 7, 30 or 90 days. Beta accounts start at 30 days.
- Log monitoring has a monthly usage allowance. The account owner gets an email when usage reaches 80% and again at 100%.
- If the network drops, Xitogent keeps up to 256 MiB on disk and sends it later.
- The last few seconds before a sudden crash may not reach Xitoring.