Configuring Syslog for Linux

Download this manual as a PDF file

Use the following menu options to navigate the SL1 user interface:

  • To view a pop-out list of menu options, click the menu icon ().
  • To view a page containing all of the menu options, click the Advanced menu icon ().

The following sections describe how to configure syslog for Linux:

What is Syslog?

Syslog is a protocol and utility for capturing and logging system information. This system information can be stored locally, remotely, or both. syslog allows a server to forward log messages over the network to SL1. SL1 then uses these messages to monitor the health of the server and trigger events (if necessary).

Because the syslog utility is mature and widely-used, there is an array of commercial and open source implementations. This section provides only a basic outline of how to configure syslog to send messages to SL1.

Entries in a syslog can include the following severity descriptions:

Severity Description
0 Emergency: System is unusable. A "panic" condition. Notify all technical staff. Affects multiple servers, applications, systems, or sites. For example, an outage caused by an earthquake.
1 Alert Failure in primary system. Immediate action is required. Notify appropriate staff. Example would be "loss of backup ISP connection".
2 Critical Failure in primary system. Immediate action is required before problem escalates to "alert". For example, "loss of primary ISP connection".
3 Error Non-urgent failure. Action is required but not urgent. These messages should be relayed to appropriate support staff for resolution.
4 Warning Indication that an error is about to occur. Action is required but not immediately. For example, "file system is 85% full".
5 Notice Normal but significant condition. No immediate action required. Events that are unusual but are not considered error conditions. Should be examined to spot potential problems.
6 Informational Normal operational messages. No action required. These may be harvested for reporting, measuring through-put, etc.
7 Debug Information that is useful to developers for debugging the application; not useful during operations.

Configuring Syslog for Linux

To configure your Linux server to send syslogs to SL1, you must edit the file /etc/syslog.conf.

  1. Before editing the /etc/syslog.conf file, ensure that syslog is enabled. To do this, open a shell session, log in as root, and enter the following at the command prompt:

service syslog status

  1. Backup the existing /etc/syslog.conf file. To do this, open a shell session, log in as root, and enter the following at the command prompt:

cp /etc/syslog.conf /etc/syslog.orig

  1. Use your favorite editor to edit the /etc/syslog.conf file and add the following line:
    • If you are using an All-In-One Appliance, use the IP address of the All-In-One Appliance.
    • If you are using a Distributed System and the Collector Group that will monitor your device includes a Message Collector, use the IP address of the Message Collector.
    • If you are using a Distributed System and the Collector Group that will monitor your device includes a single Data Collector that performs the message collection function, use the IP address of the Data Collector.

*.err;local0.debug;daemon.notice;mail.crit @<IP_OF_SCIENCELOGIC_APPLIANCE>

NOTE: syslog includes many facilities. The facilities referenced above are merely a starting point as suggested by ScienceLogic.

  1. After you edit the syslog.conf file, you must restart the syslog service. To do this, open a shell session and enter the following at the command prompt:

service syslog restart

  1. To test sending syslog messages to SL1, open an shell session and enter the following at the command prompt:

logger –p local0.debug "Test Debug Message to SL1"

  1. To see if the message was sent to SL1, check:
  • on the Linux device, the file /var/log/messages
  • in SL1, the device logs of the corresponding Linux device.

By default, SL1 includes multiple event policies based on syslog messages. ScienceLogic recommends that you review these policies to ensure that they suit your business needs. To view these policies, go to Registry > Events > Event Manager. Use the sort and filter tools to view all policies of type "syslog." From the same page, you can edit these event policies or create your own event policies based on syslog messages. For more information on event policies, see the section on Events.