Customizing CGIs
Hendrik Baecker
b00mer at gmx.net
Mon Apr 11 09:11:01 CEST 2005
Hi all,
I have some Problem with customizing my trends.cgi.
My boss wants the first assumed state to be the best. So for Hosts &
Services it should be "Host UP" and "Service OK" State without clicking
the drop down boxes on the Website.
In trends.c I've found:
**near line 467**
if(display_type==DISPLAY_HOST_TRENDS){
printf("<input type='hidden' name='initialassumedservicestate'
value='%d'>",initial_assumed_service_state);
printf("<select name='initialassumedhoststate'>\n");
printf("<option value=%d
%s>Unspecified\n",AS_NO_DATA,(initial_assumed_host_state==AS_NO_DATA)?"SELECTED":"");
printf("<option value=%d %s>Current
State\n",AS_CURRENT_STATE,(initial_assumed_host_state==AS_CURRENT_STATE)?"SELECTED":"");
printf("<option value=%d %s>Host
Up\n",AS_HOST_UP,(initial_assumed_host_state==AS_HOST_UP)?"SELECTED":"");
printf("<option value=%d %s>Host
Down\n",AS_HOST_DOWN,(initial_assumed_host_state==AS_HOST_DOWN)?"SELECTED":"");
printf("<option value=%d %s>Host
Unreachable\n",AS_HOST_UNREACHABLE,(initial_assumed_host_state==AS_HOST_UNREACHABLE)?"SELECTED":"");
I think out of this source the weboutput is being generated, can someone
tell me what I have to do to set "Host_Up" as selected?
Best regards
Hendrik
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list