Skip to content

CE-2241: Fix the exporter again

Simon Rose requested to merge (removed):fix_exporter_again into master

The issue is that systemctl is-enabled returns a non-zero error code if the service is disabled. Note that we could possibly use this instead with something like

        ioc_sluggified_name = os.path.basename(iocdir)
        ioc_service_name = "ioc@{}.service".format(ioc_sluggified_name)
        result = subprocess.run([
                    "systemctl",
                    "is-enabled",
                    ioc_service_name,
                ])
        metric.add_metric([ioc["name"]], int(result.returncode in [0, 1]))

or something like this.

Merge request reports

Loading