# Can \`web\_log\` be configured to ignore certain lines to avoid mismatch alerts?

**URL:** <https://community.netdata.cloud/t/can-web-log-be-configured-to-ignore-certain-lines-to-avoid-mismatch-alerts/4805>\
**Category:** Help\
**Tags:** agent, alerts, collectors\
**Created:** [October 27, 2023, 12:40pm UTC](https://community.netdata.cloud/t/can-web-log-be-configured-to-ignore-certain-lines-to-avoid-mismatch-alerts/4805 "2023-10-27T12:40:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddyg](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@eddyg](https://community.netdata.cloud/u/eddyg)\
**Post date:** [October 27, 2023, 12:40pm UTC](https://community.netdata.cloud/t/can-web-log-be-configured-to-ignore-certain-lines-to-avoid-mismatch-alerts/4805/1 "2023-10-27T12:40:09Z")

</div>

I have configured `web_log` to parse logs from HAProxy (which is configured to log in its `httplog` format) using a custom `regexp` log type.

Everything is working fine, except that I am frequently receiving **web\_log\_1m\_unmatched** alerts because of how HAProxy logs various “error” events.

Even though my regexp pattern _does_ parse this error-line variant properly:

```auto
192.168.1.1:61942 [27/Oct/2023:01:02:03.227] frontend backend/<NOSRV> -1/-1/-1/-1/0 400 0 - - CR-- 29/28/0/0/0 0/0 "<BADREQ>"

```

`web_log` is unhappy because it is unable to parse the “request” portion:

```auto
[INFO] web_log[haproxy] collect.go:63 unmatched line: regexp parse: assign 'request': assign 'BADREQ': bad request

```

The other problematic log lines are ones like this:

```auto
192.168.1.1:59481 [27/Oct/2023:01:02:04.466] web/2: Connection closed during SSL handshake
192.168.1.1:59483 [27/Oct/2023:01:02:04.446] web/2: SSL handshake failure

```

Is there some kind of `ignore_pattern` configuration option that would simply ignore lines that matched the given Matcher pattern, instead of reporting them as “mismatched”? (Such lines could even be reported as a separate `ignored_requests` metric and not included in the `excluded_requests` metric.)

Note that this isn’t simply about erroneous “mismatched alerts” — the bigger problem is that if the last log line just _happens_ to be an error when Netdata starts, the HAProxy `web_log` job _doesn’t start at all_:

```auto
[WARN] web_log[haproxy] weblog.go:129 check failed: parse last line: regexp parse: assign 'request': assign 'BADREQ': bad request (...)

```

Any ideas/suggestions welcome.
