---
title: "redis: Store name-value pairs in Redis"
url: "https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-redis/"
last_modified: "2026-08-02T11:39:11+02:00"
---

> For the complete documentation index, see [llms.txt](https://axoflow.com/docs/axosyslog-core/4.28/llms.txt).

# redis: Store name-value pairs in Redis

The `redis()` driver sends messages as name-value pairs to a [Redis](https://redis.io/) key-value store.

For the list of available parameters, see [redis() destination options](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-redis/reference-destination-redis/index.md).

## Prerequisites

This feature requires a separate module. Install the `axosyslog-mod-redis` package on [Debian/Ubuntu](https://axoflow.com/docs/axosyslog-core/4.28/install/debian-ubuntu/index.md), or the `axosyslog-redis` package on [RHEL and compatible distributions](https://axoflow.com/docs/axosyslog-core/4.28/install/rhel-fedora-almalinux/index.md). If the module isn’t installed, AxoSyslog fails to start with an [`unexpected LL_IDENTIFIER` error](https://axoflow.com/docs/axosyslog-core/4.28/chapter-troubleshooting-syslog-ng/unexpected-ll-identifier/index.md).

## Declaration:

```shell
   redis(
        host("<redis-server-address>")
        port("<redis-server-port>")
        auth("<redis-server-password>") # Optional, for password-protected servers
        command("<redis-command>", "<first-command-parameter>", "<second-command-parameter>", "<third-command-parameter>")
    );
```

## Example: Using the redis() driver

The following destination counts the number of log messages received per host.

```shell
   destination d_redis {
        redis(
            host("localhost")
            port(6379)
            command("HINCRBY", "hosts", "$HOST", "1")
        );
    };
```

The following example creates a statistic from Apache webserver logs about the browsers that the visitors use (per minute)

```shell
   @version: 4.28

    source s_apache {
        file("/var/log/apache2/access.log");
    };

    parser p_apache {
        csv-parser(columns("APACHE.CLIENT_IP", "APACHE.IDENT_NAME", "APACHE.USER_NAME",
                        "APACHE.TIMESTAMP", "APACHE.REQUEST_URL", "APACHE.REQUEST_STATUS",
                        "APACHE.CONTENT_LENGTH", "APACHE.REFERER", "APACHE.USER_AGENT",
                        "APACHE.PROCESS_TIME", "APACHE.SERVER_NAME")
                    flags(escape-double-char,strip-whitespace)
        delimiters(" ")
        quote-pairs('""[]')
        );
    };

    destination d_redis {
        redis( command("HINCRBY" "${MONTH_ABBREV} ${DAY} ${HOUR}:${MIN}"  "${APACHE.USER_AGENT}" "1"));
    };

    log {
        source(s_apache);
        parser(p_apache);
        destination(d_redis);
    };
```

---

[Batch mode and load balancing](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-redis/destination-redis-batch/index.md)

[redis() destination options](https://axoflow.com/docs/axosyslog-core/4.28/chapter-destinations/configuring-destinations-redis/reference-destination-redis/index.md)

Last modified August 2, 2026: [Adds required modules/packages to install and destination pages (553d6d9b)](https://github.com/axoflow/axosyslog-core-docs/commit/553d6d9be9a0e3ef444e62cc5351dd2ac764f01d)
