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.
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 »

mksmr wrote: I'm a bit stuck now, and indeed close to dumping the whole thing altogether and rebuilding it from scratch.
I'm not sure how many graphing tools you looked at, but http://oss.oetiker.ch/rrdtool/ seems to be releasing more often...or at least more recently. It might be worth a look if you are going to start over.

This is not to say we can't continue to help with the nagiosgraph issue. It's just that since it is not our product, it is hard for us to support.
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:It's just that since it is not our product, it is hard for us to support.
That's understood. After all it clearly isn't a problem with Nagios itself.
Looking at other solutions might be worth a try. I have a dislike for things that break silently.
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 »

Could you PM me the HTML output of the page showing the error? If there's nothing that needs to be scrubbed, you could just post it in the thread (or scrub it).
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:Could you PM me the HTML output of the page showing the error? If there's nothing that needs to be scrubbed, you could just post it in the thread (or scrub it).
This is a screenshot of a typical page (note the blank spaces in the selector box in the upper right - apart from that, the page is working).
nagios-screenshot-4.png
I can only post a snippet of the file because
Your message contains 211746 characters. The maximum number of allowed characters is 60000.
This seems to be relevant:

Code: Select all

<script type="text/javascript" src="/nagios/nagiosgraph.js"></script>
<div id="js_disabled" style="font-family: sans-serif; font-size: 0.8em; padding: 0.5em; background-color: #fff6f3; border: solid 1px #cc3333; margin-bottom: 1.5em;">JavaScript is disabled.</div>
<div id="js_version_1.7" style="font-family: sans-serif; font-size: 0.8em; padding: 0.5em; background-color: #fff6f3; border: solid 1px #cc3333; margin-bottom: 1.5em;">nagiosgraph.js is not installed or wrong version.</div>
The first line calls nagiosgraph.js; in my case, the URI is http ://mymachine/nagios/nagiosgraph.js, which IS present and can be displayed in a browser when called directly.

Edit: file attached, with extension changed from .html to .txt
Attachments
heimdal-eno16777984.txt
(112.46 KiB) Downloaded 214 times
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 »

I poked around for weird javascript issues and the below suggestions seem to be working for people. You may already have done these things, but going back through the thread I didn't see mention of them.

Clear the cache and the cookies from sites that cause problems.

"Clear the Cache":

Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"

"Remove Cookies" from sites causing problems:

Tools > Options > Privacy > Cookies: "Show Cookies"

Start Firefox in Safe Mode (https://support.mozilla.org/en-US/kb/tr ... -safe-mode) to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).

Don't make any changes on the Safe mode start window.
https://support.mozilla.com/kb/Safe+Mode
https://support.mozilla.com/kb/Troubles ... and+themes

Firefox is also on version 49 now, so maybe upgrading will help. You might also try a different browser, such as Chromium (or Chrome, or Opera or whatever).

Please let us know if any of the above solves your issue.
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: Please let us know if any of the above solves your issue.
It's not a local issue. The problem is present with any computer, any OS, any browser. I wrote earlier that it wouldn't appear on a local machine running OpenBSD; that was wrong. It does appear there, too.
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 »

You're still on 4.1.1, right? Can you upgrade to 4.2.2? That way we can make sure if there's a bug that it still exists. Here are the instructions for upgrading: https://assets.nagios.com/downloads/nag ... ading.html
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:You're still on 4.1.1, right? Can you upgrade to 4.2.2?
Done. The problem persists. I think it's fair to say that Nagios itself is out. Must be something else... :?
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 »

I mentioned rrdtool earlier in the thread, but have you looked at PNP4Nagios? I know some people that were not satisfied with nagiosgraph moved to PNP4Nagios. Of course, their use case may be different.
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:have you looked at PNP4Nagios?
For a couple of reasons (systemd, among others), I am indeed thinking about abandoning Linux altogether in favour of OpenBSD. OpenBSD 6.0 comes with PNP4Nagios, but with an apparently buggy Nagios version (4.0.8).
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
Locked