[Nagios-devel] 2 minor usibility patches - status.cgi and

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] 2 minor usibility patches - status.cgi and

Post by Guest »

This is a multi-part message in MIME format.
--------------050103020201080705050306
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8; format=flowed

Hi Ethan, hi list,

attached you'll find 2 minor patches for the nagios cgis.

status_ip_alias.diff adds an extension to the last patch i provided.=20
Additional to the IP, the mouseover on a hostname on status.cgi now also =

shows the alias of the host, making it easier to identify.

extinfo_parents.diff adds the hosts parents to a host detail view. At=20
present, the only possibility to get the parents of a host is by=20
choosing the status map (correct me if i'm wrong?!). At it is unusable=20
for me (~750 Hosts =3D> overlapping), i needed another way to get a hosts=
=20
parents.

Hope this is useful for some of you!

Regards,

Marcus Fleige
Systems Engineer

--
Rhenus Assets & Services GmbH & Co. KG
ServiceCenter IT
Rhenus-Platz 1 - Am Airport Dortmund
D-59439 Holzwickede

Telefon +49 (0)2301 29-1497
Telefax +49 (0)2301 29-17497
Mobil +49 (0)175 1846497
E-Mail [email protected]
Internet http://www.rhenus.com

Sitz: Holzwickede, AG Hamm, HRA 2493; PhG: Rhenus Assets & Services
Verwaltungs GmbH, AG Hamm, HRB 4203; Gesch=C3=A4ftsf=C3=BChrer: Frank B=C3=
=B6schemeier,
Michael Brockhaus, Petra Finke, Dr. Sven Rutkowsky, Karl-Heinz Strobelt

--------------050103020201080705050306
Content-Transfer-Encoding: 7bit
Content-Type: text/x-diff;
name="extinfo_parents.diff"
Content-Disposition: inline;
filename="extinfo_parents.diff"

diff -Naur nagios-3.0.2/cgi/extinfo.c nagios-3.0.2-patched/cgi/extinfo.c
--- nagios-3.0.2/cgi/extinfo.c 2008-01-24 03:51:30.000000000 +0100
+++ nagios-3.0.2-patched/cgi/extinfo.c 2008-06-17 16:16:38.000000000 +0200
@@ -136,6 +136,7 @@
char temp_buffer[MAX_INPUT_BUFFER]="";
char *processed_string=NULL;
host *temp_host=NULL;
+ hostsmember *temp_hostsmember=NULL;
hostgroup *temp_hostgroup=NULL;
service *temp_service=NULL;
servicegroup *temp_servicegroup=NULL;
@@ -338,8 +339,24 @@
if(found==FALSE)
printf("No hostgroups");
printf("\n");
- printf("%s\n",temp_host->address);
+ printf("%s\n\n",temp_host->address);
}
+
+ found=FALSE;
+ printf("Parent Host(s):\n\n");
+ if(temp_host->parent_hosts==NULL)
+ printf("None (This is a root host)\n");
+ else {
+ printf("\n");
+ for(temp_hostsmember=temp_host->parent_hosts;temp_hostsmember!=NULL;temp_hostsmember=temp_hostsmember->next){
+ if(found==TRUE)
+ printf(", ");
+ printf("%s\n",EXTINFO_CGI,DISPLAY_HOST_INFO,url_encode(temp_hostsmember->host_name),temp_hostsmember->host_name);
+ found=TRUE;
+ }
+ }
+ printf("\n\n");
+
if(display_type==DISPLAY_SERVICE_INFO){
printf("Service%sOn Host\n",service_desc);
printf("%s\n",temp_host->alias);

--------------050103020201080705050306
Content-Transfer-Encoding: 7bit
Content-Type: text/x-diff;
name="status_ip_alias.diff"
Content-Disposition: inline;
filename="status_ip_alias.diff"

diff -Naur nagios-3.0.2/cgi/status.c nagios-3.0.2-patched/cgi/status.c
--- nagios-3.0.2/cgi/status.c 2008-02-26 16:58:32.000000000 +0100
+++ nagios-3.0.2-patched/cgi/status.c 2008-06-17 15:49:06.000000000 +0200
@@ -1568,7 +1568,7 @@
printf("\n");
printf("\n");
printf("\n");
- printf("%s\n",host_status_bg_class,EXTINFO_CGI,DISPLAY_HOST_INFO,url_encode(temp_status->host_name),temp_host->address,temp_status->host_name);
+ printf("%s\n",host_status_bg_class,EXTINFO_CGI,DISPLAY_HOST_INFO,url_encode(temp_stat

...[email truncated]...


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