Sorting of the Status's

Joseph Hardeman jwhardeman at gmail.com
Tue Feb 14 13:57:29 CET 2006


Greetings,

I see that there are 8 different ways to sort the status page.  I want to be
able to sort by Aliases.

I have added a 9th way, SORT_ALIAS to the include/cgiutils.h and recompiled
the cgis.  I then modified the status.c to display the following lines:

LINE 1554
 printf("<TD align=left valign=center CLASS='status%s'><A
HREF='%s?type=%d&host=%s'>%s</A></TD>\n",host_status_bg_class,EXTINFO_CGI,DISPLAY_HOST_INFO,url_encode(temp_status->host_name),temp_host->alias);


LINE 1999
printf("<TD align=left valign=center CLASS='status%s'><A
HREF='%s?type=%d&host=%s'>%s</A> </TD>\n",status_class,EXTINFO_CGI,DISPLAY_HOST_INFO,url_encode(temp_status->host_name),temp_host->alias);

(((Changed from temp_status->host_name to temp_host->alias)))

This displays the Alias but it is still being sorted by host_name.  When I
checked all SORT_HOSTNAME to SORT_ALIAS I do not get an error, but it is
still only sorting by hostname.  What am I missing to get it to sort by host
name.  All of our devices are lower case and I want to be able to change the
Aliases to the first several characters to upper case so they will be
displayed at the top of the list as they are our servers.  Other wise I will
have to modify several hundred scripts to send to Nagios with the hostname
as upper case.

Any help will be appreciated.  Thanks

Joseph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20060214/c9bfe259/attachment.html>


More information about the Developers mailing list