예제 #1
0
static int dns_initiate_check(noit_module_t *self, noit_check_t *check,
                              int once, noit_check_t *cause) {
  struct dns_check_info *ci;
  if(!check->closure)
    check->closure = calloc(1, sizeof(struct dns_check_info));
  ci = check->closure;
  ci->check = check;
  ci->self = self;
  INITIATE_CHECK(dns_check_send, self, check, cause);
  return 0;
}
예제 #2
0
static int noit_statsd_initiate_check(noit_module_t *self,
                                        noit_check_t *check,
                                        int once, noit_check_t *cause) {
  check->flags |= NP_PASSIVE_COLLECTION;
  if (check->closure == NULL) {
    statsd_closure_t *ccl;
    ccl = check->closure = (void *)calloc(1, sizeof(statsd_closure_t));
    ccl->self = self;
  }
  INITIATE_CHECK(statsd_submit, self, check, cause);
  return 0;
}
예제 #3
0
static int external_initiate_check(noit_module_t *self, noit_check_t *check,
                                    int once, noit_check_t *cause) {
  if(!check->closure) check->closure = calloc(1, sizeof(struct check_info));
  INITIATE_CHECK(external_invoke, self, check, cause);
  return 0;
}
예제 #4
0
static int mysql_initiate_check(noit_module_t *self, noit_check_t *check,
                                   int once, noit_check_t *cause) {
  if(!check->closure) check->closure = calloc(1, sizeof(mysql_check_info_t));
  INITIATE_CHECK(mysql_initiate, self, check, cause);
  return 0;
}
예제 #5
0
static int postgres_initiate_check(noit_module_t *self, noit_check_t *check,
                                   int once, noit_check_t *parent) {
  if(!check->closure) check->closure = calloc(1, sizeof(postgres_check_info_t));
  INITIATE_CHECK(postgres_initiate, self, check);
  return 0;
}