Add fleet configuration files
Add fleet configuration files
You can add a variety of configuration files to a fleet, including parsers, Lua scripts, and authentication tokens. After you add a file to a fleet, every agent in that fleet updates its configuration settings and downloads the new file.
To add files to a fleet through Pipeline CLI, run the following command:
calyptia create fleet_file --fleet NAME --file FILE
Replace the following:
NAME
: The name of the fleet to which your file will be added.FILE
: The name of the Fluent Bit or Core Agent configuration file to add to your fleet.
For example, to add a parser file to a fleet:
$ cat << EOF > fluent-bit.conf
[SERVICE]
# The file parsers.conf will be accessible as if it were in the
# current directory of fluent-bit. These files can be referenced
# from any place in the configuration.
Parsers_File parsers.conf
[INPUT]
Name syslog
Parser syslog-rfc3164-local
[OUTPUT]
Name stdout
Match *
EOF
$ cat << EOF > parsers.conf
[PARSER]
Name syslog-rfc3164-local
Format regex
Regex ^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$
Time_Key time
Time_Format %b %d %H:%M:%S
Time_Keep On
EOF
$ calyptia create fleet --name fleet-parsers --config-file fluent-bit.conf
$ calyptia create fleet_file --fleet fleet-parsers --file parsers.conf