Add "Default view" KPIs to TwoColConflict grafana board
Closed, ResolvedPublic

Description

Relating to T165027

Currently the dashboard shows the Total number of edit conflict views etc.

The dashboard should also show the counts from only the Default view.

The default view numbers can be calculated by subtracting the TwoColConflict numbers form the Total numbers.

Addshore created this task.Aug 22 2017, 2:18 PM
Restricted Application added a project: TCB-Team. · View Herald TranscriptAug 22 2017, 2:18 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
GoranSMilovanovic added a comment.EditedSep 3 2017, 3:48 PM

@Addshore @Tobi_WMDE_SW Well, this why I've asked on how to develop a better understanding of the Graphite/Grafana data structures and the way they work:

  • Added a new Singlestat as requested: literary copy and paste the metrics from the (1) Total Edit Resolution Page Views Singlestat and (2) TwoColConflicts page views singlestat, and added a minus sign between them; the new Singlestat is yellow colored, found in the fourth row, and has the title of: Default page views (as suggested, just the difference between the two already reported statitics);
  • all other parameters match perfectly (checked);
  • the numbers, however, do not match: the new Default page views Singlestat reports a number that is always lower than the real difference between the two original Singlestats ((OK - this was fixed later by using 'current', but please see the following comments).

Please advise. I will easily add the two remaining Singlestats once when anyone explains to me what is wrong with this first one. Thanks.

@Addshore @Tobi_WMDE_SW

Using the diffSeries() function, as described in the Graphite documentation on: http://graphite.readthedocs.io/en/latest/functions.html:

diffSeries(summarize(MediaWiki.edit.failures.conflict.sum, '1d', 'sum', false), summarize(MediaWiki.TwoColConflict.conflict.sum, '1d', 'sum', false))

the number is again lower than expected.

@Addshore @Tobi_WMDE_SW

No change in behavior when two series are defined and the difference is computed in the third query:

Query A: summarize(MediaWiki.edit.failures.conflict.sum, '1d', 'sum', false)
Query B: summarize(MediaWiki.TwoColConflict.conflict.sum, '1d', 'sum', false)
Query C: #A - #B

GoranSMilovanovic added a comment.EditedSep 3 2017, 4:27 PM

@Addshore @Tobi_WMDE_SW

Also - now this is really strange - when we have three queries defined like in the previous example:

Query A: summarize(MediaWiki.edit.failures.conflict.sum, '1d', 'sum', false) - returns a positive integer
Query B: summarize(MediaWiki.TwoColConflict.conflict.sum, '1d, 'sum', false) - returns N/A (?!)
Query C: #A - #B - returns the same value as Query A.

Ok, what is happening here? Query B works on the respective Singlestat on the very same dashboard (that would be the TwoColConflict page views Single stat, first row, first Singlestat).

And with the given queries, using diffSeries() in Query C returns N/A.

It look me a while to spot, but I noticed for some reason on #B "Toggle edit mode" didn't work, which made me think grafana couldn't parse the query.
I retyped the query and everything worked just fine.
Diffing the strings you are missing a closing ' mark just after 1d.

I'm not sure what the behaviour of #A-#B is, so I switched it with diffSeries and all looks good!

847-71=776 so all looks good.

I'm not really sure in which commens above you were coyping and pasting out the graphite query strings and which you were retyping but the error only actually seems to be in your last comment

GoranSMilovanovic added a comment.EditedSep 3 2017, 10:20 PM

@Addshore Ok, thanks. Percent Conflicts Resolved singlestat is wrong, in spite of the fact that the ratio definition in the querry is correct - please check it out to confirm:

Currently (00:19 CEST, 09/04/2017):

  • Total Edit Resolution Page Views = 1256
  • Total Conflicts Resolved = 436
  • Percent Conflicts Resolved = 34.02%, while it should be: 34.71%
GoranSMilovanovic added a comment.EditedSep 3 2017, 10:37 PM
  • All requested singlestats are now present.
  • However, the already present 'Percent Conflicts Resolved' singlestat reports an incorrect value.

However, the already present 'Percent Conflicts Resolved' singlestat reports an incorrect value.

Fixed.
For the panel, under Options > Value > Stat it was set to "avg" when it should be "current"

GoranSMilovanovic added a comment.EditedSep 4 2017, 8:32 AM

@Tobi_WMDE_SW Please review, looks like we're good here.

This looks good from a first glance. We'll have a look at it together with the whole team today.

Addshore closed this task as Resolved.Sep 5 2017, 2:35 PM