[Nagios-devel] Re: Re: Sorting of the Status's

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] Re: Re: Sorting of the Status's

Post by Guest »

------=_Part_13755_3498947.1140099467398
Content-Type: multipart/alternative;
boundary="----=_Part_13756_19437917.1140099467398"

------=_Part_13756_19437917.1140099467398
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Ethan,

Thanks. Here is the diff, I thought I had sent it on my last post. I trie=
d
to clean the excess junk out. After make the couple of modes, I ran
./configure in the main folder for both instances of nagios. I am wanting
to display the Alias for the hosts, which I have done. But I am also
wanting to have the inital load of the page display the Aliases in
descending order, but with Capitalized ones first, like Nagios does for the
hostnames. I am still looking through the files to see if I can find where
the sort order is defined.

Again, thanks everyone.

Joseph

------=_Part_13756_19437917.1140099467398
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Ethan,Thanks.  Here is the diff, I thought I had sent it on my=
last post.  I tried to clean the excess junk out.  After make th=
e couple of modes, I ran ./configure in the main folder for both instances =
of nagios.  I am wanting to display the Alias for the hosts, which I h=
ave done.  But I am also wanting to have the inital load of the page d=
isplay the Aliases in descending order, but with Capitalized ones first, li=
ke Nagios does for the hostnames.  I am still looking through the file=
s to see if I can find where the sort order is defined. =20
Again, thanks everyone.Joseph

------=_Part_13756_19437917.1140099467398--

------=_Part_13755_3498947.1140099467398
Content-Type: application/octet-stream; name=nagios-sort-alias.diff
Content-Transfer-Encoding: 7bit
X-Attachment-Id: f_ejr5rjlz
Content-Disposition: attachment; filename="nagios-sort-alias.diff"

diff -urN nagios-2.0b6/cgi/status.c nagios-patched/cgi/status.c
--- nagios-2.0b6/cgi/status.c 2005-11-16 03:49:35.000000000 -0500
+++ nagios-patched/cgi/status.c 2006-02-14 09:48:15.000000000 -0500
@@ -161,7 +161,7 @@


int sort_type=SORT_NONE;
-int sort_option=SORT_HOSTNAME;
+int sort_option=SORT_ALIAS;

int problem_hosts_down=0;
int problem_hosts_unreachable=0;

@@ -1264,7 +1264,7 @@

if(use_sort==TRUE){
printf("Entries sorted by ");
- if(sort_option==SORT_HOSTNAME)
+ if(sort_option==SORT_ALIAS)
printf("host name");
else if(sort_option==SORT_SERVICENAME)
printf("service name");


@@ -1336,7 +1336,7 @@
printf("\n");
printf("\n");

- printf("Host ",temp_url,SORT_ASCENDING,SORT_HOSTNAME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_HOSTNAME,url_images_path,DOWN_ARROW_ICON);
+ printf("Host ",temp_url,SORT_ASCENDING,SORT_ALIAS,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_ALIAS,url_images_path,DOWN_ARROW_ICON);

printf("Service ",temp_url,SORT_ASCENDING,SORT_SERVICENAME,url_images_path,UP_ARROW_ICON,temp_url,SORT_DESCENDING,SORT_SERVICENAME,ur

...[email truncated]...


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