[Nagios-devel] patch for status.cgi drawing only 6 entries per row

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
Guest

[Nagios-devel] patch for status.cgi drawing only 6 entries per row

Post by Guest »

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C1B557.24492480
Content-Type: text/plain;
charset="iso-8859-1"

Hi,

We found the limit of only 6 services per row of each table in the nagios
status.cgi screen pretty annoying, so here is a small patch to make the
number configurable from the cgi configuration file.

Apply the diffs to cgi/status.c and cgi/cgiutils.c then recompile, you dont
need to reinstall everything, just copy the resulting status.cgi file over
the old one.

Apologies if the diff doesn't work in Linux, Aix's diff is pretty
non-standard, its fairly small though so adding by hand shouldnt be a
problem.

After you apply the patch, just add the line below to your cgi config file
(eg cgi.cfg).

max_services_per_row=20

I comfortably get about 15 items per line using 1024x768 screen resolution.

Ewan


------_=_NextPart_000_01C1B557.24492480
Content-Type: application/octet-stream;
name="status.c.diff"
Content-Disposition: attachment;
filename="status.c.diff"

162a163
> extern int max_services_per_row;
2582d2582
int max_services_per_row=6;
261a263,268
> else if(strstr(input_buffer,"max_services_per_row=")==input_buffer){
> temp_buffer=strtok(input_buffer,"=");
> temp_buffer=strtok(NULL,"\x0");
> max_services_per_row=atoi((temp_buffer==NULL)?"10":temp_buffer);
> }
>
------_=_NextPart_000_01C1B557.24492480--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ejl@man.fwltech.com
Locked