Nagiosgraph: how to select multiple graphs

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.
Locked
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

Nagiosgraph: how to select multiple graphs

Post by mksmr »

I realize this is not directly Nagios related, but the nagiosgraph forum is virtually dead for practical purposes and chances are that the question can be answered here.

This relates to version 1.5.2.

Probably a simple thing... it used to be possible to select graphs by left-clicking on their names in the upper right window of a nagiosgraph-page while holding ctrl on the keyboard. When you open a graph window, all graphs are shown by default. I. e. in a "CPU load" window you can pick only "load1" and "load5" to view them, with the mouse while holding ctrl, which makes all other graphs disappear.

After setting up nagiosgraph from scratch, I can only select one graph exclusivelsy. Holding ctrl and picking another one doesn't work any more. It is working in other installations, on the same client machine and the same browser.
Only one graph can be selected. Selecting another one while holding Ctrl deselects the first.
Only one graph can be selected. Selecting another one while holding Ctrl deselects the first.
And this is how it should be:
Same client PC, same browser, different installation (but same Nagiosgraph version): selecting multiple graphs is working here.
Same client PC, same browser, different installation (but same Nagiosgraph version): selecting multiple graphs is working here.
What do I need to set, and in which config file? Diff'ing the config files (I'm aware of) has not revealed anything.

TIA
Matthias
Hulluna humpasta taas
Minä olen hulluna humpasta taas
Minen toivu koskaan, luotan voimaan votkan
Hulluna humpasta taas
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Nagiosgraph: how to select multiple graphs

Post by mcapra »

Unfortunately, since it's not our product we are very limited in the sort of solutions we can give. All I can say is that, on a fresh installation of nagiosgraph on top of Nagios Core 4.3.1, I was able to replicate this behavior of not being able to select multiple data sets.

On my install, it looks as if the underlying html is using <select> when it probably should be using <select multiple>. You might try re-compiling whatever CGI produces the overlay window with that in mind.
Former Nagios employee
https://www.mcapra.com/
mksmr
Posts: 55
Joined: Thu Sep 22, 2016 7:17 am

Re: Nagiosgraph: how to select multiple graphs

Post by mksmr »

I've diff'ed the following cgi files:

Code: Select all

export.cgi
show.cgi
showconfig.cgi
showgraph.cgi
showgroup.cgi
showhost.cgi
showservice.cgi
testcolor.cgi
with those from a working installation. They appear to be identical. They are working on CentOS 7, but are not working on Debian 8. Must be something else...
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: how to select multiple graphs

Post by rkennedy »

If it's working fine on Cent7, I would check all packages installed on the machine and see if the similar ones are installed on the Debian machine.

I've also seen in the past, differences in the modules loaded by apache be the cause of this. Might be worth diffing these too.
Former Nagios Employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagiosgraph: how to select multiple graphs

Post by dwhitfield »

In addition to what @rkennedy said, Debian appears to have a newer version of Apache. They are both the 2.4.x series, so I wouldn't imagine things would be that different, but it is a place where you might be able to do some digging around the <select> mentioned earlier.
tmdoit
Posts: 1
Joined: Wed Nov 15, 2017 5:43 am

Re: Nagiosgraph: how to select multiple graphs

Post by tmdoit »

Change nagiosgraph/etc/ngshared.pm:2460 (dataset selection)
from:

Code: Select all

$cgi->td($cgi->popup_menu(-name => 'db', -values => [], -size => DBLISTROWS, -multiple => 1)), "\n",
to:

Code: Select all

$cgi->td($cgi->popup_menu(-name => 'db', -values => [], -size => DBLISTROWS, -multiple)), "\n",

Change nagiosgraph/etc/ngshared.pm:2467 (period selection)
from:

Code: Select all

$cgi->td($cgi->popup_menu(-name => 'period', -values => [@PERIOD_KEYS], -labels => \%period_labels, -size => PERIODLISTROWS, -multiple => 1)), "\n",
to:

Code: Select all

$cgi->td($cgi->popup_menu(-name => 'period', -values => [@PERIOD_KEYS], -labels => \%period_labels, -size => PERIODLISTROWS, -multiple)), "\n",
https://gist.github.com/tmdoit/98dd1117 ... e1e906a387
Last edited by tmdoit on Fri Nov 17, 2017 4:57 am, edited 1 time in total.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagiosgraph: how to select multiple graphs

Post by dwhitfield »

Thanks @tmdoit!

@mksmr, are you still having issues with this?
Locked