When it comes to network monitoring, monitoring logs is crucial for maintaining security and operational visibility. Syslog, a standard protocol for message logging, offers many advantages for transmitting, centralizing and managing different types of log messages.
In this article, we will explore what syslog facilities are, how they work within Paessler PRTG Network Monitor, specifically to help you monitor and troubleshoot your network, servers, and associated infrastructure.
Syslog facilities are designations used to indicate what types of messages are being sent to syslog. The facilities can be used for various things including splitting messages by the intended uses of the message. Ideally, these will help identify the component of a device or operating system that generated a particular log message.
It's essentially a categorization mechanism that helps administrators identify the source of syslog messages. It can also help us filter messages, for example if we do not want to forward debug messages, we could keep them locally on a system but not use them for monitoring.
The syslog protocol as defined in RFC5424 establishes several standard facilities, each represented by a numerical code known as a facility value:
Facility Number | Facility Name | Description |
---|---|---|
0 | kern | Kernel messages |
1 | user | User-level messages |
2 | Mail system | |
3 | daemon | System daemons |
4 | auth | Security/authorization messages |
5 | syslog | Messages generated internally by syslogd |
6 | lpr | Line printer subsystem |
7 | news | Network news subsystem |
8 | uucp | UUCP subsystem |
9 | cron | Clock daemon |
10 | authpriv | Security/authentication messages |
11 | ftp | FTP daemon |
12 | ntp | NTP subsystem |
13 | security | Log audit |
14 | console | Log alert |
15 | solaris-cron | Scheduling daemon |
16-23 | local0 - local7 | Local use facilities |
These facility codes help organize log messages and allow administrators to filter and route them appropriately. For example, all authentication-related logs might be directed to a specific security monitoring system, while printer-related logs might be sent elsewhere.
In addition to facilities, syslog messages also include severity levels that indicate the importance or urgency of the message:
Level | Severity | Description |
---|---|---|
0 | Emergency | System is unusable |
1 | Alert | Immediate action required |
2 | Critical | Critical conditions |
3 | Error | Error conditions |
4 | Warning | Warning conditions |
5 | Notice | Normal but significant condition |
6 | Informational | Informational messages |
7 | Debug | Debug-level messages |
The combination of facility and severity creates what's called the "PRI" (priority) value of a syslog message, calculated using the formula: Priority = (Facility × 8) + Severity
Paessler PRTG Network Monitor includes a powerful Syslog Receiver Sensor that can collect, analyze, and monitor syslog messages from various devices across your network, including Cisco devices, routers, and firewall appliances.
The Syslog Receiver Sensor in PRTG acts as a syslog server, receiving and processing syslog messages from network devices. It displays important information including:
PRTG analyzes these components to help you identify potential issues and monitor your network effectively.
To set up effective syslog monitoring in PRTG, follow these steps:
For each network device you want to monitor:
For Cisco devices, you might use commands like:
logging on logging host 192.168.1.100 logging trap warnings
For Linux or Unix systems, you would modify the syslog configuration file (typically `/etc/syslog.conf` or `/etc/rsyslog.conf`).
PRTG offers powerful filtering capabilities for syslog messages. You can create filters based on:
Filters use a special syntax in the form of `field[filter]` and can be combined with boolean operators (AND, OR, NOT) and brackets.
For example:
PRTG doesn't just handle syslog—it can integrate this data with other monitoring protocols like SNMP for a more comprehensive view of your network. This allows you to correlate syslog messages with performance metrics for better troubleshooting.
Additionally, PRTG's API allows you to extend its capabilities and integrate with other systems, enabling custom solutions for specialized environments like VMware infrastructures.
A powerful syslog analyzer can help you extract valuable insights from your logs. For example:
By properly configuring your logging facility settings across devices, you can create a comprehensive monitoring system that provides early warning of potential issues.
Syslog facility monitoring in PRTG provides a powerful way to centralize and analyze log data from across your network. By understanding how facilities and severity levels work together, you can effectively filter, prioritize, and respond to important system logs.
PRTG's Syslog Receiver Sensor offers comprehensive capabilities for collecting, analyzing, and alerting on syslog messages, making it an essential tool for network administrators looking to maintain security and operational efficiency.
By implementing the best practices outlined in this guide, you can leverage PRTG's syslog monitoring capabilities to gain deeper insights into your network and respond more effectively to potential issues requiring immediate action.