Page 1 of 1
Nagiosgraph: how to select multiple graphs
Posted: Tue Feb 28, 2017 5:52 am
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.
And this is how it should be:

- 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
Re: Nagiosgraph: how to select multiple graphs
Posted: Tue Feb 28, 2017 6:00 pm
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.
Re: Nagiosgraph: how to select multiple graphs
Posted: Fri Mar 03, 2017 6:29 am
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...
Re: Nagiosgraph: how to select multiple graphs
Posted: Fri Mar 03, 2017 9:15 am
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.
Re: Nagiosgraph: how to select multiple graphs
Posted: Fri Mar 03, 2017 11:41 am
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.
Re: Nagiosgraph: how to select multiple graphs
Posted: Wed Nov 15, 2017 5:49 am
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
Re: Nagiosgraph: how to select multiple graphs
Posted: Wed Nov 15, 2017 5:18 pm
by dwhitfield
Thanks
@tmdoit!
@mksmr, are you still having issues with this?