Is there a way I can customize the cgis without crippling the program? The boss has decided that it’s not “pretty” enough for the clients, and I need to remove these links and move this over there and on and on. So far all I’ve tried to do is change the nagios.org link to the company’s address and that crashes the cgis.
Is customization not an option? Or am I going about this the wrong way.
Are things not pretty enough for the clients via the web interface? Did your boss not like the look of Nagios, or is it the layout? I installed the image pack addon that you can get, and it makes Nagios look a lot better (IMHO), though it doesn’t necessarily change the placement of links and whatnot.
I install Nagios-nuvola and that earned me a pat on the back and almost guaranteed me a promotion ( It’s amazing what people will believe ). That makes it look very pretty, but with clients looking at the page we don’t want them going to nagios.org and wondering why they’re paying us so much money when they can do it themselves.
Additionally in the host information section, they want me to remove a lot of those buttons like “Disable notifications for this host” or “Schedule Downtime” because we don’t want them clicking on those and wondering why we’re dissallowing them access to their own routers when a lot of them are morons and would mess everything up if we gave them access.
I’ve figured out how to remove the “Status Map” link, because it’s not pretty at all when you can only see the routers you’re listed as a contact for and you end up with gigantic amounts of blank space where the other clients routers/servers are.
Yeah, I guess that was a bit of a shot in the dark. I don’t know as much as I thought I did about the cgis…that, and I didn’t read your problem clearly enough. So I’m editing this comment because of the ignorance it showed. Edited Wed Dec 28 2005, 08:12PM ]
[Edited to remove references to the previous post because I’m just glad someone was coming up with some ideas to solve my problem]
If the .cgis were straight HTML I could puzzle through it ( I probably know less HTML than you do, but I’m good with puzzles ), but they’re compiled and therefore 90% unreadable by humans…
Hrm, if I could figure out how they were compiled, perhaps I could find a way to decompile them? Edited Wed Dec 28 2005, 08:17PM ]
i’ve changed the main nagios screen… not much (stuff like changing font size and colors in the main screen) but possibly worth a try and could give some ideas.
You need to modify the c files and then “make” the single file you modified…
the c file calls the function printf and gives some parameters like the hostname number of down hosts and so on) so if you want to move things around you will need to move these printf functions around. If you only need to change font and colors you can even try to work only on the CSS files which are in one of the /nagios/share subdirectories.
Keeping a working copy of the original c and compiled files helps a lot
Wow…you know, I’ve looked through the c files myself, and figured out that that’s how they’re compiled…but I forgot. Can’t believe it. Ah, well. That’s why there are people like Luca around.
Thanks! I’m 90% certain I can move the code around in these c files to do exactly what I want. But you caught me on one point, I have no idea how to “make” two or three c files without recompiling the whole program. But that doesn’t matter as long as I don’t erase the share folder or the etc folder I’ll be golden.
It works! I definately don’t trust myself to be able to move bits around in the program, but by liberal use of Vim’s search feature I found the bits of text I needed and removed them. Then I recompiled with a “make cgis” and moved the new .cgis to /usr/local/nagios/sbin and they came up happy as a clam.
PS: if you want to move code around just try it. keep the original c file and have a go… just type make and the filename without .c to recompile the single cgi Edited Fri Dec 30 2005, 09:34AM ]