Page 1 of 2

histogram is not drawing 0 values

Posted: Thu Jun 23, 2016 8:35 am
by _asp_
Hi,

I would like to visualize our message queue length in a histogram.
As long as the queue length is > 0 everything is fine. The line is drawn.
But if the value is equal to 0 (number 0, not null) it is not drawn.

Here are my histogram settings:
panel_config.JPG
This example request here is not drawn:

Code: Select all

{
  "_index": "logstash-2016.06.23",
  "_type": "import_json",
  "_id": "AVV9brbpIfQq8AlkVQwp",
  "_score": null,
  "_source": {
    "EventReceivedTime": "2016-06-23 15:24:15",
    "SourceModuleName": "tuxedo-performance",
    "SourceModuleType": "im_file",
    "Component": "MaintScheduler",
    "Application": "PerformanceMonitor",
    "LogFile": "performancelog",
    "Stage": "Production",
    "HostName": "xxxx",
    "ServerType": "Jump",
    "@version": "1",
    "@timestamp": "2016-06-23T13:24:14.000Z",
    "host": "xxx",
    "type": "import_json",
    "tags": [
      "import_json"
    ],
    "TuxPerfLogKey": "EMAIL_SUBMIT",
    "TuxPerfLogValue": 0
  },
  "highlight": {
    "LogFile.raw": [
      "@start-highlight@performancelog@end-highlight@"
    ],
    "LogFile": [
      "@start-highlight@performancelog@end-highlight@"
    ],
    "TuxPerfLogKey": [
      "@start-highlight@EMAIL_SUBMIT@end-highlight@"
    ]
  },
  "sort": [
    1466688254000,
    1466688254000
  ]
}
how can I display 0 values as they occur?

Thanks,
Andreas

Re: histogram is not drawing 0 values

Posted: Thu Jun 23, 2016 10:35 am
by rkennedy
There is an option for 'Zero fill' and you should check this option if you would like 0 plotted. Here's a screenshot with it checked.
nls-histogram.PNG
Is that what you were lookign for?

Re: histogram is not drawing 0 values

Posted: Fri Jun 24, 2016 2:07 am
by _asp_
I have a different understanding of that flag.

If kibana is not able to get any value it replaces the null value with 0. That means if i set sample size to 30s and my samples arrive each 60 seconds then my graph is jumping between real values and 0.

But I have a real value which is set to 0, so it needs to be plotted. So you option is not the solution, because it plots wrong data if sample size is too low.

Any other idea?

Re: histogram is not drawing 0 values

Posted: Fri Jun 24, 2016 10:32 am
by scottwilkerson
You have the chart value set to "mean", I think what you want is total

Re: histogram is not drawing 0 values

Posted: Wed Jun 29, 2016 4:54 am
by _asp_
no, I really want mean. I want to plot the filling grade of the queue.
If I have continuously 10 messages in the queue then I want the chart to plot an steady line at value 10. It should stay 10 regardless of the selected Interval.

We measure each 1 minute and we get the count pre-accumulated out of our logs.

If I set to mean, then i will get value 10, if I set interval to 1 min or 10 min.
If I set it to total, I will get value 10 on 1 minutes and value 100 on 1 minute. But that's not what I want.


But what I still want is to display zero values...

Re: histogram is not drawing 0 values

Posted: Wed Jun 29, 2016 3:29 pm
by scottwilkerson
Just out of curiosity, are you sure you have results for each item in the interval of time you are plotting?

The mean is going to calculate the mean during the interval (in your screanshot is set to 1m)

Re: histogram is not drawing 0 values

Posted: Thu Jun 30, 2016 2:22 am
by _asp_
Yes, each minute comes "TuxPerfLogValue": 0 as above in code section

Re: histogram is not drawing 0 values

Posted: Thu Jun 30, 2016 9:55 am
by rkennedy
Can you show us a screenshot of what you're seeing, and how you have your filter / queries setup?

Re: histogram is not drawing 0 values

Posted: Fri Jul 01, 2016 1:58 am
by _asp_
ok, here my setup

what I see:
zero_value_problem_screen_1.JPG
my setup:
zero_value_problem_screen_2.JPG
and the json of one event as example where you can see, that the value a number and not a string:

Code: Select all

{
  "_index": "logstash-2016.07.01",
  "_type": "import_json",
  "_id": "AVWlNy8-IfQq8AlkPoOr",
  "_score": null,
  "_source": {
    "EventReceivedTime": "2016-07-01 08:48:24",
    "SourceModuleName": "tuxedo-performance_prod",
    "SourceModuleType": "im_file",
    "Component": "MaintScheduler",
    "Application": "PerformanceMonitor",
    "LogFile": "performancelog",
    "Stage": "Production",
    "HostName": "xxxx",
    "ServerType": "Jump",
    "@version": "1",
    "@timestamp": "2016-07-01T06:48:23.000Z",
    "host": "xxx",
    "type": "import_json",
    "tags": [
      "import_json"
    ],
    "TuxPerfLogKey": "EMAIL_SUBMIT",
    "TuxPerfLogValue": 0
  },
  "highlight": {
    "LogFile.raw": [
      "@start-highlight@performancelog@end-highlight@"
    ],
    "LogFile": [
      "@start-highlight@performancelog@end-highlight@"
    ],
    "TuxPerfLogKey": [
      "@start-highlight@EMAIL_SUBMIT@end-highlight@"
    ]
  },
  "sort": [
    1467355703000,
    1467355703000
  ]
}

Re: histogram is not drawing 0 values

Posted: Tue Jul 05, 2016 1:50 pm
by tmcdonald
This seems to have been brought up by others as well:

http://permalink.gmane.org/gmane.comp.s ... user/12357
https://seanmcgary.com/posts/elasticsea ... ty-buckets
https://discuss.elastic.co/t/kibana-his ... ro/20012/2
https://discuss.elastic.co/t/kibana-his ... zero/20036

So it's definitely not just you seeing this.

Just on a hunch, what if you set the minimum to -1?