Problem/Motivation

We have simple conditions with our aggregators.

Now with dblog / watchdog / past aggregators, we had recently more and more false positives.
It turns out that you want to exclude certain matches from being counted at all.
- 404 errors possibly are fine for certain checked URLs
- some errors might appear that are due to a core bug you can't solve
- some errors appear but you don't care about them.
Specific exclusions are required since all other irregular activities should still be escalated.

Proposed resolution

Add exclude textarea with matching patterns that are excluded.

Possibly improve the general conditions UI to also support this requirement?

Remaining tasks

User interface changes

API changes

Comments

berdir’s picture

A exclude textarea doesn't know what to exclude on? What we should do is expose the operator, and then support IN and a comma separated list?

berdir’s picture

Might have misread the issue a bit, a generic implementation is not possible but we can use this feature in the dblog and past sensors:

* For those two, add a textfield that says excluded types (for dblog) and excluded machine names for past (past could have two fields, excluded machine names and modules).
* Each line is an entry, you could display a description of known types by collecting them from what's in the database right now (select distinct type... )
* If you have any, exclude in the query you build.

By default, the dblog warning sensor should exclude the 'page not found' type and the error sensor should exclude 'form'. Once we have a php notice sensor, we might also want to exclude php from the notice and warning sensor and track them separately.

miro_dietiker’s picture

Now we are talking about the same. ;-)

berdir’s picture

As discussed with Miro:

In 8.x, we have a conditions UI, that doesn't exist in 7.x. With conditions, you can have a numbers of <> conditions to achieve this.

in 7.x-1.x, we don't have that and will likely not backport it. So a solution as suggested above should probably be implemented in that branch, which requires custom sensor classes for dblog and past.

miro_dietiker’s picture

Bumping this.
Recently we receive many form errors with D7 sites resulting in false positives. Mostly originated by bots that pick invalid values from selects / dropdowns.
Discussed to exclude form errors hardcoded?

berdir’s picture

Note:

This can be done on 7.x through $conf:

$conf['monitoring_sensor_info']['dblog_event_severity_error']['settings']['conditions'][] = ['field' => 'type', 'value' => 'form', 'operator' => '<>'];
berdir’s picture

Same for past:

$conf['monitoring_sensor_info']['past_db_event_severity_error']['settings']['conditions'][] = array(
  'field' => 'machine_name',
  'value' => 'form',
  'operator' => '<>',
);

We should probably just add those by default to those two sensors.

giancarlosotelo’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
StatusFileSize
new2.41 KB

Added default conditions to both sensors.

giancarlosotelo’s picture

Status: Active » Needs review
giancarlosotelo’s picture

StatusFileSize
new976 bytes

Sorry wrong patch.

The last submitted patch, 8: add_second_table-2581701-2.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 10: criteria_aggregator-2376007-8.patch, failed testing.

giancarlosotelo’s picture

Status: Needs work » Needs review
StatusFileSize
new997 bytes

Setting conditions just to 'error'.

Status: Needs review » Needs work

The last submitted patch, 13: criteria_aggregator-2376007-13.patch, failed testing.

giancarlosotelo’s picture

Status: Needs work » Needs review
StatusFileSize
new1001 bytes
new803 bytes

This is the way.

Status: Needs review » Needs work

The last submitted patch, 15: criteria_aggregator-2376007-15.patch, failed testing.

giancarlosotelo’s picture

Status: Needs work » Needs review

I checked and fails are related to the commerce module (?)

miro_dietiker’s picture

Yeah right.

Since we can add this through settings (for the relevant sites), i'm just not fully sure if we should really hardcode it or just add it in settings when it happens for a specific site. I still fear that through this general exclude we could end up ignore errors that are originated in buggy code.