Use the storage from #1559310: 404 pages should be language aware for better 404 tracking.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | support_redirect_404-2836483-16.patch | 8.08 KB | ginovski |
| #17 | interdiff-2836483-15-16.txt | 6.82 KB | ginovski |
| #15 | sensor-redirect-404.png | 27.03 KB | ginovski |
| #15 | support_redirect_404-2836483-15.patch | 5.63 KB | ginovski |
| #15 | interdiff-2836483-11-15.txt | 2.11 KB | ginovski |
Comments
Comment #2
ginovski commentedInitial patch, added sensor, default config and basic web test.
Comment #4
ginovski commentedAdding module dependency for the test
Comment #5
ginovski commentedAdded test dependency in the monitoring module.
Comment #9
berdirCommitted that. Would be nice if someone would look into those test fails because now you will have to always manually request a test.
Comment #10
berdirjust like the other is called Dblog404, this should be called redirect_404, the id possibly monitoring_redirect_404, label should also clarify that this the redirect_404 version.
count of just one record does't make sense. just select count as records_count or what it is with addField(). And that should be possibly by just overridig the aggregate method called by the parent.
additionally select the path field and display that in the message like the other 404 sensor
the aggregate also needs the check on resolve. you could also put that in settigs, then both should respect it.
if you select it as the right field name, then the parent does this for you, and you just need exactly the same as the other 404 for the path.
extend with checking the patch in the message as well.
I would actually recommend to insert the rows directly into the database and making this a kernel test. redirect_404 has such a test to test purging of data, you can do it in a similar way. We want records older than one day, records that are resolved and multiple with different counts to make sure we get the right now and test all our coditions.
Also installing the redirect_404 module can be done in the property now.
Comment #11
ginovski commented1. Renamed monitoring_404 -> redirect_404
2. Added field count as records_count in the aggregateQuery
3. Added field path in the aggregateQuery
4. Added resolved in the settings, added condition for it in the aggregateQuery and query.
5. Removed the setValue logic from runSensor(), using the records_count instead.
6. Transformed the webtest to kernel, asserting the status message also.
Addressed #10, but it seems like the addField() has some error with the aggregateQuery with the groupBy, I'll fix this asap.
Comment #12
ginovski commentedComment #14
berdirjust the path is enough, we don't need this, it would be wrong anyway on drush and so on.
Comment #15
ginovski commentedChanged path and fixed groupBy.
Sensor is working properly when I tried it manually, but kernel test is failing somewhere in the query->execute(), not sure why.
Comment #17
ginovski commentedFixed the query and extended test.
Comment #19
berdirNice, tested that this is created on rebuilding the sensor list and committed.