7 #include <sandesh/sandesh_options.h>
9 namespace opt = boost::program_options;
10 using namespace options::util;
15 void AddOptions(opt::options_description *sandesh_options,
18 sandesh_options->add_options()
19 (
"SANDESH.sandesh_keyfile", opt::value<std::string>()->default_value(
20 "/etc/contrail/ssl/private/server-privkey.pem"),
21 "Sandesh SSL private key")
22 (
"SANDESH.sandesh_certfile", opt::value<std::string>()->default_value(
23 "/etc/contrail/ssl/certs/server.pem"),
24 "Sandesh SSL certificate")
25 (
"SANDESH.sandesh_server_keyfile", opt::value<std::string>()->default_value(
26 "/etc/contrail/ssl/private/server-privkey.pem"),
27 "Sandesh SSL Server private key")
28 (
"SANDESH.sandesh_server_certfile", opt::value<std::string>()->default_value(
29 "/etc/contrail/ssl/certs/server.pem"),
30 "Sandesh SSL Server certificate")
31 (
"SANDESH.sandesh_ca_cert", opt::value<std::string>()->default_value(
32 "/etc/contrail/ssl/certs/ca-cert.pem"),
33 "Sandesh CA SSL certificate")
34 (
"SANDESH.sandesh_ssl_enable",
36 "Enable SSL for sandesh connection")
37 (
"SANDESH.introspect_ssl_enable",
39 "Enable SSL for introspect connection")
40 (
"SANDESH.introspect_ssl_insecure",
42 "Enable SSL insecure for introspect connection")
43 (
"SANDESH.disable_object_logs",
45 "Disable sending of object logs to collector")
46 (
"STATS.stats_collector", opt::value<std::string>()->default_value(
48 "External Stats Collector")
49 (
"DEFAULT.sandesh_send_rate_limit",
50 opt::value<uint32_t>()->default_value(
51 g_sandesh_constants.DEFAULT_SANDESH_SEND_RATELIMIT),
52 "System logs send rate limit in messages per second per message type")
53 (
"DEFAULT.http_server_ip",
54 opt::value<std::string>()->default_value(
56 "Listen IP for the Introspect")
57 (
"SANDESH.tcp_keepalive_enable",
59 "Enable Keepalive for tcp socket")
60 (
"SANDESH.tcp_keepalive_idle_time",
62 "Keepalive idle time for tcp socket")
63 (
"SANDESH.tcp_keepalive_probes",
65 "Keepalive probes for tcp socket")
66 (
"SANDESH.tcp_keepalive_interval",
68 "Keepalive interval for tcp socket")
74 GetOptValue<std::string>(var_map, sandesh_config->
keyfile,
75 "SANDESH.sandesh_keyfile");
76 GetOptValue<std::string>(var_map, sandesh_config->
certfile,
77 "SANDESH.sandesh_certfile");
79 "SANDESH.sandesh_server_keyfile");
81 "SANDESH.sandesh_server_certfile");
82 GetOptValue<std::string>(var_map, sandesh_config->
ca_cert,
83 "SANDESH.sandesh_ca_cert");
85 "SANDESH.sandesh_ssl_enable");
87 "SANDESH.introspect_ssl_enable");
89 "SANDESH.introspect_ssl_insecure");
91 "SANDESH.disable_object_logs");
93 "STATS.stats_collector");
95 "DEFAULT.sandesh_send_rate_limit");
97 "DEFAULT.http_server_ip");
99 "SANDESH.tcp_keepalive_enable");
101 "SANDESH.tcp_keepalive_idle_time");
103 "SANDESH.tcp_keepalive_probes");
105 "SANDESH.tcp_keepalive_interval");
bool introspect_ssl_enable
uint32_t system_logs_rate_limit
std::string server_certfile
bool tcp_keepalive_enable
int tcp_keepalive_idle_time
bool introspect_ssl_insecure
std::string http_server_ip
std::string server_keyfile
void ProcessOptions(const opt::variables_map &var_map, SandeshConfig *sandesh_config)
std::string stats_collector
void AddOptions(opt::options_description *sandesh_options, SandeshConfig *sandesh_config)
int tcp_keepalive_interval