Add fleet configuration files

Add files to a fleet configuration

Many types of files can be added to fleet configurations, including:

  • Parsers

  • Includes

  • Lua scripts

  • Authentication tokens

Files of a reasonable size and with a name consisting of alphanumeric characters and dots can be added as fleet files. There is no restriction in place based on content.

To add files to a fleet, use the create fleet_file command:

calyptia create fleet_file --fleet {FLEET_NAME} --file {FILENAME}

Adding a file to a fleet causes a new version of the configuration to download on each Calyptia Core Agent using the previous file, in a way that is directly accessible to the Calyptia Core Agent as if it were in the same directory.

For example, to add a parser file to a fleet configuration:

$ 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

Last updated