PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|Code_Examples|C|nagios-2.9|cgi|statuswml.c =

page 1 of 15



/**************************************************************************
 *
 * STATUSWML.C -  Nagios Status CGI for WAP-enabled devices
 *
 * Copyright (c) 2001-2007 Ethan Galstad (nagios@nagios.org)
 * Last Modified: 01-18-2007
 *
 * License:
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *************************************************************************/

#include "../include/config.h"
#include "../include/common.h"
#include "../include/objects.h"
#include "../include/statusdata.h"

#include "../include/cgiutils.h"
#include "../include/getcgi.h"
#include "../include/cgiauth.h"

extern time_t          program_start;

extern char main_config_file[MAX_FILENAME_LENGTH];

extern host *host_list;
extern hostgroup *hostgroup_list;
extern service *service_list;
extern hoststatus *hoststatus_list;
extern servicestatus *servicestatus_list;

extern int      enable_notifications;
extern int      execute_service_checks;
extern int      nagios_process_state;

extern char     *ping_syntax;

#define DISPLAY_HOST		        0
#define DISPLAY_SERVICE                 1
#define DISPLAY_HOSTGROUP               2
#define DISPLAY_INDEX                   3
#define DISPLAY_PING                    4
#define DISPLAY_TRACEROUTE              5
#define DISPLAY_QUICKSTATS              6
#define DISPLAY_PROCESS                 7
#define DISPLAY_ALL_PROBLEMS            8
#define DISPLAY_UNHANDLED_PROBLEMS      9

#define DISPLAY_HOSTGROUP_SUMMARY       0
#define DISPLAY_HOSTGROUP_OVERVIEW      1

#define DISPLAY_HOST_SUMMARY            0
#define DISPLAY_HOST_SERVICES           1

void document_header(void);
void document_footer(void);
int process_cgivars(void);

int display_type=DISPLAY_INDEX;
int hostgroup_style=DISPLAY_HOSTGROUP_SUMMARY;
int host_style=DISPLAY_HOST_SUMMARY;

void display_index(void);
void display_host(void);
void display_host_services(void);
void display_service(void);
void display_hostgroup_summary(void);
void display_hostgroup_overview(void);
void display_ping(void);
void display_traceroute(void);
void display_quick_stats(void);
void display_process(void);
void display_problems(void);

char *host_name="";
char *hostgroup_name="";
char *service_desc="";
char *ping_address="";
char *traceroute_address="";

int show_all_hostgroups=TRUE;


authdata current_authdata;



int main(void){
	int result=OK;
=1=

= PAGE 1 = NEXT > |2|3|4|5|6|7|8|9|10.15

UP TO ROOT | UP TO DIR

Google
 


E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.27827 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU)