TypeError: Cannot read property length of undefined

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent

TypeError: Cannot read property length of undefined

Post by WillemDH »

Since recently, it could be since the 2.2 upgrade but I'm not sure, I'm seeing errors in some pie graphs:

Code: Select all

TypeError: Cannot read property length of undefined
Nothing really changed in the global config, filters or inputs.
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: TypeError: Cannot read property length of undefined

Post by jolson »

It's very possible that this is related to using HTTPS - try accessing the NLS GUI via HTTP and see if that makes a difference.

After checking on the above, I'd like you to open the developer console of your browser and take a look for any potential 'errors' that pop out at you - they may look something like this:
2015-09-15 11_30_54-Cortana.png
Though hopefully the errors that you see are more verbose.

Is there anything in the httpd error log?

Code: Select all

cat /var/log/httpd/error*
You do not have the required permissions to view the files attached to this post.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent

Re: TypeError: Cannot read property length of undefined

Post by WillemDH »

Hey Jesse,

Well I'm using HTTP, not HTTPS, so that should not be an issue. I checked the httpd error lof but nothing interesting was in there. The developer console did show a little more info. Please check the attached screenshot.

Grtz

Willem
You do not have the required permissions to view the files attached to this post.
Nagios XI 5.8.1
https://outsideit.net
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: TypeError: Cannot read property length of undefined

Post by jolson »

The only bug I found on the internet related to this issue is the following:
https://github.com/elastic/kibana/issues/1561

Try going to 'Configure Dashboard' (gear icon in upper right), navigate to the 'Index' tab, and press 'Save'. Is there any difference? What if you modify the index pattern very slightly and then change it back?

For instance:
Change Index Pattern *from* logstash-YYYY.MM.DD *to* stash-YYYY.MM.DD - press save.

Change it back and press 'Save'.

I have asked the developers about the screenshot you sent in - I'm waiting on that response.

Is there any impact in functionality, or is this a visual bug?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent

Re: TypeError: Cannot read property length of undefined

Post by WillemDH »

Nice one Jesse, changing the index pattern, saving and settting it back to the original solved the problem. Thanks. Thread can be closed. It was indeed just a visual bug.
Nagios XI 5.8.1
https://outsideit.net