{
    "content": [
        {
            "type": "text",
            "text": "# FAIL2BAN-REGEX(1) (man)\n\n**Summary:** fail2ban-regex - test Fail2ban \"failregex\" option\n\n**Synopsis:** fail2ban-regex [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --version | — | show program's version number and exit |\n| -h | --help | — | show this help message and exit |\n| -c | --config | — | set alternate config directory |\n| -d | --datepattern | — | set custom pattern used to match date/times --timezone=TIMEZONE, --TZ=TIMEZONE set time-zone used by convert time format |\n| -e | --encoding | — | File encoding. Default: system locale |\n| -r | --raw | — | Raw hosts, don't resolve dns --usedns=USEDNS DNS specified replacement of tags <HOST> in regexp ('yes' - matches all for |\n| -L | --maxlines | — | maxlines for multi-line regex. |\n| -m | --journalmatch | — | journalctl style matches overriding filter file. \"systemd-journal\" only |\n| -l | --log-level | — | Log level for the Fail2Ban logger to use |\n| -V | — | — |  |\n| -v | --verbose | — | Increase verbosity --verbosity=VERBOSE Set numerical level of verbosity (0..4) --verbose-date, --VD Verbose date pattern |\n| -D | --debuggex | — | Produce debuggex.com urls for debugging there |\n| — | --no-check-all | — | Disable check for all regex's |\n| -o | --out | — | Set token to print failure information only (row, id, ip, msg, host, ip4, ip6, dns, matches, ...) |\n| — | --print-no-missed | — | Do not print any missed lines |\n| — | --print-no-ignored | — | Do not print any ignored lines |\n| — | --print-all-matched | — | Print all matched lines |\n| — | --print-all-missed | — | Print all missed lines, no matter how many |\n| — | --print-all-ignored | — | Print all ignored lines, no matter how many |\n| -t | --log-traceback | — | Enrich log-messages with compressed tracebacks |\n| — | --full-traceback | — | Either to make the tracebacks full, not compressed (as by default) |\n\n## See Also\n\n- fail2ban-client(1)\n- fail2ban-server(1)\n- jail.conf(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (5 lines) — 3 subsections\n  - LOG: (9 lines)\n  - REGEX: (7 lines)\n  - IGNOREREGEX: (5 lines)\n- **OPTIONS** (1 lines) — 21 subsections\n  - --version (2 lines)\n  - -h --help (2 lines)\n  - -c --config (2 lines)\n  - -d --datepattern (5 lines)\n  - -e --encoding (2 lines)\n  - -r --raw (6 lines)\n  - -L --maxlines (2 lines)\n  - -m --journalmatch (2 lines)\n  - -l --log-level (2 lines)\n  - -V (1 lines)\n  - -v --verbose (8 lines)\n  - -D --debuggex (2 lines)\n  - --no-check-all (2 lines)\n  - -o --out (3 lines)\n  - --print-no-missed (2 lines)\n  - --print-no-ignored (2 lines)\n  - --print-all-matched (2 lines)\n  - --print-all-missed (2 lines)\n  - --print-all-ignored (2 lines)\n  - -t --log-traceback (2 lines)\n  - --full-traceback (2 lines)\n- **AUTHOR** (3 lines)\n- **REPORTING BUGS** (2 lines)\n- **COPYRIGHT** (4 lines)\n- **SEE ALSO** (5 lines)\n\n## Full Content\n\n### NAME\n\nfail2ban-regex - test Fail2ban \"failregex\" option\n\n### SYNOPSIS\n\nfail2ban-regex [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]\n\n### DESCRIPTION\n\nFail2Ban   reads log file that contains password failure report and bans the corresponding IP\naddresses using firewall rules.\n\nThis tools can test regular expressions for \"fail2ban\".\n\n#### LOG:\n\nstring a string representing a log line\n\nfilename\npath to a log file (/var/log/auth.log)\n\nsystemd-journal\nsearch systemd journal (systemd-python required), optionally with backend  parameters,\nsee `man jail.conf` for usage and examples (systemd-journal[journalflags=1]).\n\n#### REGEX:\n\nstring a string representing a 'failregex'\n\nfilter name of filter, optionally with options (sshd[mode=aggressive])\n\nfilename\npath to a filter file (filter.d/sshd.conf)\n\n#### IGNOREREGEX:\n\nstring a string representing an 'ignoreregex'\n\nfilename\npath to a filter file (filter.d/sshd.conf)\n\n### OPTIONS\n\n#### --version\n\nshow program's version number and exit\n\n#### -h --help\n\nshow this help message and exit\n\n#### -c --config\n\nset alternate config directory\n\n#### -d --datepattern\n\nset custom pattern used to match date/times\n\n--timezone=TIMEZONE, --TZ=TIMEZONE\nset time-zone used by convert time format\n\n#### -e --encoding\n\nFile encoding. Default: system locale\n\n#### -r --raw\n\nRaw hosts, don't resolve dns\n\n--usedns=USEDNS\nDNS specified replacement of tags <HOST> in regexp ('yes' - matches all form of hosts,\n'no' - IP addresses only)\n\n#### -L --maxlines\n\nmaxlines for multi-line regex.\n\n#### -m --journalmatch\n\njournalctl style matches overriding filter file.  \"systemd-journal\" only\n\n#### -l --log-level\n\nLog level for the Fail2Ban logger to use\n\n#### -V\n\n#### -v --verbose\n\nIncrease verbosity\n\n--verbosity=VERBOSE\nSet numerical level of verbosity (0..4)\n\n--verbose-date, --VD\nVerbose date patterns/regex in output\n\n#### -D --debuggex\n\nProduce debuggex.com urls for debugging there\n\n#### --no-check-all\n\nDisable check for all regex's\n\n#### -o --out\n\nSet token to print failure information only (row, id, ip, msg, host,  ip4,  ip6,  dns,\nmatches, ...)\n\n#### --print-no-missed\n\nDo not print any missed lines\n\n#### --print-no-ignored\n\nDo not print any ignored lines\n\n#### --print-all-matched\n\nPrint all matched lines\n\n#### --print-all-missed\n\nPrint all missed lines, no matter how many\n\n#### --print-all-ignored\n\nPrint all ignored lines, no matter how many\n\n#### -t --log-traceback\n\nEnrich log-messages with compressed tracebacks\n\n#### --full-traceback\n\nEither to make the tracebacks full, not compressed (as by default)\n\n### AUTHOR\n\nWritten  by  Cyril  Jaquier  <cyril.jaquier@fail2ban.org>.  Many contributions by Yaroslav O.\nHalchenko, Steven Hiscocks, Sergey G. Brester (sebres).\n\n### REPORTING BUGS\n\nReport bugs to https://github.com/fail2ban/fail2ban/issues\n\n### COPYRIGHT\n\nCopyright © 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors\nCopyright of modifications held by their respective authors.  Licensed under the GNU  General\nPublic License v2 (GPL).\n\n### SEE ALSO\n\nfail2ban-client(1) fail2ban-server(1) jail.conf(5)\n\n\n\nfail2ban-regex 0.11.2                       November 2020                          FAIL2BAN-REGEX(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "FAIL2BAN-REGEX",
        "section": "1",
        "mode": "man",
        "summary": "fail2ban-regex - test Fail2ban \"failregex\" option",
        "synopsis": "fail2ban-regex [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "show program's version number and exit"
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "show this help message and exit"
            },
            {
                "flag": "-c",
                "long": "--config",
                "arg": null,
                "description": "set alternate config directory"
            },
            {
                "flag": "-d",
                "long": "--datepattern",
                "arg": null,
                "description": "set custom pattern used to match date/times --timezone=TIMEZONE, --TZ=TIMEZONE set time-zone used by convert time format"
            },
            {
                "flag": "-e",
                "long": "--encoding",
                "arg": null,
                "description": "File encoding. Default: system locale"
            },
            {
                "flag": "-r",
                "long": "--raw",
                "arg": null,
                "description": "Raw hosts, don't resolve dns --usedns=USEDNS DNS specified replacement of tags <HOST> in regexp ('yes' - matches all form of hosts, 'no' - IP addresses only)"
            },
            {
                "flag": "-L",
                "long": "--maxlines",
                "arg": null,
                "description": "maxlines for multi-line regex."
            },
            {
                "flag": "-m",
                "long": "--journalmatch",
                "arg": null,
                "description": "journalctl style matches overriding filter file. \"systemd-journal\" only"
            },
            {
                "flag": "-l",
                "long": "--log-level",
                "arg": null,
                "description": "Log level for the Fail2Ban logger to use"
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Increase verbosity --verbosity=VERBOSE Set numerical level of verbosity (0..4) --verbose-date, --VD Verbose date patterns/regex in output"
            },
            {
                "flag": "-D",
                "long": "--debuggex",
                "arg": null,
                "description": "Produce debuggex.com urls for debugging there"
            },
            {
                "flag": "",
                "long": "--no-check-all",
                "arg": null,
                "description": "Disable check for all regex's"
            },
            {
                "flag": "-o",
                "long": "--out",
                "arg": null,
                "description": "Set token to print failure information only (row, id, ip, msg, host, ip4, ip6, dns, matches, ...)"
            },
            {
                "flag": "",
                "long": "--print-no-missed",
                "arg": null,
                "description": "Do not print any missed lines"
            },
            {
                "flag": "",
                "long": "--print-no-ignored",
                "arg": null,
                "description": "Do not print any ignored lines"
            },
            {
                "flag": "",
                "long": "--print-all-matched",
                "arg": null,
                "description": "Print all matched lines"
            },
            {
                "flag": "",
                "long": "--print-all-missed",
                "arg": null,
                "description": "Print all missed lines, no matter how many"
            },
            {
                "flag": "",
                "long": "--print-all-ignored",
                "arg": null,
                "description": "Print all ignored lines, no matter how many"
            },
            {
                "flag": "-t",
                "long": "--log-traceback",
                "arg": null,
                "description": "Enrich log-messages with compressed tracebacks"
            },
            {
                "flag": "",
                "long": "--full-traceback",
                "arg": null,
                "description": "Either to make the tracebacks full, not compressed (as by default)"
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "fail2ban-client",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/fail2ban-client/1/json"
            },
            {
                "name": "fail2ban-server",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/fail2ban-server/1/json"
            },
            {
                "name": "jail.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/jail.conf/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": [
                    {
                        "name": "LOG:",
                        "lines": 9
                    },
                    {
                        "name": "REGEX:",
                        "lines": 7
                    },
                    {
                        "name": "IGNOREREGEX:",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-c --config",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--config"
                    },
                    {
                        "name": "-d --datepattern",
                        "lines": 5,
                        "flag": "-d",
                        "long": "--datepattern"
                    },
                    {
                        "name": "-e --encoding",
                        "lines": 2,
                        "flag": "-e",
                        "long": "--encoding"
                    },
                    {
                        "name": "-r --raw",
                        "lines": 6,
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "-L --maxlines",
                        "lines": 2,
                        "flag": "-L",
                        "long": "--maxlines"
                    },
                    {
                        "name": "-m --journalmatch",
                        "lines": 2,
                        "flag": "-m",
                        "long": "--journalmatch"
                    },
                    {
                        "name": "-l --log-level",
                        "lines": 2,
                        "flag": "-l",
                        "long": "--log-level"
                    },
                    {
                        "name": "-V",
                        "lines": 1,
                        "flag": "-V"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 8,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-D --debuggex",
                        "lines": 2,
                        "flag": "-D",
                        "long": "--debuggex"
                    },
                    {
                        "name": "--no-check-all",
                        "lines": 2,
                        "long": "--no-check-all"
                    },
                    {
                        "name": "-o --out",
                        "lines": 3,
                        "flag": "-o",
                        "long": "--out"
                    },
                    {
                        "name": "--print-no-missed",
                        "lines": 2,
                        "long": "--print-no-missed"
                    },
                    {
                        "name": "--print-no-ignored",
                        "lines": 2,
                        "long": "--print-no-ignored"
                    },
                    {
                        "name": "--print-all-matched",
                        "lines": 2,
                        "long": "--print-all-matched"
                    },
                    {
                        "name": "--print-all-missed",
                        "lines": 2,
                        "long": "--print-all-missed"
                    },
                    {
                        "name": "--print-all-ignored",
                        "lines": 2,
                        "long": "--print-all-ignored"
                    },
                    {
                        "name": "-t --log-traceback",
                        "lines": 2,
                        "flag": "-t",
                        "long": "--log-traceback"
                    },
                    {
                        "name": "--full-traceback",
                        "lines": 2,
                        "long": "--full-traceback"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "fail2ban-regex - test Fail2ban \"failregex\" option\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "fail2ban-regex [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Fail2Ban   reads log file that contains password failure report and bans the corresponding IP\naddresses using firewall rules.\n\nThis tools can test regular expressions for \"fail2ban\".\n",
                "subsections": [
                    {
                        "name": "LOG:",
                        "content": "string a string representing a log line\n\nfilename\npath to a log file (/var/log/auth.log)\n\nsystemd-journal\nsearch systemd journal (systemd-python required), optionally with backend  parameters,\nsee `man jail.conf` for usage and examples (systemd-journal[journalflags=1]).\n"
                    },
                    {
                        "name": "REGEX:",
                        "content": "string a string representing a 'failregex'\n\nfilter name of filter, optionally with options (sshd[mode=aggressive])\n\nfilename\npath to a filter file (filter.d/sshd.conf)\n"
                    },
                    {
                        "name": "IGNOREREGEX:",
                        "content": "string a string representing an 'ignoreregex'\n\nfilename\npath to a filter file (filter.d/sshd.conf)\n"
                    }
                ]
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "--version",
                        "content": "show program's version number and exit\n",
                        "long": "--version"
                    },
                    {
                        "name": "-h --help",
                        "content": "show this help message and exit\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-c --config",
                        "content": "set alternate config directory\n",
                        "flag": "-c",
                        "long": "--config"
                    },
                    {
                        "name": "-d --datepattern",
                        "content": "set custom pattern used to match date/times\n\n--timezone=TIMEZONE, --TZ=TIMEZONE\nset time-zone used by convert time format\n",
                        "flag": "-d",
                        "long": "--datepattern"
                    },
                    {
                        "name": "-e --encoding",
                        "content": "File encoding. Default: system locale\n",
                        "flag": "-e",
                        "long": "--encoding"
                    },
                    {
                        "name": "-r --raw",
                        "content": "Raw hosts, don't resolve dns\n\n--usedns=USEDNS\nDNS specified replacement of tags <HOST> in regexp ('yes' - matches all form of hosts,\n'no' - IP addresses only)\n",
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "-L --maxlines",
                        "content": "maxlines for multi-line regex.\n",
                        "flag": "-L",
                        "long": "--maxlines"
                    },
                    {
                        "name": "-m --journalmatch",
                        "content": "journalctl style matches overriding filter file.  \"systemd-journal\" only\n",
                        "flag": "-m",
                        "long": "--journalmatch"
                    },
                    {
                        "name": "-l --log-level",
                        "content": "Log level for the Fail2Ban logger to use\n",
                        "flag": "-l",
                        "long": "--log-level"
                    },
                    {
                        "name": "-V",
                        "content": "",
                        "flag": "-V"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "Increase verbosity\n\n--verbosity=VERBOSE\nSet numerical level of verbosity (0..4)\n\n--verbose-date, --VD\nVerbose date patterns/regex in output\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-D --debuggex",
                        "content": "Produce debuggex.com urls for debugging there\n",
                        "flag": "-D",
                        "long": "--debuggex"
                    },
                    {
                        "name": "--no-check-all",
                        "content": "Disable check for all regex's\n",
                        "long": "--no-check-all"
                    },
                    {
                        "name": "-o --out",
                        "content": "Set token to print failure information only (row, id, ip, msg, host,  ip4,  ip6,  dns,\nmatches, ...)\n",
                        "flag": "-o",
                        "long": "--out"
                    },
                    {
                        "name": "--print-no-missed",
                        "content": "Do not print any missed lines\n",
                        "long": "--print-no-missed"
                    },
                    {
                        "name": "--print-no-ignored",
                        "content": "Do not print any ignored lines\n",
                        "long": "--print-no-ignored"
                    },
                    {
                        "name": "--print-all-matched",
                        "content": "Print all matched lines\n",
                        "long": "--print-all-matched"
                    },
                    {
                        "name": "--print-all-missed",
                        "content": "Print all missed lines, no matter how many\n",
                        "long": "--print-all-missed"
                    },
                    {
                        "name": "--print-all-ignored",
                        "content": "Print all ignored lines, no matter how many\n",
                        "long": "--print-all-ignored"
                    },
                    {
                        "name": "-t --log-traceback",
                        "content": "Enrich log-messages with compressed tracebacks\n",
                        "flag": "-t",
                        "long": "--log-traceback"
                    },
                    {
                        "name": "--full-traceback",
                        "content": "Either to make the tracebacks full, not compressed (as by default)\n",
                        "long": "--full-traceback"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written  by  Cyril  Jaquier  <cyril.jaquier@fail2ban.org>.  Many contributions by Yaroslav O.\nHalchenko, Steven Hiscocks, Sergey G. Brester (sebres).\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Report bugs to https://github.com/fail2ban/fail2ban/issues\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright © 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors\nCopyright of modifications held by their respective authors.  Licensed under the GNU  General\nPublic License v2 (GPL).\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "fail2ban-client(1) fail2ban-server(1) jail.conf(5)\n\n\n\nfail2ban-regex 0.11.2                       November 2020                          FAIL2BAN-REGEX(1)",
                "subsections": []
            }
        }
    }
}