Configure syslog forwarding or alerts

TanOS supports syslog forwarding, which sends all Appliance log messages to a remote syslog server, and alerting, which sends Appliance alerts to a syslog server, an SMTP email recipient, or both.

Note: Severity level is a global setting that applies to both Syslog and SMTP alerts.

Syslog alerts versus forwarding

The syslog forwarding configuration under Appliance Configuration is separate from the syslog alert configuration in the Appliance Maintenance menu. Note these key differences:

  • Syslog configuration for alerts sends events that match the specified alert threshold severity (info, warn, and error).

  • Syslog forwarding configuration sends all messages located in /var/log/messages to a syslog destination.

Check the syslog status

The syslog status shows the last five log entries and the current syslog forwarding configuration.

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter A-4 (Appliance Configuration > Syslog Configuration).
  3. Enter 1 to view the status.
    CODE
    ------------------------------------------------------
    
    >>> Appliance Configuration -> Syslog Configuration -> Check Status <<< 
    
     Checking existing syslog configuration
    
     ###
     Found TanOS syslog configuration with destination logfile Kernel
    
     Current size of /var/log/tanos :76924
    
     Last 5 entries in /var/log/tanos:
    2020-05-22T14:00:01.756970+00:00 appliance-160 TanOS_Shell: privileged_support_health_check.sh: 
    DEBUG called by root -b
    2020-05-22T14:15:01.908001+00:00 appliance-160 TanOS_Shell: privileged_support_health_check.sh: 
    DEBUG called by root -b
    2020-05-22T14:30:01.962601+00:00 appliance-160 TanOS_Shell: privileged_support_health_check.sh: 
    DEBUG called by root -b
    2020-05-22T14:31:19.706181+00:00 appliance-160 TanOS_Shell: privileged_appliance_configuration_
    ntp.sh: DEBUG called by tanadmin
    2020-05-22T14:33:36.632542+00:00 appliance-160 TanOS_Shell: privileged_appliance_sub_configurat
    ion_syslog.sh: DEBUG called by tanadmin
    
     ###
     No existing TanOS syslog forwarding configuration found
    
     Press enter to continue

Configure syslog forwarding

Access the syslog configuration menu

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter A-4 (Appliance Configuration > Syslog Configuration).

Manage the syslog server trust certificate

If you use a trust certificate for TLS communication with your syslog server, import the certificate before you enable and configure server settings for syslog forwarding.

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter A-4 (Appliance Configuration > Syslog Configuration).
  3. From the Syslog Configuration menu:
    • Enter 2 to view the previously imported trust certificate.
    • Enter 3 to paste the trust certificate in PEM format for import.
    • Enter 4 to remove the previously imported trust certificate.

Manage the key pair for certificate authentication

If you use certificate authentication with your syslog server, add the necessary public-private key pair before you enable and configure server settings for syslog forwarding.

A key pair is required only for destinations that use TLS Auth, which authenticates this Appliance to the syslog server. A TLS destination with TLS Auth disabled needs only the syslog server trust certificate.

Import a key pair

  1. Use SFTP to copy the key file to the /incoming directory of the Tanium Server Appliance.
  2. Sign in to the TanOS console as a user with the tanadmin role.
  3. Enter A-4-8 (Appliance Configuration > Syslog Configuration > Load Key Pair for TLS Auth from SFTP incoming).

View or remove the previously imported key pair

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter A-4 (Appliance Configuration > Syslog Configuration).
  3. From the Syslog Configuration menu:
    • Enter 7 to view the key pair.
    • Enter 9 to remove the key pair.

Configure syslog forwarding destinations

Syslog forwarding sends the same data that gets logged in /var/log/messages to each configured destination. TanOS supports multiple syslog forwarding destinations. If no destinations are configured, syslog forwarding is disabled.

