[Nagios-devel] Minor Patch to show Host IPs in status.cgi

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] Minor Patch to show Host IPs in status.cgi

Post by Guest »


--------------050305040207050303030504
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=UTF-8; format=flowed

Hi List,

I recently modfied the status.c(gi) file to satisfy our needs at work.
As we mainly handle our monitoring by the "Service Problems"- and "Host
Groups"- View, we realized it would be nice to have the address of the
problem hosts in the view to save one click and keep the problem view in
the foreground.

Therefore, i modified the html output and added a 'title'-attribute to
the host link, filled with the value of 'temp_host->address'. Most
Browsers pop up this title on mouseover over the hostname.

I tested this with

Linux:
- Opera 9.10
- Firefox 2.0.0.2
- Konqueror 3.5.5

Windows:
- Opera 9.00
- Firefox 2.0.0.3
- IE 6.0

without problems.

I know this is only a _very_ minor change, but it's useful for us and
maybe others find this helpful, too. As I'm not very familar with
C-coding or posting to devel-lists, comments are welcome. :-)

Regards,

Marcus Fleige


--
EOF

--------------050305040207050303030504
Content-Type: text/plain;
name="status-cgi.diff"
Content-Disposition: inline;
filename="status-cgi.diff"
Content-Transfer-Encoding: quoted-printable

--- nagios-3.0a1/cgi/status.c 2007-01-03 01:09:13.000000000 +0100=0A+++ nag=
ios-3.0a1-patched/cgi/status.c 2007-03-26 11:45:37.000000000 +0200=0A@@ -15=
50,7 +1550,7 @@=0A printf("\n");=0A printf("\n");=0A printf("\n");=
=0A- printf("%s\n",host=5Fstatus=5Fbg=5Fclass,EXTIN=
FO=5FCGI,DISPLAY=5FHOST=5FINFO,url=5Fencode(temp=5Fstatus->host=5Fname),tem=
p=5Fstatus->host=5Fname);=0A+ printf("%s\n",host=5Fstatus=5Fbg=5Fclass,EXTINFO=5FCGI,DISPLAY=5FHOST=5FINFO,url=5F=
encode(temp=5Fstatus->host=5Fname),temp=5Fhost->address,temp=5Fstatus->host=
=5Fname);=0A printf("\n");=0A printf("\n");=0A pri=
ntf("\n");=0A@@ -3406,7 +3406,7 @@=0A =0A printf("\n");=0A printf("\n",status=5Fbg=5Fclass);=0A- printf("%s\n",status=5Fbg=5Fclass,STA=
TUS=5FCGI,url=5Fencode(hststatus->host=5Fname),hststatus->host=5Fname);=0A+=
printf("%s\n",status=5Fbg=5Fclass,STATUS=5FCGI,url=5Fencode(hsts=
tatus->host=5Fname),temp=5Fhost->address,hststatus->host=5Fname);=0A =0A i=
f(temp=5Fhost->icon=5Fimage!=3DNULL){=0A printf("\n",status=5Fbg=5Fclass);=0A

--------------050305040207050303030504--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked