Added new global variable 'prometheus_plugin' to specify the loading of the plugin

pull/2676/head
Javier Jaramago Fernández 6 years ago
parent 8d1a6136c9
commit 57532a762e

@ -59,6 +59,7 @@ class ProxySQL_GlobalVariables {
char * execute_on_exit_failure;
char * web_interface_plugin;
char * ldap_auth_plugin;
std::string prometheus_plugin {""};
struct {
unsigned long long start_time;
bool gdbg;

@ -852,6 +852,14 @@ void ProxySQL_Main_process_global_variables(int argc, const char **argv) {
GloVars.ldap_auth_plugin=strdup(ldap_auth_plugin.c_str());
}
}
if (root.exists("prometheus_plugin")==true) {
string prometheus_plugin { "" };
bool rc { root.lookupValue("prometheus_plugin", prometheus_plugin) };
if (rc == true) {
GloVars.prometheus_plugin = prometheus_plugin;
}
}
} else {
proxy_warning("Unable to open config file %s\n", GloVars.config_file); // issue #705
if (GloVars.__cmd_proxysql_config_file) {

Loading…
Cancel
Save