11#include " common/ceph_argparse.h"
22#include " common/config.h"
33#include " exporter/DaemonMetricCollector.h"
4- #include " exporter/http_server .h"
4+ #include " exporter/web_server .h"
55#include " global/global_init.h"
66#include " global/global_context.h"
77
@@ -18,6 +18,8 @@ static void usage() {
1818 " --sock-dir: The path to ceph daemons socket files dir\n "
1919 " --addrs: Host ip address where exporter is deployed\n "
2020 " --port: Port to deploy exporter on. Default is 9926\n "
21+ " --cert-file: Path to the certificate file to use https\n "
22+ " --key-file: Path to the certificate key file to use https\n "
2123 " --prio-limit: Only perf counters greater than or equal to prio-limit are fetched. Default: 5\n "
2224 " --stats-period: Time to wait before sending requests again to exporter server (seconds). Default: 5s"
2325 << std::endl;
@@ -48,6 +50,10 @@ int main(int argc, char **argv) {
4850 cct->_conf .set_val (" exporter_addr" , val);
4951 } else if (ceph_argparse_witharg (args, i, &val, " --port" , (char *)NULL )) {
5052 cct->_conf .set_val (" exporter_http_port" , val);
53+ } else if (ceph_argparse_witharg (args, i, &val, " --cert-file" , (char *)NULL )) {
54+ cct->_conf .set_val (" exporter_cert_file" , val);
55+ } else if (ceph_argparse_witharg (args, i, &val, " --key-file" , (char *)NULL )) {
56+ cct->_conf .set_val (" exporter_key_file" , val);
5157 } else if (ceph_argparse_witharg (args, i, &val, " --prio-limit" , (char *)NULL )) {
5258 cct->_conf .set_val (" exporter_prio_limit" , val);
5359 } else if (ceph_argparse_witharg (args, i, &val, " --stats-period" , (char *)NULL )) {
@@ -58,7 +64,7 @@ int main(int argc, char **argv) {
5864 }
5965 common_init_finish (g_ceph_context);
6066
61- boost::thread server_thread (http_server_thread_entrypoint );
67+ boost::thread server_thread (web_server_thread_entrypoint );
6268 DaemonMetricCollector &collector = collector_instance ();
6369 collector.main ();
6470 server_thread.join ();
0 commit comments