<div><div><br>Andreas,<br><br>I have attached my diff.  I modified the status.c and the cgiutils.h files, I am fairly sure I am missing something simple.  I am wanting any aliases that are capitalized to be at the top of the list and the non capitalized aliases below them.  This will allow the help desk to see the primary servers and routers at the sites before seeing the access points.  Will make it easier for them to see if a server or possibly circuit is down if the router is also down.
<br><br>I have done very limited c scripting.  Mostly just looking though and modifying c programs before I compile them if they need to be.  Most of its been with nagios over the years.  Mostly I work in shell, perl or php.
<br><br>Thanks for all of your help.<br><br>Joseph<br><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>> Greetings,<br>>>
<br>>> I see that there are 8 different ways to sort the status page.  I want to be<br>>> able to sort by Aliases.<br>>><br>>> I have added a 9th way, SORT_ALIAS to the include/cgiutils.h and recompiled
<br>>> the cgis.<br>><br>><br>>Exactly how did you do to add this to include/cgiutils.h without<br>>modifying the sorting algorithm in status.c as well?<br>><br>>Do like this:<br>><br>>Download the 
nagios-2.0.tar.gz file to $HOME/patch<br>>Run the following commands<br>><br>>$ cd $HOME/patch<br>>$ tar xvzf nagios-2.0.tar.gz<br>>$ mv nagios-2.0 nagios-2.0.patched<br>>$ tar xvzf nagios-2.0.tar.gz<br>
>$ cd nagios-2.0.patched<br>><br>>Make your modifications to whatever files you did, and then do this:<br>><br>>$ cd $HOME/patch<br>>$ diff -urN nagios-2.0 nagios-2.0.patched > nagios-sort-alias.diff<br>
><br>>Send nagios-sort-alias.diff to this list and I'll have a look at it for you.<br>><br>><br>>>  I then modified the status.c to display the following lines:<br>>><br>>> LINE 1554<br>>>  printf("<TD align=left valign=center CLASS='status%s'><A
<br>>> 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);<br>>><br>>><br>>> LINE 1999
<br>>> printf("<TD align=left valign=center CLASS='status%s'><A<br>>> HREF='%s?type=%d&host=%s'>%s</A>&nbsp;</TD>\n",status_class,EXTINFO_CGI,DISPLAY_HOST_INFO,url_encode(temp_status->host_name),temp_host->alias);
<br>>><br>>> (((Changed from temp_status->host_name to temp_host->alias)))<br>>><br>>> This displays the Alias but it is still being sorted by host_name.  When I<br>>> checked all SORT_HOSTNAME to SORT_ALIAS I do not get an error, but it is
<br>>> still only sorting by hostname.  What am I missing to get it to sort by host<br>>> name.<br>><br>><br>>Judging from your description; something fairly elementary. How much<br>>C-code have you written earlier?
<br><br></blockquote></div><br>