aboutsummaryrefslogtreecommitdiff
path: root/src/stevedore.h
blob: 66432bb0f74dc3eafdf1d26e3ddf9d5ffffd0a63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* This file is part of tallyman
Copyright (C) 2018-2020 Sergey Poznyakoff
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "grecs.h"
#include "grecs/json.h"

extern int log_facility;
extern char *syslog_tag;
extern char *listen_address;
extern char *pidfile;
extern char *progname;
extern char *runas_user;
extern char *runas_group;
extern unsigned ttl_snmp_table_cache;
extern unsigned ttl_instance_state;
extern char *hostproc_server_addr;

void config_help(void);
void readconfig(char const *file);

void pidfile_remove(void);
void pidfile_create(void);
void pidfile_check(void);

void info(char const *fmt, ...);

void runas(char const *user, char const *group);

struct MHD_Connection;
char *get_remote_ip(struct MHD_Connection *conn);

int service_add(char const *id, grecs_locus_t *loc);
int servdb_update(struct json_value *obj);

u_long servdb_servicesUpTime(void);
size_t servdb_servicesTotal(void);
size_t servdb_servicesRunning(void);
ssize_t servdb_serviceInstances(size_t idx);

void agentx_init(void);
void *agentx_thread(void *p);
void *invalidator_thread(void *p);


Return to:

Send suggestions and report system problems to the System administrator.