diff --git a/esrally/metrics.py b/esrally/metrics.py
index c01be1c2..7da700de 100644
--- a/esrally/metrics.py
+++ b/esrally/metrics.py
@@ -9,7 +9,7 @@ from enum import Enum, IntEnum
 
 import tabulate
 from esrally import time, exceptions, config, version, paths
-from esrally.utils import console, io, versions
+from esrally.utils import convert, console, io, versions
 from http.client import responses
 
 
@@ -123,8 +123,7 @@ class EsClientFactory:
         self._config = cfg
         host = self._config.opts("reporting", "datastore.host")
         port = self._config.opts("reporting", "datastore.port")
-        # poor man's boolean conversion
-        secure = self._config.opts("reporting", "datastore.secure") == "True"
+        secure = convert.to_bool(self._config.opts("reporting", "datastore.secure"))
         user = self._config.opts("reporting", "datastore.user")
         password = self._config.opts("reporting", "datastore.password")
         verify = self._config.opts("reporting", "datastore.ssl.verification_mode", default_value="full", mandatory=False) != "none"

datastore.secure boolean values seem to be case sensitive in rally.ini
Specifying `datastore.secure = true` in `rally.ini` gives the misleading error message:

```
esrally.exceptions.SystemSetupError: ('Could not connect to your Elasticsearch metrics store. Please check that it is running on host [https://<url>] at port [9243] or fix the configuration in [<home_dir>/.rally/rally.ini].', None)
].
```
It works when setting it to `True`, but we should be case insensitive when parsing boolean values in this file.
diff --git a/tests/metrics_test.py b/tests/metrics_test.py
index ee646c45..68413848 100644
--- a/tests/metrics_test.py
+++ b/tests/metrics_test.py
@@ -3,6 +3,7 @@ import datetime
 import logging
 import unittest.mock as mock
 import random
+import string
 from unittest import TestCase
 import elasticsearch.exceptions
 
@@ -120,6 +121,39 @@ class EsClientTests(TestCase):
         def __init__(self, hosts):
             self.transport = EsClientTests.TransportMock(hosts)
 
+    @mock.patch("esrally.client.EsClientFactory")
+    def test_config_opts_parsing(self, client_esclientfactory):
+        cfg = config.Config()
+
+        _datastore_host = ".".join([str(random.randint(1,254)) for _ in range(4)])
+        _datastore_port = random.randint(1024,65535)
+        _datastore_secure = random.choice(["True", "true"])
+        _datastore_user = "".join([random.choice(string.ascii_letters) for _ in range(8)])
+        _datastore_password = "".join([random.choice(string.ascii_letters + string.digits + "_-@#$/") for _ in range(12)])
+        _datastore_verify_certs = random.choice([True, False])
+
+        cfg.add(config.Scope.applicationOverride, "reporting", "datastore.host", _datastore_host)
+        cfg.add(config.Scope.applicationOverride, "reporting", "datastore.port", _datastore_port)
+        cfg.add(config.Scope.applicationOverride, "reporting", "datastore.secure", _datastore_secure)
+        cfg.add(config.Scope.applicationOverride, "reporting", "datastore.user", _datastore_user)
+        cfg.add(config.Scope.applicationOverride, "reporting", "datastore.password", _datastore_password)
+        if not _datastore_verify_certs:
+            cfg.add(config.Scope.applicationOverride, "reporting", "datastore.ssl.verification_mode", "none")
+
+        f = metrics.EsClientFactory(cfg)
+        expected_client_options = {
+            "use_ssl": True,
+            "timeout": 120,
+            "basic_auth_user": _datastore_user,
+            "basic_auth_password": _datastore_password,
+            "verify_certs": _datastore_verify_certs
+        }
+
+        client_esclientfactory.assert_called_with(
+            hosts=[{"host": _datastore_host, "port": _datastore_port}],
+            client_options=expected_client_options
+        )
+
     def test_raises_sytem_setup_error_on_connection_problems(self):
         def raise_connection_error():
             raise elasticsearch.exceptions.ConnectionError("unit-test")

