Histogram issue in nagiosls

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
oliviergautreau
Posts: 11
Joined: Tue Mar 31, 2020 9:22 am

Histogram issue in nagiosls

Post by oliviergautreau »

Hi there,

I'm very new on this forum. That is my first topic and i hope i 'm opening it at the right place.
We are using Nagios Log Server 2.1.4, and we mostly use the default fonctionalities. We run the nagios appliance.

Yesterday my boss asked some statistics about VPN usage. (Indeed, because of Coronas Virus, our people are working from home now !)

Goal is to know the number of concurrent users logged in !

Fortulately, the device is sending us every hour this information encapsulated in a message.
Thanks to this forum and with the usage of grok filter, we managed to cut the message matching the correct pattern. Awesome !
So far, so good: i have a concurrentuser field with the correct information. Great !

Now, I want to do something very simple but didn't find out how to do it !
I just want to print this information on a Nagios Dashboard as an histogram.

See screenshot.

How to draw an histogrann with timestamp on X and concurrent user number on Y ?
This should be very simple but, I don't get it...

Of course csv export is working, but how to do it in through the nagios interface ?

thx, Oliver
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Histogram issue in nagiosls

Post by scottwilkerson »

If you go to edit the Histogram and click on the Panel tab, what do you have in the "Values" area?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
oliviergautreau
Posts: 11
Joined: Tue Mar 31, 2020 9:22 am

Re: Histogram issue in nagiosls

Post by oliviergautreau »

Hi Scott,

I have : count / mean / min / max / total
02-04-2020 17-56-22.png
If I change to total, and choose ConcurrentUsers in new Value Field, i get a ClassCastException
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Histogram issue in nagiosls

Post by scottwilkerson »

Is ConcurrentUsers set to an Integer per your GROK you setup? It has to be numeric or this will not work
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
oliviergautreau
Posts: 11
Joined: Tue Mar 31, 2020 9:22 am

Re: Histogram issue in nagiosls

Post by oliviergautreau »

hi Scott and thank you for this feedback.

Indeed, we got a ClassCastException error message.
But ConcurrentUsers is set to a NUMBER. Should i convert the ConcurrentUsers Field and how ?

With the following syntax %{NUMBER:concurrentUsers:int} ?
I will try this !

thx, Olivier






if [host] == '172.19.251.10' {
grok {
match => { "message" => "%{DATA:field1} - - - %{DATA:field2} - ive - \[%{IP:PublicIP}\] %{DATA:field3}::%{WORD:username}(%{DATA:field4})\[%{DATA:field5}\] - Number of concurrent users logged in to the device: %{NUMBER:ConcurrentUsers}" }
match => { "message" => "%{DATA:field1} - - - %{DATA:field2} - ive - \[%{IP:PublicIP}\] %{DATA:field3}::%{WORD:username}(%{DATA:field4})\[%{DATA:field5}\] - %{GREEDYDATA:VPNevent}" }
}
oliviergautreau
Posts: 11
Joined: Tue Mar 31, 2020 9:22 am

Re: Histogram issue in nagiosls

Post by oliviergautreau »

Yes, it is working now with the :int convertion.
ConcurrentUsers is a not a string anymore but a long.

thx a lot for your help !
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Histogram issue in nagiosls

Post by scottwilkerson »

oliviergautreau wrote:Yes, it is working now with the :int convertion.
ConcurrentUsers is a not a string anymore but a long.

thx a lot for your help !
great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked