histogram is not drawing 0 values

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
_asp_
Posts: 91
Joined: Mon May 23, 2016 4:30 am

histogram is not drawing 0 values

Post 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
You do not have the required permissions to view the files attached to this post.
Last edited by _asp_ on Fri Jul 01, 2016 1:58 am, edited 1 time in total.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: histogram is not drawing 0 values

Post 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?
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
_asp_
Posts: 91
Joined: Mon May 23, 2016 4:30 am

Re: histogram is not drawing 0 values

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: histogram is not drawing 0 values

Post by scottwilkerson »

You have the chart value set to "mean", I think what you want is total
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
_asp_
Posts: 91
Joined: Mon May 23, 2016 4:30 am

Re: histogram is not drawing 0 values

Post 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...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: histogram is not drawing 0 values

Post 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)
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
_asp_
Posts: 91
Joined: Mon May 23, 2016 4:30 am

Re: histogram is not drawing 0 values

Post by _asp_ »

Yes, each minute comes "TuxPerfLogValue": 0 as above in code section
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: histogram is not drawing 0 values

Post by rkennedy »

Can you show us a screenshot of what you're seeing, and how you have your filter / queries setup?
Former Nagios Employee
_asp_
Posts: 91
Joined: Mon May 23, 2016 4:30 am

Re: histogram is not drawing 0 values

Post 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
  ]
}
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: histogram is not drawing 0 values

Post 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?
Former Nagios employee
Locked