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

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

page 1 of 28



/**************************************************************************
 *
 * CMD.C -  Nagios Command CGI
 *
 * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
 * Last Modified: 02-19-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/comments.h"
#include "../include/downtime.h"

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

extern char main_config_file[MAX_FILENAME_LENGTH];
extern char command_file[MAX_FILENAME_LENGTH];
extern char comment_file[MAX_FILENAME_LENGTH];

extern char url_stylesheets_path[MAX_FILENAME_LENGTH];

extern int  nagios_process_state;

extern int  check_external_commands;

extern int  use_authentication;

extern scheduled_downtime *scheduled_downtime_list;
extern comment *comment_list;

extern int date_format;


#define MAX_AUTHOR_LENGTH	64
#define MAX_COMMENT_LENGTH	1024

#define HTML_CONTENT   0
#define WML_CONTENT    1


char *host_name="";
char *hostgroup_name="";
char *servicegroup_name="";
char *service_desc="";
char *comment_author="";
char *comment_data="";
char *start_time_string="";
char *end_time_string="";

unsigned long comment_id=0;
unsigned long downtime_id=0;
int notification_delay=0;
int schedule_delay=0;
int persistent_comment=FALSE;
int sticky_ack=FALSE;
int send_notification=FALSE;
int force_check=FALSE;
int plugin_state=STATE_OK;
char plugin_output[MAX_INPUT_BUFFER]="";
char performance_data[MAX_INPUT_BUFFER]="";
time_t start_time=0L;
time_t end_time=0L;
int affect_host_and_services=FALSE;
int propagate_to_children=FALSE;
int fixed=FALSE;
unsigned long duration=0L;
unsigned long triggered_by=0L;
int child_options=0;

int command_type=CMD_NONE;
int command_mode=CMDMODE_REQUEST;

int content_type=HTML_CONTENT;

int display_header=TRUE;

authdata current_authdata;

void show_command_help(int);
void request_command_data(int);
void commit_command_data(int);
int commit_command(int);
=1=

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

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.0430632 wallclock secs ( 0.00 usr + 0.01 sys = 0.01 CPU)