home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Configuring rate limiting for syslog logging

You can use the following commands to enable and configure rate limiting for syslog logging. These commands let you set the burst count, which specifies the maximum number of messages that a process can log during a logging interval, and the logging interval.

Enabling and disabling rate limiting

To enable rate limiting for syslog logging, you must configure the burst count, logging interval, or both.

If you configure only the burst count, the logging interval is 5 seconds (default). For example, if you set the burst count to 300, a process can log up to 300 messages every 5 seconds. The system discards extra messages and adds a syslog entry to that effect.

If you configure only the logging interval, the burst count is 200 (default). For example, if you set the interval to 20 seconds, a process can log up to 200 messages every 20 seconds. The system discards extra messages and adds a syslog entry to that effect.

If you configure the logging interval and burst count, the system enforces the configured limits. For example, if you set the burst count to 250 and the logging interval to 10 seconds, a process can log up to 250 messages every 10 seconds. The system discards extra messages and adds a syslog entry to that effect.

The system enforces syslog rate limiting on a single-process basis. For example, if the burst count is 200 and the logging interval is 10 seconds, each process running on the system can log up to 200 messages during the 10-second interval.

To disable rate limiting, use the delete system syslog rate-limit command. When rate limiting is disabled, there are no limits on the number of messages that a process can log.

Configuring the burst count

To limit the number of messages that a process can log during an interval to 250, perform the following steps in configuration mode.

Table 1. Configuring the burst count
Step Command
Set the burst count.
vyatta@vyatta# set system syslog rate-limit burst 250
Commit the configuration.
vyatta@vyatta# commit
Verify the configuration.
vyatta@vyatta# show system syslog rate-limit 
 rate-limit {
        burst 250
 }

Configuring the logging interval

To set the logging interval to 10 seconds, perform the following steps in configuration mode.

Table 2. Configuring the logging interval
Step Command
Set the logging interval.
vyatta@vyatta# set system syslog rate-limit interval 10
Commit the configuration.
vyatta@vyatta# commit
Verify the configuration.
vyatta@vyatta# show system syslog rate-limit 
 rate-limit {
        interval 10
 }

Configuring the burst count and logging interval

To set the burst count to 300 messages and logging interval to 15 seconds, perform the following steps in configuration mode.

Table 3. Configuring the burst count and logging interval
Step Command
Set the burst count.
vyatta@vyatta# set system syslog rate-limit burst 300
Set the logging interval.
vyatta@vyatta# set system syslog rate-limit interval 15
Commit the configuration.
vyatta@vyatta# commit
Verify the configuration.
vyatta@vyatta# show system syslog rate-limit 
 rate-limit {
        burst 300
        interval 15
 }