Note:
  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter A-4-5 (Appliance Configuration > Syslog Configuration > Configure Forwarding).
    CODE
    ------------------------------------------------------
    
    >>> Appliance Configuration -> Syslog Configuration -> Configure Forwarding <<< 
    
    TLS certificate: No
    TLS key pair: No
    
      1: 10.10.10.10  tcp  514
    
      A: Add syslog destination
    
      R: Return to previous menu  RR: Return to top
    
    ------------------------------------------------------
    
     TanOS Version: 1.9.1 
    
     Please select:
  3. Manage forwarding destinations:
    • Add a destination: Enter A to open the Add Destination menu.

      CODE
      ------------------------------------------------------
      
      >>> Add Destination <<< 
      
                       Current    Pending
      Host             -
      Protocol         -
      ├─Port           -
      ├─TLS Auth       n/a        n/a
      └─TCP Framing    n/a        n/a
      RFC 5424         no         no
      
           Configure Syslog Destination Settings
        H: Hostname
        P: Protocol
      
        O: Port Number
        T: [DISABLED] TLS Auth
        F: [DISABLED] TCP Framing (Octet-Counted)
        C: RFC 5424 Output Format
      
        S: Save Entry
      
        R: Return to previous menu  RR: Return to top
      
      ------------------------------------------------------
      
       TanOS Version: 1.9.1 

      Use the menu options to configure the settings for the remote syslog server and then enter S to save the destination.

    • Edit a destination: Enter the line number of the destination to open the Edit Destination menu.

      CODE
      ------------------------------------------------------
      
      >>> Edit Destination <<< 
      
                       Current                    Pending
      Host             10.10.10.10                10.10.10.10
      Protocol         tcp                        tcp
      ├─Port           514                        514
      ├─TLS Auth       n/a                        n/a
      └─TCP Framing    yes                        yes
      RFC 5424         no                         no
      
           Configure Syslog Destination Settings
        H: Hostname
        P: Protocol
      
        O: Port Number
        T: [DISABLED] TLS Auth
        F: TCP Framing (Octet-Counted)
        C: RFC 5424 Output Format
      
        S: Save Entry
        X: Delete Entry
      
        R: Return to previous menu  RR: Return to top
      
      ------------------------------------------------------
      
       TanOS Version: 1.9.1 

      Modify the settings and enter S to save.

    • Delete a destination: Enter the line number of the destination to open the Edit Destination menu and then enter X to delete the entry.

(Optional) Force the full FQDN to appear in syslog messages

By default, the internal syslog server determines whether the fully qualified domain name (FQDN) or only the host name appears in syslog messages. You can optionally force the FQDN to always appear.

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter A-4-10 (Appliance Configuration > Syslog Configuration > Configure FQDN Behavior).
  3. Enter E to enable the setting and force the FQDN to always appear in syslog messages, or D to disable the setting and allow the internal server to decide whether the FQDN or only the host name should appear in syslog messages.

(Optional) Forward entries from other log files

You can forward entries to the configured syslog destination from other logs, including any custom logs you have created. You can associate a tag with each selected log file to identify the forwarded entries from that log.

Tip: For information about creating a custom log, see Tanium Core Platform troubleshooting and logs in an Appliance deployment.

