diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-php/bartlby.c bartlby-php/bartlby.c --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-php/bartlby.c 2006-12-10 16:57:12.000000000 +0100 +++ bartlby-php/bartlby.c 2007-02-15 17:25:46.000000000 +0100 @@ -15,7 +15,7 @@ | Author: | +----------------------------------------------------------------------+ - $Id: bartlby.c,v 1.52 2006/12/10 15:57:12 hjanuschka Exp $ + $Id: bartlby.c,v 1.57 2007/02/15 16:25:46 hjanuschka Exp $ */ #ifdef HAVE_CONFIG_H @@ -1400,6 +1400,7 @@ int y; int is_down; int current_time; + int current_state; struct service * svcmap; struct worker * wrkmap; @@ -1438,13 +1439,22 @@ add_assoc_long(subarray, "service_id", svcmap[x].service_id); add_assoc_long(subarray, "server_id", svcmap[x].server_id); add_assoc_long(subarray, "last_state", svcmap[x].last_state); - add_assoc_long(subarray, "current_state", svcmap[x].current_state); - add_assoc_long(subarray, "client_port", svcmap[x].client_port); + + + if(svcmap[x].is_server_dead < 0) { + add_assoc_long(subarray, "current_state", -3); + add_assoc_long(subarray, "server_is_dead", 1); + } else { + add_assoc_long(subarray, "current_state", svcmap[x].current_state); + } + + + add_assoc_long(subarray, "client_port", srvmap[svcmap[x].srv_place].client_port); add_assoc_string(subarray, "new_server_text", svcmap[x].new_server_text, 1); add_assoc_string(subarray, "service_name", svcmap[x].service_name, 1); - add_assoc_string(subarray, "server_name", svcmap[x].server_name, 1); - add_assoc_string(subarray, "client_ip", svcmap[x].client_ip, 1); + add_assoc_string(subarray, "server_name", srvmap[svcmap[x].srv_place].server_name, 1); + add_assoc_string(subarray, "client_ip", srvmap[svcmap[x].srv_place].client_ip, 1); add_assoc_string(subarray, "plugin", svcmap[x].plugin, 1); add_assoc_string(subarray, "plugin_arguments", svcmap[x].plugin_arguments, 1); @@ -1452,10 +1462,7 @@ add_assoc_long(subarray, "check_interval_original", svcmap[x].check_interval_original); add_assoc_long(subarray, "last_check", svcmap[x].last_check); - add_assoc_long(subarray, "hour_from", svcmap[x].hour_from); - add_assoc_long(subarray, "min_from", svcmap[x].min_from); - add_assoc_long(subarray, "hour_to", svcmap[x].hour_to); - add_assoc_long(subarray, "min_to", svcmap[x].min_to); + add_assoc_string(subarray, "exec_plan", svcmap[x].service_exec_plan, 1); add_assoc_long(subarray, "notify_enabled", svcmap[x].notify_enabled); add_assoc_long(subarray, "last_notify_send", svcmap[x].last_notify_send); @@ -1468,7 +1475,7 @@ add_assoc_string(subarray, "service_var", svcmap[x].service_var, 1); - add_assoc_string(subarray, "server_icon", svcmap[x].server_icon, 1); + add_assoc_string(subarray, "server_icon", srvmap[svcmap[x].srv_place].server_icon, 1); add_assoc_long(subarray, "service_check_timeout", svcmap[x].service_check_timeout); add_assoc_long(subarray, "service_ack", svcmap[x].service_ack); add_assoc_long(subarray, "service_retain", svcmap[x].service_retain); @@ -1500,6 +1507,7 @@ add_assoc_long(subarray, "server_last_notify_send",srvmap[svcmap[x].srv_place].last_notify_send); add_assoc_long(subarray, "server_notify",srvmap[svcmap[x].srv_place].server_notify); add_assoc_long(subarray, "server_enabled",srvmap[svcmap[x].srv_place].server_enabled); + add_assoc_long(subarray, "server_dead",srvmap[svcmap[x].srv_place].server_dead); @@ -1684,6 +1692,7 @@ pval * enabled_triggers; pval * escalation_limit; pval * escalation_minutes; + pval * notify_plan; void * SOHandle; char * dlmsg; @@ -1694,7 +1703,7 @@ struct worker svc; - if (ZEND_NUM_ARGS() != 11 || getParameters(ht, 11, &bartlby_config,&mail, &icq, &services, ¬ify_levels, &active, &name, &password, &enabled_triggers, &escalation_limit, &escalation_minutes)==FAILURE) { + if (ZEND_NUM_ARGS() != 12 || getParameters(ht, 12, &bartlby_config,&mail, &icq, &services, ¬ify_levels, &active, &name, &password, &enabled_triggers, &escalation_limit, &escalation_minutes, ¬ify_plan)==FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(enabled_triggers); @@ -1706,6 +1715,7 @@ convert_to_string(notify_levels); convert_to_string(name); convert_to_long(active); + convert_to_string(notify_plan); convert_to_long(escalation_limit); convert_to_long(escalation_minutes); @@ -1721,6 +1731,9 @@ strcpy(svc.password, Z_STRVAL_P(password)); strcpy(svc.name, Z_STRVAL_P(name)); + + strcpy(svc.notify_plan, Z_STRVAL_P(notify_plan)); + strcpy(svc.mail, Z_STRVAL_P(mail)); strcpy(svc.icq, Z_STRVAL_P(icq)); strcpy(svc.services, Z_STRVAL_P(services)); @@ -1786,6 +1799,7 @@ pval * enabled_triggers; pval * escalation_limit; pval * escalation_minutes; + pval * notify_plan; void * SOHandle; @@ -1797,7 +1811,7 @@ struct worker svc; - if (ZEND_NUM_ARGS() != 12 || getParameters(ht, 12, &bartlby_config,&worker_id, &mail, &icq, &services, ¬ify_levels, &active, &name, &password, &enabled_triggers, &escalation_limit, &escalation_minutes)==FAILURE) { + if (ZEND_NUM_ARGS() != 13 || getParameters(ht, 13, &bartlby_config,&worker_id, &mail, &icq, &services, ¬ify_levels, &active, &name, &password, &enabled_triggers, &escalation_limit, &escalation_minutes, ¬ify_plan)==FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(enabled_triggers); @@ -1809,6 +1823,8 @@ convert_to_string(notify_levels); convert_to_string(name); convert_to_long(active); + convert_to_string(notify_plan); + convert_to_long(worker_id); convert_to_long(escalation_limit); convert_to_long(escalation_minutes); @@ -1822,6 +1838,7 @@ LOAD_SYMBOL(UpdateWorker,SOHandle, "UpdateWorker"); + strcpy(svc.notify_plan, Z_STRVAL_P(notify_plan)); strcpy(svc.password, Z_STRVAL_P(password)); strcpy(svc.name, Z_STRVAL_P(name)); strcpy(svc.mail, Z_STRVAL_P(mail)); @@ -1882,6 +1899,7 @@ } add_assoc_string(return_value, "mail", svc.mail, 1); add_assoc_string(return_value, "icq", svc.icq, 1); + add_assoc_string(return_value, "notify_plan", svc.notify_plan, 1); add_assoc_string(return_value, "services", svc.services, 1); @@ -2055,12 +2073,11 @@ add_assoc_long(return_value, "server_id", svc.server_id); add_assoc_long(return_value, "last_state", svc.last_state); add_assoc_long(return_value, "current_state", svc.current_state); - add_assoc_long(return_value, "client_port", svc.client_port); + add_assoc_string(return_value, "new_server_text", svc.new_server_text, 1); add_assoc_string(return_value, "service_name", svc.service_name, 1); - add_assoc_string(return_value, "server_name", svc.server_name, 1); - add_assoc_string(return_value, "client_ip", svc.client_ip, 1); + add_assoc_string(return_value, "plugin", svc.plugin, 1); add_assoc_string(return_value, "plugin_arguments", svc.plugin_arguments, 1); @@ -2068,10 +2085,12 @@ add_assoc_long(return_value, "check_interval_original", svc.check_interval_original); add_assoc_long(return_value, "last_check", svc.last_check); - add_assoc_long(return_value, "hour_from", svc.hour_from); - add_assoc_long(return_value, "min_from", svc.min_from); - add_assoc_long(return_value, "hour_to", svc.hour_to); - add_assoc_long(return_value, "min_to", svc.min_to); + add_assoc_string(return_value, "server_name", svc.srv->server_name, 1); + add_assoc_string(return_value, "client_ip", svc.srv->client_ip, 1); + add_assoc_string(return_value, "server_icon", svc.srv->server_icon, 1); + add_assoc_long(return_value, "client_port", svc.srv->client_port); + + add_assoc_string(return_value, "exec_plan", svc.service_exec_plan, 1); add_assoc_long(return_value, "notify_enabled", svc.notify_enabled); add_assoc_long(return_value, "last_notify_send", svc.last_notify_send); @@ -2086,7 +2105,7 @@ add_assoc_string(return_value, "service_var", svc.service_var, 1); - add_assoc_string(return_value, "server_icon", svc.server_icon, 1); + add_assoc_string(return_value, "service_snmp_community", svc.snmp_info.community, 1); add_assoc_string(return_value, "service_snmp_objid", svc.snmp_info.objid, 1); @@ -2101,6 +2120,7 @@ } + free(svc.srv); dlclose(SOHandle); } @@ -2152,7 +2172,7 @@ int (*UpdateService)(struct service *, char *); - pval *service_id, * server_id , * bartlby_config, * plugin, * service_name , * plugin_arguments, * notify_enabled, * hour_from, * hour_to, *min_from, *min_to, *check_interval, *service_type, *service_passive_timeout, *service_var, *service_check_timeout, * service_ack, * service_retain; + pval *service_id, * server_id , * bartlby_config, * plugin, * service_name , * plugin_arguments, * notify_enabled, *exec_plan, *check_interval, *service_type, *service_passive_timeout, *service_var, *service_check_timeout, * service_ack, * service_retain; pval * snmp_community, * snmp_objid, *snmp_version, *snmp_warning, *snmp_critical, *snmp_type; pval * service_active; pval * flap_seconds; @@ -2172,7 +2192,7 @@ svc->service_passive_timeout */ - if(ZEND_NUM_ARGS() != 26 || getParameters(ht, 26, &bartlby_config,&service_id, &server_id, &plugin,&service_name,&plugin_arguments,¬ify_enabled,&hour_from,&hour_to,&min_from,&min_to,&check_interval, &service_type,&service_var,&service_passive_timeout,&service_check_timeout, &service_ack, &service_retain, &snmp_community, &snmp_objid, &snmp_version, &snmp_warning, &snmp_critical, &snmp_type, &service_active, &flap_seconds) == FAILURE) { + if(ZEND_NUM_ARGS() != 23 || getParameters(ht, 23, &bartlby_config,&service_id, &server_id, &plugin,&service_name,&plugin_arguments,¬ify_enabled,&exec_plan,&check_interval, &service_type,&service_var,&service_passive_timeout,&service_check_timeout, &service_ack, &service_retain, &snmp_community, &snmp_objid, &snmp_version, &snmp_warning, &snmp_critical, &snmp_type, &service_active, &flap_seconds) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(bartlby_config); @@ -2184,10 +2204,7 @@ convert_to_long(server_id); convert_to_long(service_check_timeout); - convert_to_long(hour_from); - convert_to_long(hour_to); - convert_to_long(min_from); - convert_to_long(min_to); + convert_to_long(check_interval); convert_to_long(service_type); convert_to_long(service_passive_timeout); @@ -2206,16 +2223,18 @@ convert_to_long(flap_seconds); + convert_to_string(exec_plan); + svc.service_id=Z_LVAL_P(service_id); sprintf(svc.plugin, "%s", Z_STRVAL_P(plugin)); sprintf(svc.service_name, "%s", Z_STRVAL_P(service_name)); sprintf(svc.plugin_arguments, "%s", Z_STRVAL_P(plugin_arguments)); + + sprintf(svc.service_exec_plan, "%s", Z_STRVAL_P(exec_plan)); + svc.notify_enabled=Z_LVAL_P(notify_enabled); - svc.hour_from=Z_LVAL_P(hour_from); - svc.hour_to=Z_LVAL_P(hour_to); - svc.min_from=Z_LVAL_P(min_from); - svc.min_to=Z_LVAL_P(min_to); + svc.server_id=Z_LVAL_P(server_id); svc.service_ack=Z_LVAL_P(service_ack); svc.service_retain=Z_LVAL_P(service_retain); @@ -2268,7 +2287,7 @@ int (*AddService)(struct service *, char *); - pval * server_id , * bartlby_config, * plugin, * service_name , * plugin_arguments, * notify_enabled, * hour_from, * hour_to, *min_from, *min_to, *check_interval, *service_type, *service_passive_timeout, *service_var, * service_check_timeout, * service_ack, * service_retain; + pval * server_id , * bartlby_config, * plugin, * service_name , * plugin_arguments, * notify_enabled, *exec_plan, *check_interval, *service_type, *service_passive_timeout, *service_var, * service_check_timeout, * service_ack, * service_retain; pval * snmp_community, * snmp_objid, *snmp_version, *snmp_warning, *snmp_critical, *snmp_type; pval * service_active; pval * flap_seconds; @@ -2291,7 +2310,7 @@ svc->service_ack */ - if(ZEND_NUM_ARGS() != 25 || getParameters(ht, 25, &bartlby_config, &server_id, &plugin,&service_name,&plugin_arguments,¬ify_enabled,&hour_from,&hour_to,&min_from,&min_to,&check_interval, &service_type,&service_var,&service_passive_timeout, &service_check_timeout, &service_ack, &service_retain, &snmp_community, &snmp_objid, &snmp_version, &snmp_warning, &snmp_critical, &snmp_type, &service_active, &flap_seconds) == FAILURE) { + if(ZEND_NUM_ARGS() != 22 || getParameters(ht, 22, &bartlby_config, &server_id, &plugin,&service_name,&plugin_arguments,¬ify_enabled,&exec_plan,&check_interval, &service_type,&service_var,&service_passive_timeout, &service_check_timeout, &service_ack, &service_retain, &snmp_community, &snmp_objid, &snmp_version, &snmp_warning, &snmp_critical, &snmp_type, &service_active, &flap_seconds) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(bartlby_config); @@ -2299,16 +2318,14 @@ convert_to_string(service_name); convert_to_string(plugin_arguments); convert_to_long(notify_enabled); - convert_to_long(hour_from); - convert_to_long(hour_to); - convert_to_long(min_from); - convert_to_long(min_to); + convert_to_long(check_interval); convert_to_long(service_type); convert_to_long(service_passive_timeout); convert_to_long(server_id); convert_to_long(service_check_timeout); convert_to_string(service_var); + convert_to_string(exec_plan); convert_to_long(service_ack); convert_to_long(service_retain); convert_to_long(service_active); @@ -2324,6 +2341,8 @@ sprintf(svc.plugin, "%s", Z_STRVAL_P(plugin)); + sprintf(svc.service_exec_plan, "%s", Z_STRVAL_P(exec_plan)); + sprintf(svc.service_name, "%s", Z_STRVAL_P(service_name)); sprintf(svc.plugin_arguments, "%s", Z_STRVAL_P(plugin_arguments)); svc.notify_enabled=Z_LVAL_P(notify_enabled); @@ -2335,10 +2354,7 @@ svc.flap_seconds=Z_LVAL_P(flap_seconds); - svc.hour_from=Z_LVAL_P(hour_from); - svc.hour_to=Z_LVAL_P(hour_to); - svc.min_from=Z_LVAL_P(min_from); - svc.min_to=Z_LVAL_P(min_to); + svc.service_check_timeout=Z_LVAL_P(service_check_timeout); @@ -2385,6 +2401,7 @@ pval * server_enabled; pval * server_flap_seconds; pval * server_notify; + pval * server_dead; void * SOHandle; char * dlmsg; @@ -2395,7 +2412,7 @@ struct server srv; - if (ZEND_NUM_ARGS() != 8 || getParameters(ht, 8, &bartlby_config,&server_name, &server_ip, &server_port, &server_icon, &server_enabled, &server_notify, &server_flap_seconds)==FAILURE) { + if (ZEND_NUM_ARGS() != 9 || getParameters(ht, 9, &bartlby_config,&server_name, &server_ip, &server_port, &server_icon, &server_enabled, &server_notify, &server_flap_seconds, &server_dead)==FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(bartlby_config); @@ -2406,6 +2423,7 @@ convert_to_long(server_enabled); convert_to_long(server_flap_seconds); convert_to_long(server_notify); + convert_to_long(server_dead); SOHandle=bartlby_get_sohandle(Z_STRVAL_P(bartlby_config)); if(SOHandle == NULL) { @@ -2423,6 +2441,7 @@ srv.server_enabled=Z_LVAL_P(server_enabled); srv.server_flap_seconds=Z_LVAL_P(server_flap_seconds); srv.server_notify=Z_LVAL_P(server_notify); + srv.server_dead=Z_LVAL_P(server_dead); ret=AddServer(&srv, Z_STRVAL_P(bartlby_config)); @@ -2441,6 +2460,7 @@ pval * server_enabled; pval * server_flap_seconds; pval * server_notify; + pval * server_dead; void * SOHandle; @@ -2452,7 +2472,7 @@ struct server srv; - if (ZEND_NUM_ARGS() != 9 || getParameters(ht, 9, &bartlby_config,&server_id, &server_name, &server_ip, &server_port, &server_icon, &server_enabled, &server_notify, &server_flap_seconds)==FAILURE) { + if (ZEND_NUM_ARGS() != 10 || getParameters(ht, 10, &bartlby_config,&server_id, &server_name, &server_ip, &server_port, &server_icon, &server_enabled, &server_notify, &server_flap_seconds, &server_dead)==FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(bartlby_config); @@ -2464,6 +2484,7 @@ convert_to_long(server_enabled); convert_to_long(server_flap_seconds); convert_to_long(server_notify); + convert_to_long(server_dead); SOHandle=bartlby_get_sohandle(Z_STRVAL_P(bartlby_config)); if(SOHandle == NULL) { @@ -2484,6 +2505,8 @@ srv.server_flap_seconds=Z_LVAL_P(server_flap_seconds); srv.server_notify=Z_LVAL_P(server_notify); + srv.server_dead=Z_LVAL_P(server_dead); + ret=ModifyServer(&srv, Z_STRVAL_P(bartlby_config)); @@ -2559,6 +2582,7 @@ add_assoc_long(return_value, "server_notify",srvmap[x].server_notify); add_assoc_long(return_value, "server_flap_seconds",srvmap[x].server_flap_seconds); add_assoc_long(return_value, "last_notify_send",srvmap[x].last_notify_send); + add_assoc_long(return_value, "server_dead",srvmap[x].server_dead); add_assoc_long(return_value, "server_shm_place",x); break; } @@ -2674,13 +2698,23 @@ add_assoc_long(return_value, "service_id", svcmap[Z_LVAL_P(bartlby_service_id)].service_id); add_assoc_long(return_value, "server_id", svcmap[Z_LVAL_P(bartlby_service_id)].server_id); add_assoc_long(return_value, "last_state", svcmap[Z_LVAL_P(bartlby_service_id)].last_state); - add_assoc_long(return_value, "current_state", svcmap[Z_LVAL_P(bartlby_service_id)].current_state); - add_assoc_long(return_value, "client_port", svcmap[Z_LVAL_P(bartlby_service_id)].client_port); + + + if(svcmap[Z_LVAL_P(bartlby_service_id)].is_server_dead < 0) { + add_assoc_long(return_value, "current_state", -3); + add_assoc_long(return_value, "server_is_dead", 1); + } else { + add_assoc_long(return_value, "current_state", svcmap[Z_LVAL_P(bartlby_service_id)].current_state); + } + + + + add_assoc_long(return_value, "client_port", srvmap[svcmap[Z_LVAL_P(bartlby_service_id)].srv_place].client_port); add_assoc_string(return_value, "new_server_text", svcmap[Z_LVAL_P(bartlby_service_id)].new_server_text, 1); add_assoc_string(return_value, "service_name", svcmap[Z_LVAL_P(bartlby_service_id)].service_name, 1); - add_assoc_string(return_value, "server_name", svcmap[Z_LVAL_P(bartlby_service_id)].server_name, 1); - add_assoc_string(return_value, "client_ip", svcmap[Z_LVAL_P(bartlby_service_id)].client_ip, 1); + add_assoc_string(return_value, "server_name", srvmap[svcmap[Z_LVAL_P(bartlby_service_id)].srv_place].server_name, 1); + add_assoc_string(return_value, "client_ip", srvmap[svcmap[Z_LVAL_P(bartlby_service_id)].srv_place].client_ip, 1); add_assoc_string(return_value, "plugin", svcmap[Z_LVAL_P(bartlby_service_id)].plugin, 1); add_assoc_string(return_value, "plugin_arguments", svcmap[Z_LVAL_P(bartlby_service_id)].plugin_arguments, 1); @@ -2688,10 +2722,8 @@ add_assoc_long(return_value, "check_interval_original", svcmap[Z_LVAL_P(bartlby_service_id)].check_interval_original); add_assoc_long(return_value, "last_check", svcmap[Z_LVAL_P(bartlby_service_id)].last_check); - add_assoc_long(return_value, "hour_from", svcmap[Z_LVAL_P(bartlby_service_id)].hour_from); - add_assoc_long(return_value, "min_from", svcmap[Z_LVAL_P(bartlby_service_id)].min_from); - add_assoc_long(return_value, "hour_to", svcmap[Z_LVAL_P(bartlby_service_id)].hour_to); - add_assoc_long(return_value, "min_to", svcmap[Z_LVAL_P(bartlby_service_id)].min_to); + + add_assoc_string(return_value, "exec_plan", svcmap[Z_LVAL_P(bartlby_service_id)].service_exec_plan, 1); add_assoc_long(return_value, "notify_enabled", svcmap[Z_LVAL_P(bartlby_service_id)].notify_enabled); add_assoc_long(return_value, "last_notify_send", svcmap[Z_LVAL_P(bartlby_service_id)].last_notify_send); @@ -2704,7 +2736,7 @@ add_assoc_string(return_value, "service_var", svcmap[Z_LVAL_P(bartlby_service_id)].service_var, 1); - add_assoc_string(return_value, "server_icon", svcmap[Z_LVAL_P(bartlby_service_id)].server_icon, 1); + add_assoc_long(return_value, "service_check_timeout", svcmap[Z_LVAL_P(bartlby_service_id)].service_check_timeout); add_assoc_long(return_value, "service_ack", svcmap[Z_LVAL_P(bartlby_service_id)].service_ack); @@ -2722,7 +2754,7 @@ add_assoc_string(return_value, "service_var", svcmap[Z_LVAL_P(bartlby_service_id)].service_var, 1); - add_assoc_string(return_value, "server_icon", svcmap[Z_LVAL_P(bartlby_service_id)].server_icon, 1); + add_assoc_string(return_value, "server_icon", srvmap[svcmap[Z_LVAL_P(bartlby_service_id)].srv_place].server_icon, 1); add_assoc_string(return_value, "service_snmp_community", svcmap[Z_LVAL_P(bartlby_service_id)].snmp_info.community, 1); add_assoc_string(return_value, "service_snmp_objid", svcmap[Z_LVAL_P(bartlby_service_id)].snmp_info.objid, 1); @@ -2738,6 +2770,7 @@ add_assoc_long(return_value, "server_last_notify_send",srvmap[svcmap[Z_LVAL_P(bartlby_service_id)].srv_place].last_notify_send); add_assoc_long(return_value, "server_notify",srvmap[svcmap[Z_LVAL_P(bartlby_service_id)].srv_place].server_notify); add_assoc_long(return_value, "server_enabled",srvmap[svcmap[Z_LVAL_P(bartlby_service_id)].srv_place].server_enabled); + add_assoc_long(return_value, "server_dead",srvmap[svcmap[Z_LVAL_P(bartlby_service_id)].srv_place].server_dead); //Downtime 060120 @@ -2854,6 +2887,7 @@ add_assoc_string(return_value, "mail", wrkmap[Z_LVAL_P(bartlby_worker_id)].mail, 1); add_assoc_string(return_value, "icq", wrkmap[Z_LVAL_P(bartlby_worker_id)].icq, 1); + add_assoc_string(return_value, "notify_plan", wrkmap[Z_LVAL_P(bartlby_worker_id)].notify_plan, 1); add_assoc_string(return_value, "services", wrkmap[Z_LVAL_P(bartlby_worker_id)].services, 1); add_assoc_string(return_value, "notify_levels", wrkmap[Z_LVAL_P(bartlby_worker_id)].notify_levels,1); diff -Nur /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-php/php_bartlby.h bartlby-php/php_bartlby.h --- /var/www/htdocs/bartlby.januschka.com/cvs/last_full//bartlby-php/php_bartlby.h 2006-12-27 20:05:50.000000000 +0100 +++ bartlby-php/php_bartlby.h 2007-02-15 21:46:57.000000000 +0100 @@ -15,9 +15,9 @@ | Author: | +----------------------------------------------------------------------+ - $Id: php_bartlby.h,v 1.38 2006/12/27 19:05:50 hjanuschka Exp $ + $Id: php_bartlby.h,v 1.44 2007/02/15 20:46:57 hjanuschka Exp $ */ -#define BARTLBY_VERSION "1.2.6" +#define BARTLBY_VERSION "1.2.8" #define DT_SERVICE 1 @@ -223,6 +223,7 @@ int server_flap_seconds; int flap_count; int last_notify_send; + struct service * dead_marker; } xxyz; @@ -233,24 +234,20 @@ int server_id; int last_state; int current_state; - int client_port; + char new_server_text[2048]; char service_name[2048]; - char server_name[2048]; - char client_ip[2048]; + char plugin[2048]; char plugin_arguments[2048]; int check_interval; int check_interval_original; int last_check; - + struct timeval lcheck; /*Time stuff*/ - int hour_from; - int min_from; - int hour_to; - int min_to; + char service_exec_plan[2048]; /*Notify things*/ int notify_enabled; @@ -267,7 +264,7 @@ int notify_last_time; int service_check_timeout; - char server_icon[1024]; + int service_ack; @@ -292,6 +289,8 @@ struct server * srv; int srv_place; + int is_server_dead; + }; struct service_sort { @@ -307,7 +306,7 @@ int worker_id; int active; - + char notify_plan[2048]; char password[2048]; int escalation_count;