{question}
How can I control the MemSQL exporter?
{question}
{answer}
This article outlines steps for configuring the query scraping mechanisms of the Singlestore exporter or disabling the exporter entirely.
SingleStore employs an exporter to scrape metrics that query the underlying information_schema tables. In certain scenarios, these queries may consume a significant amount of resources in the cluster. The steps outlined in this article can be used to disable such query collectors.
Here is a list of all the query scrapers and samplers used by the MemSQL exporter:
Enabled scrapers:
--collect.memory.counters
--collect.distributed.partitions
--collect.show_variables
--collect.events
--collect.info_schema.tables
--collect.info_schema.processlist
--collect.info_schema.tablestats
--collect.global_status_counting_vars
--collect.info_schema.mv_activities
--collect.info_schema.mv_activities_extended_cumulative
--collect.info_schema.system_info
--collect.info_schema.pipeline_batches
--collect.info_schema.mv_nodes
--collect.show_status_extended
--collect.show_workload_management_status
--collect.global_status_gauge_vars
Enabled cluster scrapers:
--cluster-collect.info_schema.mv_sysinfo_mem
--cluster-collect.info_schema.mv_global_status
--cluster-collect.info_schema.mv_sysinfo_cpu
--cluster-collect.info_schema.mv_workload_management_status
--cluster-collect.info_schema.mv_sysinfo_net
--cluster-collect.info_schema.mv_global_variables
--cluster-collect.events
--cluster-collect.distributed.partitions
--cluster-collect.info_schema.mv_activities
--cluster-collect.info_schema.mv_activities_extended_cumulative
--cluster-collect.info_schema.system_info
--cluster-collect.info_schema.tables
--cluster-collect.info_schema.mv_processlist
--cluster-collect.info_schema.tablestats
--cluster-collect.info_schema.pipeline_batches
--cluster-collect.info_schema.mv_nodes
--cluster-collect.info_schema.mv_sysinfo_disk
Enabled samplers:
--sample.cluster_info
--sample.events
--sample.node
--sample.activity
--sample.activity_extended
--sample.pipeline_batches
Consider a scenario where the query below, used by the exporter, is consuming a lot of resources:
SELECT
DATABASE_NAME,
TABLE_NAME,
'total' ORDINAL,
PARTITION_TYPE,
sum(ROWS) rows,
sum(MEMORY_USE) memory_use,
count(distinct ORDINAL) ordinals
FROM information_schema.table_statistics
group by 1, 2, 4
order by 1, 2, 4;
This query is intended to access the information_schema.table_statistics view. From the list above, we can infer that the following scrapers are used to execute this query:
--collect.info_schema.tablestats
--cluster-collect.info_schema.tablestats
These scrapers can be disabled by following these steps:
- Create a --no-... flag -> --no-collect.info_schema.tablestats, --no-cluster-collect.info_schema.tablestats
Kubernetes-based deployments:
- Add the flag after "--master-exporter-parameters" in “sdb-operator.yaml”:
"--master-exporter-parameters",
"--config.user=root --no-cluster-collect.info_schema.tablestats --no-collect.info_schema.tablestats"]
Non Kubernetes deployments(on-prem):
- Add the flag to the @@exporter_user engine variable in the Source cluster.
@@exporter_user = “monitoring_user” ->
@@exporter_user = “monitoring_user --no-cluster-collect.info_schema.tablestats --no-collect.info_schema.tablestats” - Restart the exporter by running
@@exporter_port=0; #followed by
@@exporter_port=<your exporter port>
{answer}