Configuration Commands

Use these M4500 CLI commands to enable the Fluentd service and configure sources, tags, match patterns, and forwarding to syslog, WebHDFS, or Elasticsearch.

fluentd

This command enables or disables FluentD service.

Default Disabled
Format

fluentd

no fluentd

Mode Global Config

fluentd <fluentd-entry>

This command creates or deletes FluentD entry.

Default None
Format

fluentd <fluentd-entry>

no fluentd <fluentd-entry>

Mode Global Config
Fields Definition
<fluentd-entry> The fluentd entry name (up to 31 alphanumeric characters).

enable

This command enables FluentD entry.

Default Disabled
Format

enable

no enable

Mode Fluentd Configuration

sourcetag

This command configures the tag of the FluentD source.

Default None
Format

sourcetag <tag> type {syslog | localsyslog | dstat | exec}

no sourcetag <tag>

Mode Fluentd Configuration
Fields Definition
<tag> The sourcetag (up to 31 alphanumeric characters).

syslog

This command configures syslog settings.

Default

Port: 5140

Bind: 0.0.0.0 (all address)

Protocol-type: udp

Format

[enable | advance [port <1-65534> | bind <bind> | protocol-type {tcp | udp}]]

no enable

Mode Syslog configuration
Fields Definition
<1-65534> The port to listen to.
<bind> The bind address to listen to.

localsyslog

This command configures localsyslog settings.

Default Severity: 5
Format

[enable | severity <0-7>]

no enable

Mode Localsyslog configuration
Fields Definition
<0-7> The logging severity level.

dstat

This command configures dstat settings.

Default

Option: -fcdnm

Delay: 1

Format

[enable | advance [option <option> | delay <1-86400>]

no enable

Mode Dstat configuration
Fields Definition
<option> The dstat option.
<1-86400> The delay time (seconds).

exec

This command configures exec settings.

Default

Time-key: current time

Time-format: %Y-%m-%d %H:%M:%S

Format

enable | command <command> | format {tsv <keys> | json | msgpack} | advance {tag-key <tag-key>| time-key <time-key> [<time-format>] | run-interval <run-interval>}

no enable

Mode Exec configuration
Fields Definition
<command> The command (program) to execute.
<keys> The comma-separated (,) keys parameter (contains alphanumeric characters, dots (.), dashes (-), and underscores (_)).
<tag- key> The key to use as the event tag instead of the value in the event record (up to 31 alphanumeric characters including “.“).
<time-key> The key to use as the event time instead of the value in the event record.
<time-format> The format of the event time used for the time_key parameter.
<run-interval> The interval time between periodic program runs (the value in the range <1 - 60>, and suffix s (seconds), m (minutes), or h (hours)).

matchpattern

This command configures fluentd match.

Default None
Format

matchpattern <pattern> type {forward | webhdfs | elasticsearch}

no matchpattern <pattern>

Mode Fluentd configuration
Fields Definition
<pattern> The pattern (up to 31 alphanumeric characters).

forward

This command configures forward settings.

Default

Port: 24224

Send-timeout: 60s

Heartbeat-type: udp

Heartbeat-interval: 1s

Phi-threshold: 16

Buffer-type: memory

Buffer-queue-limit: 16

Buffer-chunk-limit: 8m

Flush-interval: 60s

Format server {ipv4 <ipaddr> | hostname <hostname>} [<1-65535>] | advance{send-timeout <send-timeout> | heartbeat-type {tcp | udp} | heartbeat-interval <heartbeat-interval> | phi-failure-detector {disable | enable} | phi-threshold <1-60> | buffer {buffer-type {memory | file <buffer-path>} | buffer-queue-limit <1-16> | buffer-chunk-limit <chunk> | flush-interval <flush-interval>}}
Mode Forward configuration
Fields Definition
<ipaddr> The ipv4 address of server.
<hostname> The host name of server.
<1-65535> The host port number.
<send-timeout> The timeout time when sending event logs (the value in the range <1 - 60>, and suffix s(seconds), m(minutes), or h(hours)).
<heartbeat-interval> The interval of the heartbeat packer (the value in the range <1 - 60>, and suffix s(seconds), m(minutes), or h(hours)).
<1-60> The interval time between periodic program runs (the value in the range <1 - 60>, and suffix s (seconds), m (minutes), or h (hours)).
<buffer-path> The path where buffer chunks are stored.
<1-16> The length limit of the chunk queue.
<chunk> The size of each buffer chunk (the value in the range <1 - 8>, and suffix k(KB) or m(MB)).
<flush-interval> The interval between data flushes (the value in the range <1 - 60>, and suffix s(seconds), m(minutes), or h(hours)).

webhdfs

This command configures webhdfs settings.

Default

Localtime: enable

Buffer-type: memory

Buffer-queue-limit: 16

Buffer-chunk-limit: 8m

Flush-interval: 60s

Format host-name <host name> | port <1-65535> | path <path> | advance {buffer [buffer-type {memory | file <buffer-path>}] | buffer-queue-limit <1-16> | buffer-chunk-limit <chunk> | flush-interval <flush-interval>}| localtime {disable | enable}
Mode Webhdfs configuration
Fields Definition
<host> The namenode hostname.
<1-65535> The namenode port number.
<path> The path on HDFS.
<buffer-path> The path where buffer chunks are stored.
<1-16> The length limit of the chunk queue.
<chunk> The size of each buffer chunk (the value in the range <1 - 8>, and suffix k(KB) or m(MB)).
<flush-interval> The interval between data flushes (the value in the range <1 - 60>, and suffix s(seconds), m(minutes), or h(hours)).

elasticsearch

This command configures elasticsearch settings.

Default

Port: 9200

Logstash-format: disable

Prefix: logstash

Utc-index: enable

Index-name: fluentd

Type-name: fluentd

Tag-key: tag

Request-timeout: 5s

Reload-connections: enable

Reload-on-failure: disable

Buffer-type: memory

Buffer-queue-limit: 16

Buffer-chunk-limit: 8m

Flush-interval: 60s

Format host {ipv4 <ipaddr> | hostname <hostname>} [<1-65535>] | hosts <host:port> | user <user> <password> <path> | advance {logstash-format {disable | enable <prefix>} | scheme <scheme> | utc-index {disable | enable} | index-name <index-name> | type-name <type-name> | request-timeout <request-timeout> | reload-connections {disable | enable} | reload-on-failure {disable | enable} | buffer {buffer-type {memory | file <buffer-path>} | buffer-queue-limit <1-16> | buffer-chunk-limit <chunk> | flush-interval <flush-interval>}}
Fields Definition
<ipaddr> The ipv4 address of server.
<hostname> The host name of server.
<1-65535> The host port number.
<host:port> Multiple elasticsearch hosts with separator ",".
<user> The elasticsearch cluster host user info.
<password> The elasticsearch cluster host user password.
<path> The elasticsearch cluster host path.
<prefix> The logstash-prefix (up to 31 alphanumeric characters).
<index-name> Store in a document the index it belongs to (up to 31 alphanumeric characters).
<type-name> Each type has a list of fields that can be specified for documents of that type (up to 31 alphanumeric characters).
<tag-key> The tag-key (up to 31 alphanumeric characters, include dashes(-), and underscores(_)).
<request-timeout> HTTP request timeout (the value in the range <1 - 60>, and suffix s(seconds), m(minutes), or h(hours)).
<buffer-path> The path where buffer chunks are stored.
<1-16> The length limit of the chunk queue.
<chunk> The size of each buffer chunk (the value in the range <1 - 8>, and suffix k(KB) or m(MB)).
<flush-interval> The interval between data flushes (the value in the range <1 - 60>, and suffix s(seconds), m(minutes), or h(hours)).

Mode Elasticsearch configuration