Nagiosgraph: JavaScript is disabled. nagiosgraph.js is not

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by mksmr »

(edit: link fixed)

It's here:
https://sourceforge.net/p/nagiosgraph/d ... /1bcaa81e/
Here's the op's last post on the matter (from a local copy on my computer):
I solved the problem !!!

A wrong check , put "bad" character in the nagios performance field

Nagiograph was created a file like this
UX_Check_JBO_HCMP0_BOP_A_web___exception%20occurred%3A%20javax.management.AttributeNotFoundException%3A%20JBAS014749%3A%20Operation%20handler%20failed%3A%20null.%20See%20the%20log%20file%20for%20error%20details.%3B45%3B50%20JBO002_HCMP0_A.rrd

When show.cgi attempt to read this file ... "became crazy" and give the error

JavaScript is disabled.
nagiosgraph.js is not installed or wrong version

I disabled the check and I removed the file and now ALL WORK FINE !!!
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by tmcdonald »

The only bad character I could think of would be a | or possibly a ; or ! in the wrong spot.
Former Nagios employee
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by mksmr »

Just wondered if this could be a pointer:

Code: Select all

# tail -f /var/log/httpd/error_log

[Mon Oct 24 16:42:46.818165 2016] [cgi:error] [pid 21318] [client 192.168.1.120:56563] AH01215: Mon Oct 24 16:42:46 2016 showgraph.cgi 50910 critical Cannot write to '/var/nagios/nagiosgraph-cgi.log', using STDERR instead, referer: http://monitor/nagios/cgi-bin/show.cgi?host=09XXXXX&service=FS
As a matter of fact, the corresponding file var/nagios/nagiosgraph-cgi.log had been moved. I have replaced it now, waiting for more tries to write to the file.
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by dwhitfield »

Do you get this error with JS allowed in the browser or only when it is disabled? I am assuming when it is disabled, but wondering because of
Both error messages did not show up in Firefox on OpenBSD.
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by mksmr »

dwhitfield wrote:wondering because of
Both error messages did not show up in Firefox on OpenBSD.
Just checked that out... it's wrong. It DOES appear in BSD too. Sorry about the confusion.
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by rkennedy »

Are your performance handlers setup for the new paths? Perhaps a grep -R 'nagiosgraph-cgi.log' / may help to identify what's writing improperly.
Former Nagios Employee
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by mksmr »

The file had been deleted altogether with the assumption that a new one would be created - which hasn't happened. I have created a new empty file in the same place now. Strange enough, it's size is still zero and Nagios apparently hasn't attempted to write to it yet. At least it hasn't complained about the missing file in 12 hours. Strange...
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by mksmr »

Raised the debug level and nagiosgraph-cgi.log is now being written to. This problem was unrelated. The error messages

Code: Select all

JavaScript is disabled.
nagiosgraph.js is not installed or wrong version.
remain.
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by rkennedy »

What are the properties on the file? You should be able to check with ls -al nagiosgraph-cgi.log.

Have you tried reinstalling nagiosgraph, and verifying all of the settings once again at all?
Former Nagios Employee
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

Re: Nagiosgraph: JavaScript is disabled. nagiosgraph.js is n

Post by mksmr »

What are the properties on the file?
I think the trouble with that file was a dead end altogether and it's not related to the original problem. It's been fixed, but the original problem remains.

Currently I'm a bit stuck now, and indeed close to dumping the whole thing altogether and rebuilding it from scratch. Still I wonder what's wrong. I am very positive that I never changed anything in the configuration. Maybe a background package update broke something. What's really confusing is that so far I cannot see anything in any logfile I'm aware of. The way I see it, it should be running. It just isn't.
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
Locked