Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hardware-exporter metrics down if deployed on github runners #287

Open
ca-scribner opened this issue Aug 7, 2024 · 0 comments
Open

hardware-exporter metrics down if deployed on github runners #287

ca-scribner opened this issue Aug 7, 2024 · 0 comments

Comments

@ca-scribner
Copy link

The grafana-agent machine charm uses hardware-observer in its CI. We recently noticed that, after going from hardware-observer rev70 to rev84, our CI is failing because the hardware-exporter shows as down. We can see this by doing the following from inside the unit:

curl localhost:12345/agent/api/v1/metrics/targets

From that we can see target_group "hwo_1_default", which I think is the hardware-exporter since it is checking port 10200, is down:

{
    "status": "success",
    "data":
    [
        {
            "instance": "243a344db344241f404868d04272fc76",
            "target_group": "hwo_1_default",
            "endpoint": "http://localhost:10200/metrics",
            "state": "down",
            "labels":
            {
                "instance": "localhost:10200",
                "job": "hwo_1_default",
                "juju_application": "hwo",
                "juju_model": "test-juju-info-cos-agent-ylut",
                "juju_model_uuid": "671c70ef-a32d-449e-8a83-42f51a436e76",
                "juju_unit": "hwo/0"
            },
            "discovered_labels":
            {
                "__address__": "localhost:10200",
                "__metrics_path__": "/metrics",
                "__scheme__": "http",
                "__scrape_interval__": "1m",
                "__scrape_timeout__": "10s",
                "job": "hwo_1_default",
                "juju_application": "hwo",
                "juju_model": "test-juju-info-cos-agent-ylut",
                "juju_model_uuid": "671c70ef-a32d-449e-8a83-42f51a436e76",
                "juju_unit": "hwo/0"
            },
            "last_scrape": "2024-08-07T13:26:52.715197421Z",
            "scrape_duration_ms": 0,
            "scrape_error": "Get \"http://localhost:10200/metrics\": dial tcp 127.0.0.1:10200: connect: connection refused"
        },
        {
            "instance": "243a344db344241f404868d04272fc76",
            "target_group": "hwo_2_default",
            "endpoint": "http://localhost:10201/metrics",
            "state": "up",
            "labels":
            {
                "instance": "localhost:10201",
                "job": "hwo_2_default",
                "juju_application": "hwo",
                "juju_model": "test-juju-info-cos-agent-ylut",
                "juju_model_uuid": "671c70ef-a32d-449e-8a83-42f51a436e76",
                "juju_unit": "hwo/0"
            },
            "discovered_labels":
            {
                "__address__": "localhost:10201",
                "__metrics_path__": "/metrics",
                "__scheme__": "http",
                "__scrape_interval__": "1m",
                "__scrape_timeout__": "10s",
                "job": "hwo_2_default",
                "juju_application": "hwo",
                "juju_model": "test-juju-info-cos-agent-ylut",
                "juju_model_uuid": "671c70ef-a32d-449e-8a83-42f51a436e76",
                "juju_unit": "hwo/0"
            },
            "last_scrape": "2024-08-07T13:27:05.885981966Z",
            "scrape_duration_ms": 1,
            "scrape_error": ""
        },
        {
            "instance": "243a344db344241f404868d04272fc76",
            "target_group": "integrations/agent",
            "endpoint": "http://127.0.0.1:12345/integrations/agent/metrics",
            "state": "up",
            "labels":
            {
                "agent_hostname": "juju-436e76-0",
                "instance": "juju-436e76-0.lxd",
                "job": "juju_test-juju-info-cos-agent-ylut_671c70ef-a32d-449e-8a83-42f51a436e76_agent_self-monitoring",
                "juju_application": "agent",
                "juju_charm": "grafana-agent",
                "juju_model": "test-juju-info-cos-agent-ylut",
                "juju_model_uuid": "671c70ef-a32d-449e-8a83-42f51a436e76",
                "juju_unit": "agent/0"
            },
            "discovered_labels":
            {
                "__address__": "127.0.0.1:12345",
                "__metrics_path__": "/integrations/agent/metrics",
                "__scheme__": "http",
                "__scrape_interval__": "1m",
                "__scrape_timeout__": "10s",
                "agent_hostname": "juju-436e76-0",
                "job": "integrations/agent"
            },
            "last_scrape": "2024-08-07T13:27:38.0595359Z",
            "scrape_duration_ms": 3,
            "scrape_error": ""
        },
        {
            "instance": "243a344db344241f404868d04272fc76",
            "target_group": "integrations/node_exporter",
            "endpoint": "http://127.0.0.1:12345/integrations/node_exporter/metrics",
            "state": "up",
            "labels":
            {
                "agent_hostname": "juju-436e76-0",
                "instance": "juju-436e76-0.lxd",
                "job": "juju_test-juju-info-cos-agent-ylut_671c70ef-a32d-449e-8a83-42f51a436e76_agent_node-exporter",
                "juju_application": "agent",
                "juju_charm": "grafana-agent",
                "juju_model": "test-juju-info-cos-agent-ylut",
                "juju_model_uuid": "671c70ef-a32d-449e-8a83-42f51a436e76",
                "juju_unit": "agent/0"
            },
            "discovered_labels":
            {
                "__address__": "127.0.0.1:12345",
                "__metrics_path__": "/integrations/node_exporter/metrics",
                "__scheme__": "http",
                "__scrape_interval__": "1m",
                "__scrape_timeout__": "10s",
                "agent_hostname": "juju-436e76-0",
                "job": "integrations/node_exporter"
            },
            "last_scrape": "2024-08-07T13:27:16.881244688Z",
            "scrape_duration_ms": 64,
            "scrape_error": ""
        }
    ]
}

Not sure if this is expected behaviour or not, but it seems to have started happening after hardware-observer added the smartctl exporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant