Page 1 of 1

Question regarding editing the CGIs

Posted: Fri Jul 25, 2014 11:44 am
by logic_bomb421
I'm just curious what direction I would need to go in to add another option to the navbar on the left that combines host groups and service groups? I know it pulls all the info from status.cgi, and then the stylesheets format everything. Is this something that can be done easily?

Thanks!

Re: Question regarding editing the CGIs

Posted: Fri Jul 25, 2014 1:39 pm
by sreinhardt
You would have to modify the C source and recompile the cgi's at the very least. Is it impossible, not at all, but it certainly is not extremely easy and definitely prone to introducing more issues.

Re: Question regarding editing the CGIs

Posted: Tue Jul 29, 2014 5:30 pm
by logic_bomb421
Alright.

Is it at least feasible to modify the cgi's/stylesheets so the font/graph/chart sizes are bigger? Ultimately we want this information visible from ~10 feet in a display on the wall.

Re: Question regarding editing the CGIs

Posted: Wed Jul 30, 2014 2:20 pm
by tmcdonald
I believe the stylesheets are named after the CGI they are used by, so /usr/local/nagios/share/stylesheets/status.css is probably what you would need to modify. However not being a UI guy I can't say for sure what you would need to change. Looks like a lot of the sizes are the same though, so a sed replace should speed things up.

What core version are you on?

Re: Question regarding editing the CGIs

Posted: Wed Jul 30, 2014 5:59 pm
by logic_bomb421
I'm currently on version 4.0.7.

I was playing around with some of those stylesheets yesterday and, while some things are pretty obvious (like font sizes), others seem pretty obscure. I can't seem to figure out how to make the overall 'chart' itself bigger.

Re: Question regarding editing the CGIs

Posted: Thu Jul 31, 2014 10:37 am
by tmcdonald
That might be a tricky one. Zooming is not always straight-forward. I played around with it a bit and while I was able to zoom with some browser-specific hacks (for Firefox) the scaling would often overlap other elements:

http://stackoverflow.com/questions/1027 ... -do-in-css
http://css-tricks.com/almanac/selectors/d/descendant/