You can forward logs only from the following directories on the Appliance:

  • /var/log

  • /opt/Tanium/TaniumServer/Logs

  • /opt/Tanium/TaniumServer/TDL_Logs

  • /opt/Tanium/TaniumModuleServer/Logs

  • /opt/Tanium/TaniumModuleServer/TDL_Logs

  • /opt/Tanium/TaniumZoneServer/Logs

  • /opt/Tanium/TaniumModuleServer/services/*-files/logs

For more information about available logs, see Overview of Tanium Appliance logs, reports, and troubleshooting features.

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter A-4-6 (Appliance Configuration > Syslog Configuration > Custom File Forwarding).
  3. Use the following options to manage the forwarded log files:
    • Add a log file: Enter A to add a line, and then follow the prompts to specify the path and file name of a log file to forward and a tag to apply to forwarded entries from that log.

      CODE
      ------------------------------------------------------
      
      >>> Custom File Forwarding <<< 
      
      List files (one file per line) to forward out to syslog
        1: /opt/Tanium/TaniumServer/Logs/log0.txt TS-log0
        2: /opt/Tanium/TaniumZoneServer/Logs/log0.txt TZS-log0
      
        A: Add a line
        X: Remove the file
      
        R: Return to previous menu  RR: Return to top
      
      --------------------------------------------------------------------------------
      
      Please select: a
      Enter the filename: /var/log/secure
      Enter the tag: secure
    • Edit the file name and tag for a previously entered log file: Enter the line number of the log file to edit, enter E to edit the line, and then follow the prompts to edit the path and file name and tag.

    • Remove a log file from the list: Enter the line number of the log file to edit, enter X to delete the line.

    • Remove all log files from the list: Enter X.

Configure syslog alerts

You can send Appliance alerts to a syslog server, an SMTP email recipient, or both. Syslog servers and SMTP are independent alerting destinations and receive the same alerts.

Tip: If you configure both a syslog destination and an SMTP destination, the SMTP destination provides an additional benefit: if TanOS cannot deliver alerts to the syslog destination, it sends a failure notification to the SMTP destination every 15 minutes until the issue is resolved.

Enable or disable all alerts

The Global alert status setting controls whether TanOS sends alerts to any destination. When global alerts are disabled, TanOS sends no alerts to the syslog destination or the SMTP destination, however those destinations are configured.

Important: On TanOS 1.9.0 or earlier, disabling global alerts suppressed only syslog alerts, and TanOS continued to send SMTP alerts. If you rely on SMTP alerts and global alerts are disabled, enable global alerts after you upgrade.
  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter B-2-3 (Appliance Maintenance > Alerting > Configure Alerts).
  3. Enter 1 to enable or disable global alerts. The menu updates to show the current Global alert status.

Set the alert severity level

Use the Configure Alerts menu to set the alert severity threshold to info, warn, or error.

  • Info: Includes all alerts

  • Warn: Includes all error and warning alerts

  • Error: Includes error alerts

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter B-2-3 (Appliance Maintenance > Alerting > Configure Alerts).
  3. Use the menu to set a severity level and enable/disable alerting.

Configure a syslog server destination for alerts

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter B-2-1 (Appliance Maintenance > Alerting > Configure Syslog Destination).
  3. Enter 2 and follow the prompts to configure a syslog destination.
    CODE
    >>> Appliance Maintenance -> Alerting -> Configure Syslog Destination <<< 
    
    Please enter the destination host: 10.10.10.10
    Please enter the destination port: 514
    Please enter the destination protocol [tcp/udp]: udp
    
    Alert syslog destination updated.
  4. Enter 1 to enable syslog alerts. The Configure Syslog Destination menu updates to show the current status.
    CODE
    >>> Appliance Maintenance -> Alerting -> Configure Syslog Destination <<< 
    
    Current destination status: Enabled 
    Current server address: 10.10.10.10
    Current server port: 514
    Current server protocol: udp
    
             1: Enable/Disable syslog alerts
             2: Edit Syslog Destination
             3: Send Syslog Test Alert
    
             R: Return to previous menu  RR: Return to top
    
    ------------------------------------------------------
  5. Enter 3 to send a test alert to the syslog server.

The test alert appears in the syslog server logs.

Figure 1. Test alert in the syslog server logs
syslog_alerts_test

Configure an SMTP destination for alerts

  1. Sign in to the TanOS console as a user with the tanadmin role.
  2. Enter B-2-2 (Appliance Maintenance > Alerting > Configure SMTP Destination).
  3. Enter 2 and follow the prompts to configure the SMTP destination.
    CODE
    >>> Appliance Maintenance -> Alerting -> Configure SMTP Destination <<< 
    
    Please enter the SMTP host: 10.10.10.10
    Please enter the destination port: 25
    Please enter the recipient email address: admin@tam.local
    
    Alert SMTP destination updated.
  4. Enter 1 to enable SMTP alerts. The Configure SMTP Destination menu updates to show the current status.
    CODE
    >>> Appliance Maintenance -> Alerting -> Configure SMTP Destination <<< 
    
    Current destination status: Enabled 
    Current server address: 10.10.10.10
    Current server port: 25
    Current recipient address: admin@tam.local 
    
             1: Enable/Disable SMTP alerts
             2: Edit SMTP Destination
             3: Send SMTP Test Alert
    
             R: Return to previous menu  RR: Return to top
    
    ------------------------------------------------------
  5. Enter 3 to send a test alert to the mail recipient.