New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacked charts contain redundant and incorrect fields #4150

edmundoa opened this Issue Sep 14, 2017 · 0 comments


None yet
1 participant

edmundoa commented Sep 14, 2017

Looking at a stacked chart in the database, I realised there are duplicated fields in it's configuration:

    "creator_user_id" : "hans",
    "cache_time" : 10,
    "description" : "Field graph",
    "id" : "534dba10-18de-43c5-898b-ff540d949537",
    "type" : "STACKED_CHART",
    "config" : {
        "timerange" : {
            "type" : "relative",
            "range" : 300
        "renderer" : "line",
        "interpolation" : "linear",
        "rangeType" : "relative",
        "series" : [ 
                "query" : "",
                "field" : "took_ms",
                "statistical_function" : "mean"
                "query" : "",
                "field" : "took_ms",
                "statistical_function" : "max"
        "query" : "",
        "interval" : "minute",
        "relative" : 300

Fields rangeType, query, and relative are not needed, and should not be sent by the web interface or persisted.

Other than the redundancy and confusion, there is no impact in the Graylog server or web interface, as we use the data from timerange and series to calculate and render stacked charts.

Steps to Reproduce (for bugs)

  1. Create a stacked chart
  2. Add it to a dashboard while observing the network request
  3. See that there are redundant fields

Your Environment

  • Graylog Version: 2.4.0-SNAPSHOT

@edmundoa edmundoa self-assigned this Sep 14, 2017

edmundoa added a commit that referenced this issue Sep 14, 2017

Remove superfluous config from stacked charts
Stacked charts contained some configuration options that were redundant
and/or incorrect. Namely the timerange information was twice in the
configuration object, and the query appeared in the main configuration
object, even if the query is independent for each one of the time series
in the chart.

This commit fixes the issue by filtering out those redundant fields.

Fixes #4150

@edmundoa edmundoa added this to the 2.4.0 milestone Sep 14, 2017

@bernd bernd closed this in 0ee1d9d Sep 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment