Understanding syslog facilities: An in-depth guide
Last updated on:In this page
- What is a syslog facility?
- How syslog facilities work
- Common syslog facilities and their codes
- Vendor-specific facility mapping
- Mapping facilities to applications
- Facility-based filtering and routing
- Choosing the right syslog facility
- Syslog facility management
- Leverage syslog facilities in EventLog Analyzer
Syslog forms the foundation of centralized log management in Linux, Unix, and networked environments. It enables administrators to monitor, analyze, and correlate messages from diverse systems, applications, and devices. At the core of syslog’s powerful classification and routing mechanism are two structured fields that define where a message originated and how critical it is: facility and severity.
This guide explores syslog facilities, their purpose, facility codes, practical applications, and best practices. Additionally, we'll explore how ManageEngine EventLog Analyzer leverages facility-level intelligence for precise log analysis and alerting.
What is a syslog facility?
A syslog facility identifies the source or component that generated a system message. It indicates which part of the system is sending the message, such as the kernel, authentication service, mail system, daemon, or a custom application.
In simpler terms, think of a syslog facility as a label telling you which part of your system is talking. Each syslog message carries two key pieces of information:
- Facility: Identifies the message source (e.g., auth, daemon, local0).
- Severity: Indicates how urgent or critical the message is (e.g., info, warning, critical).
Together, these fields determine how messages are handled, routed, and displayed in a syslog server or log management solution.
Example:
<34>Nov 12 10:05:43 server sshd[1234]: Failed password for root from 192.168.1.10
- Facility: authpriv
- Severity: crit
The <34> value encodes both the facility and severity, allowing syslog servers to classify and route the message efficiently.
Why syslog facilities matter
Facilities provide a categorization framework that enables structured and efficient log management:
- Organize logs: Group similar messages for easier analysis.
- Targeted routing: Configure syslog servers to send messages from specific facilities to different files or destinations.
- Enhanced security visibility: Quickly identify messages from critical components like authentication systems or daemons.
- Compliance support: Ensure important logs (e.g., auth, mail) are preserved for audits.
- Noise reduction: Reduce irrelevant log clutter in large-scale environments.
Without proper facility mapping, crucial messages could end up in the wrong log file, making incident response and troubleshooting more difficult.
How syslog facilities work
Syslog encodes facility and severity information into a PRI (Priority) value using the formula:
PRI = (Facility × 8) + Severity
This numeric value appears in every syslog message, allowing logging systems to categorize, route, and prioritize messages automatically, based on their source and importance.
Example analysis:
<29>1 2025-11-12T09:15:22Z firewall-ext cron[455]: pam_unix(cron:session): session opened for user backup
Breakdown:
PRI value: 29
Facility calculation:
Since PRI = (facility × 8) + Severity, to isolate the facility, perform integer division: Facility = 29 ÷ 8 = 3 (The whole number quotient is the facility code).
Facility 3 maps to daemon. This facility is reserved for system services and background processes.
Severity calculation:
Severity = PRI − (Facility × 8) i.e., severity = 29 − (3 × 8) = 29 − 24 = 5
Severity 5 maps to notice. This indicates a normal but significant operational event that is typically logged for audit trails.
Source: The cron daemon (process ID 455) on host firewall-ext.
Interpretation:
This is a standard security audit log entry. It records the successful opening of a session for the backup user by the cron scheduler. The daemon facility ensures the message is categorized with other system service logs, while the notice severity makes it visible for routine monitoring without signifying an error. Such messages are essential for tracking automated job execution and maintaining security compliance logs.
Common syslog facilities and their codes
Syslog defines 24 standard facilities (0–23) that categorize the source of subsystem generating a message. Each facility provides essential context for log routing, filtering, and alerting in Linux, Unix, and networked environments.
| Code | Facility | Description | Common sources |
|---|---|---|---|
| 0 | kern | Kernel messages | OS kernel, hardware drivers |
| 1 | user | User-level messages | User applications, shell commands |
| 2 | Mail system logs | Postfix, Sendmail, Exim | |
| 3 | daemon | Background daemon processes | cron, DHCP, CUPS, background services |
| 4 | auth | Security and authentication logs | Login attempts, PAM authentication |
| 5 | syslog | Syslog service internal logs | Syslog daemon events |
| 6 | lpr | Line printer subsystem | Print jobs, spooler error messages |
| 7 | news | Network news subsystem | NNTP services |
| 8 | uucp | Unix-to-Unix Copy | Legacy file transfers |
| 9 | cron | Scheduled task logs | Cron job executions |
| 10 | authpriv | Private authentication events | SSH, sudo, privileged access logs |
| 11 | ftp | FTP daemon logs | File transfers |
| 12 | ntp | (Reserved) | Often used for NTP logs, but not standardized |
| 13 | audit | (Reserved) | Sometimes used for audit logs (Linux auditd) |
| 14 | alert | (Reserved) | Sometimes used for critical alerts |
| 15 | clock | (Reserved) | Occasionally used for time-related daemons |
| 16–23 | local0–local7 | Custom facilities | Application-specific logs, network devices, security appliances |
Each facility can be combined with a severity level (e.g., info, warning, error, critical) to produce the PRI value used in all syslog messages, enabling automated routing and classification. Facilities 12–15 are not standardized in RFC 5424 and vary by implementation.
Facility codes explained with examples
| Facility | Purpose | Example message |
|---|---|---|
| kern | Kernel events | kernel: CPU temperature above threshold |
| authpriv | Authentication logs | sshd: Failed password for root |
| daemon | Background process logs | dhcpd: DHCPDISCOVER from 00:1A:2B |
| cron | Scheduled job logs | CRON: (root) CMD (/usr/local/bin/backup.sh) |
| syslog | Syslog service events | syslogd: restarted (v2.4.3) |
| local0–local7 | Custom facilities | local0.info: WebApp started successfully |
These facilities provide immediate insight into the source of an event, helping administrators filter, monitor, and respond efficiently.
Local0–Local7: Custom syslog facilities
The local0–local7 facilities are reserved for custom applications, network devices, and security appliances. They provide flexible categorization beyond standard system logs, enabling tailored logging strategies without conflicting with predefined facilities.
Common usage patterns
| Facility | Typical usage | Example implementations |
|---|---|---|
| local0 | Web applications | NGINX, Apache, custom application logs |
| local1 | Database systems | MySQL, PostgreSQL audit logs |
| local2 | Authentication proxies | RADIUS, TACACS+ |
| local3 | Application analytics | Custom business logic |
| local4 | Network infrastructure | Cisco routers, switches |
| local5 | System services | Load balancers, DNS services |
| local6 | Security monitoring | IDS/IPS, vulnerability scanners |
| local7 | Security appliances | SonicWall, Fortinet firewalls |
Organizations can adapt these mappings to meet internal logging requirements, but maintaining consistency across devices and teams prevents logs from being scattered or missed, improving troubleshooting and alerting.
Vendor-specific facility mapping
Some network and security vendors recommend default facilities for their devices:
- Cisco devices: Typically use local4 for network
infrastructure logs.
logging facility local4 logging host 192.168.1.100
- SonicWall firewalls: Often default to local6 or local7.
Web interface: System > Log > Syslog > Facility: local6
- Fortinet FortiGate: Commonly use local4 for traffic and
event logs.
config log syslogd setting set facility local4 end
These vendor defaults simplify log collection and routing for network and security monitoring tools.
Mapping facilities to applications
Every syslog-capable application specifies its facility when generating logs. This ensures logs are categorized correctly from the source and simplifies filtering, routing, and monitoring.
Application to facility mapping
| Application | Facility | Purpose |
|---|---|---|
| Web server | local0 | HTTP access and application logs |
| Database | local1 | Query logs, replication, audits |
| Firewall | local4 | Connection and traffic logs |
| Authentication system | authpriv | Login, sudo, and privileged events |
| Monitoring agent | daemon | Service health updates |
Example in code
syslog(LOG_LOCAL0 | LOG_INFO, "Application started successfully");
With consistent facility assignments, teams can ensure predictable log behavior, reduce noise, and streamline processing across monitoring and log management platforms.
Facility-based filtering and routing
Syslog’s facility field allows administrators to separate, filter, and route logs efficiently. By directing specific message types to dedicated files or remote servers, organizations can reduce noise, simplify troubleshooting, and ensure critical messages reach the right analysis systems.
Configuring facility-based routing in rsyslog
# Authentication events
authpriv.* /var/log/secure
# Mail system logs
mail.* /var/log/maillog
# Custom application logs
local0.* /var/log/webapp.log
# Network device logs
local4.* /var/log/network.log
# Forward only critical events to a remote SIEM
*.crit @siem.example.com:514
Configuring facility-based routing in syslog-ng
# Define filters
filter f_auth { facility(auth, authpriv); };
filter f_local { facility(local0, local1, local2); };
filter f_network { facility(local4, local5); };
# Define destinations
destination d_auth { file("/var/log/auth.log"); };
destination d_local { file("/var/log/applications.log"); };
destination d_remote { udp("192.168.1.100" port(514)); };
# Route logs
log { source(s_src); filter(f_auth); destination(d_auth); };
log { source(s_src); filter(f_local); destination(d_local); };
log { source(s_src); filter(f_network); destination(d_remote); };
Remote facility forwarding example
# Forward only local7 logs to a remote syslog server
local7.* @192.168.1.20:514
By leveraging facility-based routing, teams can isolate logs based on their origin, minimize unnecessary data ingestion, and streamline centralized monitoring and alerting workflows.
How to choose the right syslog facility
Selecting the correct syslog facility ensures cleaner log organization, predictable routing, and easier analysis across centralized monitoring tools. A clear facility strategy avoids overlap, reduces noise, and keeps operations and security teams aligned.
Follow these recommended practices when assigning facilities:
- Use standard facilities (0–15) for OS-level and built-in system services.
- Reserve local0–local7 for custom applications, network devices, and proprietary tools.
- Avoid overlapping facility usage between unrelated systems to keep log streams distinct.
- Document all facility mappings so teams have a consistent reference for configuration and audits.
Example: Internal facility mapping policy
A simple, consistent mapping policy helps teams standardize facility usage across applications and services.
| Facility | Purpose |
|---|---|
| local0 | Frontend application logs |
| local1 | Backend service logs |
| local4 | Network devices (routers, switches) |
| local6 | Security scanners and monitoring tools |
A mapping strategy like this ensures logs remain organized, predictable, and easy to filter or troubleshoot.
Custom facility mapping for scalable environments
In larger environments, especially with mixed Linux servers, Cisco devices, firewalls, and security tools, standardizing facility usage becomes essential. It prevents clashes and ensures logs flow into the appropriate destinations in a SIEM.
Example facility-to-destination mapping
| Facility | Purpose | Destination |
|---|---|---|
| local0 | Web applications | /var/log/web.log |
| local1 | Databases | /var/log/db.log |
| local2 | Security events | /var/log/security.log |
| local4 | Firewalls | @syslog-server:514 |
Centralized mapping ensures that logs from similar sources are consistently grouped, facilitating troubleshooting, monitoring, and compliance reporting.
Best practices for routing and mapping
- Leverage severity levels with facilities: Route only critical or error messages to alerting systems, while informational logs can remain in standard files.
- Segment by function or service: Separate logs for web applications, databases, network devices, and security systems.
- Use remote syslog servers for high-volume sources: Facilities like local4–local7 are ideal for network and security device logs.
- Document changes: Maintain an internal reference for facility usage to prevent conflicts and simplify onboarding.
- Audit regularly: Periodically review facility mappings to ensure they align with evolving infrastructure.
By implementing facility-based filtering and consistent custom facility mappings, organizations can achieve structured, noise-free, and scalable log management, supporting efficient troubleshooting, monitoring, and security analytics in centralized systems like EventLog Analyzer.
Troubleshooting common facility issues
Even with well-designed logging infrastructure, issues with facility-based logs can occur. Identifying and resolving these ensures continuous visibility and reliable log management.
1. Missing facility data
Symptoms:
- Expected logs are not appearing in EventLog Analyzer or a syslog server.
- Incomplete coverage for specific facilities.
- Gaps in log timelines for certain systems.
Solutions:
# Test local facility configuration
logger -p local0.info "Test message"
# Verify rsyslog routing
grep "local0" /etc/rsyslog.conf
# Confirm network forwarding
tcpdump -i any port 514 and host <siem-ip>
2. Facility misclassification
Symptoms:
- Logs appear in incorrect categories.
- Alerts fail to trigger for expected conditions.
Solutions:
- Standardize facility assignments across devices.
- Document and enforce organizational facility mapping policies.
- Regularly audit mappings to prevent misclassification.
- Use consistent local facility mapping (e.g., always local4 for Cisco devices)
3. Performance Issues
Symptoms:
- High load from specific facilities.
- Log processing delays or resource contention.
- Disk I/O bottlenecks from concentrated logging
Solutions:
# Global rate limiting parameters
global(
ratelimit.interval="10" # Time window in seconds
ratelimit.burst="200" # Max messages per interval
)
# Facility-specific load distribution
if $syslogfacility-text == 'local0' or $syslogfacility-text == 'local1' then {
action(type="omfile" file="/var/log/apps.log")
}
- Separate high-volume facilities into dedicated log files to avoid bottlenecks.
- Use disk-assisted queues for resource-intensive facilities: queue.type="linkedList"
- Implement asynchronous writing for better I/O performance: asyncWriting="on"
- Monitor facility-specific volume trends in EventLog Analyzer dashboards
- Consider deploying dedicated collectors for high-volume facilities
Advanced: Syslog facility management
Syslog facility management ensures that log messages are organized based on their source, allowing cleaner separation of system, security, and application data. By properly assigning, routing, and securing facilities, organizations achieve clearer visibility, better compliance, and more efficient log analysis.
Facility management life cycle
A structured facility management life cycle ensures consistent, compliant, and secure handling of syslog data across environments.
- Planning: Identify operational, security, and compliance requirements; estimate log volume by facility; define naming conventions and mapping guidelines for custom applications.
- Implementation: Apply consistent configurations, document assignments, test routing and filtering.
- Operations: Monitor usage, storage patterns, audit facility mappings, optimize performance, and enforce security controls.
- Maintenance: Review and update facility standards, directories, retention, and routing policies regularly.
Security considerations for facility management
Syslog facilities often carry sensitive authentication and system data, making it essential to apply strong security controls to prevent unauthorized access and maintain compliance.
- Facility-based access control: Restrict sensitive facilities, especially authpriv, using role-based access and secure file permissions.
Example (rsyslog):
$FileCreateMode 0640
authpriv.* /var/log/secure.log
$template SecureAuth,"/var/log/secure/%HOSTNAME%/auth.log"
authpriv.* ?SecureAuth
*.info;authpriv.none -/var/log/messages
- Encryption and secure transmission: Use TLS to prevent interception or manipulation of logs in transit.
Example:
$DefaultNetstreamDriver gtls
$DefaultNetstreamDriverCAFile /etc/ssl/ca.crt
$ActionSendStreamDriverMode 1
$ActionSendStreamDriverAuthMode x509/name
local4.* @@(o)logserver.example.com:6514;RSYSLOG_SyslogProtocol23Format
- Compliance and retention policies: Define retention by regulation and facility type.
| Regulation | Relevant facilities | Retention |
|---|---|---|
| PCI DSS | authpriv, local6, local7 | 1 year |
| HIPAA | authpriv, local0, local1 | 6 years |
| SOX | authpriv, daemon, cron | 7 years |
- Monitoring and alerts: Use log management platforms like EventLog Analyzer to detect anomalies by facility, monitor sensitive streams, and trigger real-time alerts.
By securing access, encrypting transmissions, and aligning retention with regulatory requirements, organizations can protect the integrity and confidentiality of facility-based logs while ensuring they meet compliance obligations.
Best practices for syslog facility management
Effective syslog facility management helps maintain clarity and structure in log collection, ensuring that messages are properly categorized, prioritized, and routed for analysis.
- Map applications to appropriate facilities: Use local0–local7 for custom applications to avoid mixing with system logs.
- Use severity levels wisely: Ensure critical messages are correctly flagged as error, crit, or alert.
- Centralize log collection: Forward facility-based logs to a central server or SIEM for correlation and analysis.
- Implement routing and filtering: Configure syslog to direct facility-specific messages to relevant files or monitoring systems.
- Regularly review logs: Audit logs by facility to ensure nothing critical is missed and reduce unnecessary log noise.
- Integrate with monitoring tools: Tools like EventLog Analyzer can leverage facilities to create alerts, reports, and compliance dashboards for precise monitoring.
By following these best practices, teams can streamline log organization, strengthen security visibility, and ensure that facility-based data is fully leveraged through monitoring platforms like EventLog Analyzer.
Syslog facility management checklist
Structured checklists help ensure comprehensive facility management across implementation and operational phases. The following implementation checklist help teams verify all aspects of facility-based logging are properly addressed and maintained over time.
Implementation checklist
- Define organizational facility standards to ensure consistency.
- Document facility-to-application mapping for reference and training.
- Configure facility-based routing rules for proper log organization.
- Implement facility-specific retention policies based on importance.
- Set up facility monitoring and alerting for operational awareness.
- Test facility routing and parsing to validate configuration.
- Train operations team on facility usage and interpretation.
- Establish facility audit procedures for ongoing compliance.
From initial standards definition through training and audit procedures, these steps ensure comprehensive implementation that supports both operational and compliance needs.
Maintenance checklist
- Monthly facility usage review to identify trends and issues.
- Quarterly facility mapping validation to ensure consistency.
- Annual facility standards update to reflect environmental changes.
- Regular facility performance optimization based on usage patterns.
- Compliance requirement alignment check to maintain adherence.
The maintenance checklist provides a framework for ongoing facility management beyond initial implementation. Regular reviews, validation, and optimization ensure that logging practices remain effective as the IT environment evolves and new requirements emerge.
Leverage syslog facilities in EventLog Analyzer
Syslog facilities provide the foundational structure needed to organize, route, and prioritize messages from diverse systems. When paired with a comprehensive log management solution like EventLog Analyzer, these facilities become powerful metadata that enhance visibility, streamline analysis, and elevate security operations.
How EventLog Analyzer uses facility intelligence
EventLog Analyzer functions as a facility-aware syslog server that receives messages from Unix/Linux hosts, firewalls, routers, switches, IDS/IPS systems, and custom applications. As syslog messages arrive, the solution automatically interprets the facility field, such as authpriv, daemon, mail, or local0–local7, and uses it to categorize and correlate events with greater accuracy.
What facility-level intelligence enables
- Facility-based filtering and dashboards: Group events by their origin (e.g., authentication, mail, network devices, applications) and visualize patterns instantly.
- Precision alerts (facility plus severity): Trigger targeted alerts for conditions like repeated authentication failures (e.g., authpriv.err) or critical firewall issues.
- Cross-source incident correlation: Combine facility-aware syslogs with Windows, application, and cloud logs to identify multi-stage attacks.
- Compliance-ready reporting: Simplify PCI DSS, HIPAA, GDPR, and SOX audits by automatically segmenting logs based on facility categories tied to authentication, network security, access, and system activity.
- Noise reduction and scalability: Filter out low-priority messages (e.g., debug, info) while focusing on facilities generating high-value security data.
EventLog Analyzer's ability to understand and use syslog facilities transforms it into a high-precision syslog server, delivering deeper visibility, faster incident detection, and smarter compliance management.
Frequently asked questions
A syslog facility indicates the source of the log message (e.g., authpriv, local4), while the syslog severity indicates how critical the event is (e.g., info, err, crit). Together, they provide complete context for monitoring and alerting.
Local facilities are reserved for custom applications or vendor-specific logs. Follow organizational standards consistently. For example, local0 for web applications, local4 for network devices, and local6 for security tools to avoid overlap and simplify analysis.
Yes. EventLog Analyzer uses facility-aware parsing to detect relationships between events from different facilities, enabling multi-stage incident detection and comprehensive security monitoring.
Implement tiered retention based on facility importance: security facilities (e.g., authpriv, local6) for more than one year, application facilities (e.g., local0, local1) for three to 12 months, and debug or verbose facilities for one to 30 days to manage storage efficiently.
Track metrics like message volume, severity distribution, facility growth trends, and anomalies. EventLog Analyzer dashboards provide real-time visibility and alerts, ensuring reliable log collection and proactive issue detection.
Take control of your syslogs with EventLog Analyzer
Maximize the value of your syslog data by leveraging facility-level intelligence. With EventLog Analyzer, you can organize logs by source, filter critical events, set up precision alerts, and generate compliance-ready reports—all from a centralized platform.