pip install -e .
parse_log_pytest
pytest
pytest pytest-benchmark
apt-get update apt-get install -y gcc python3-pip python3-dev
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
elasticsearch==6.2.0
-e git+https://github.com/elastic/rally.git@7387ca228ec1f0f7e6dc5f4938cfc62dbc4c5cba#egg=esrally
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
Jinja2==2.9.5
jsonschema==2.5.1
MarkupSafe==2.0.1
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
psutil==5.4.0
py @ file:///opt/conda/conda-bld/py_1644396412707/work
py-cpuinfo==3.2.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
pytest-benchmark==3.4.1
tabulate==0.8.1
thespian==3.9.2
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
urllib3==1.22
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: rally
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - elasticsearch==6.2.0
      - jinja2==2.9.5
      - jsonschema==2.5.1
      - markupsafe==2.0.1
      - psutil==5.4.0
      - py-cpuinfo==3.2.0
      - pytest-benchmark==3.4.1
      - tabulate==0.8.1
      - thespian==3.9.2
      - urllib3==1.22
prefix: /opt/conda/envs/rally

tests/metrics_test.py::EsClientTests::test_config_opts_parsing
tests/metrics_test.py::ExtractUserTagsTests::test_extracts_proper_user_tags tests/metrics_test.py::ExtractUserTagsTests::test_missing_comma_raises_error tests/metrics_test.py::ExtractUserTagsTests::test_missing_value_raises_error tests/metrics_test.py::ExtractUserTagsTests::test_no_tags_returns_empty_dict tests/metrics_test.py::EsClientTests::test_fails_after_too_many_errors tests/metrics_test.py::EsClientTests::test_raises_rally_error_on_unknown_problems tests/metrics_test.py::EsClientTests::test_raises_sytem_setup_error_on_authentication_problems tests/metrics_test.py::EsClientTests::test_raises_sytem_setup_error_on_authorization_problems tests/metrics_test.py::EsClientTests::test_raises_sytem_setup_error_on_connection_problems tests/metrics_test.py::EsClientTests::test_retries_on_various_transport_errors tests/metrics_test.py::EsMetricsTests::test_get_error_rate_additional_unknown_key tests/metrics_test.py::EsMetricsTests::test_get_error_rate_explicit_one tests/metrics_test.py::EsMetricsTests::test_get_error_rate_explicit_zero tests/metrics_test.py::EsMetricsTests::test_get_error_rate_implicit_one tests/metrics_test.py::EsMetricsTests::test_get_error_rate_implicit_zero tests/metrics_test.py::EsMetricsTests::test_get_error_rate_mixed tests/metrics_test.py::EsMetricsTests::test_get_median tests/metrics_test.py::EsMetricsTests::test_get_value tests/metrics_test.py::EsMetricsTests::test_put_doc_no_meta_data tests/metrics_test.py::EsMetricsTests::test_put_doc_with_metadata tests/metrics_test.py::EsMetricsTests::test_put_value_with_explicit_timestamps tests/metrics_test.py::EsMetricsTests::test_put_value_with_meta_info tests/metrics_test.py::EsMetricsTests::test_put_value_without_meta_info tests/metrics_test.py::EsRaceStoreTests::test_store_race tests/metrics_test.py::EsResultsStoreTests::test_store_results tests/metrics_test.py::InMemoryMetricsStoreTests::test_externalize_and_bulk_add tests/metrics_test.py::InMemoryMetricsStoreTests::test_get_error_rate_by_sample_type tests/metrics_test.py::InMemoryMetricsStoreTests::test_get_error_rate_mixed tests/metrics_test.py::InMemoryMetricsStoreTests::test_get_error_rate_zero_without_samples tests/metrics_test.py::InMemoryMetricsStoreTests::test_get_median tests/metrics_test.py::InMemoryMetricsStoreTests::test_get_percentile tests/metrics_test.py::InMemoryMetricsStoreTests::test_get_value tests/metrics_test.py::InMemoryMetricsStoreTests::test_meta_data_per_document tests/metrics_test.py::FileRaceStoreTests::test_store_race
esrally/metrics.py
esrally/metrics.py