Coder Social home page Coder Social logo

ch-exporter's People

Contributors

hfjn avatar jmaicher avatar maowerner avatar

Stargazers

 avatar  avatar

Watchers

 avatar

ch-exporter's Issues

Handle clickhouse being unavailable

Right now ch-exporter might fail if clickhouse isn't reachable at all.
This should get caught properly and set the health check to unhealthy.

Traceback (most recent call last):
    |   File "/app/ch_exporter/collectors.py", line 35, in collect
    |     result = await client.fetch(self.query)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/.venv/lib/python3.11/site-packages/aiochclient/client.py", line 258, in fetch
    |     return [
    |            ^
    |   File "/app/.venv/lib/python3.11/site-packages/aiochclient/client.py", line 258, in <listcomp>
    |     return [
    |            ^
    |   File "/app/.venv/lib/python3.11/site-packages/aiochclient/client.py", line 182, in _execute
    |     names=await response.__anext__(),
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/.venv/lib/python3.11/site-packages/aiochclient/http_clients/aiohttp.py", line 25, in post_return_lines
    |     async with self._session.post(url=url, params=params, data=data) as resp:
    |   File "/app/.venv/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    |     self._resp = await self._coro
    |                  ^^^^^^^^^^^^^^^^
    |   File "/app/.venv/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
    |     conn = await self._connector.connect(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/.venv/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
    |     proto = await self._create_connection(req, traces, timeout)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/.venv/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
    |     _, proto = await self._create_direct_connection(req, traces, timeout)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/.venv/lib/python3.11/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
    |     raise last_exc
    |   File "/app/.venv/lib/python3.11/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    |     transp, proto = await self._wrap_create_connection(
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/app/.venv/lib/python3.11/site-packages/aiohttp/connector.py", line 988, in _wrap_create_connection
    |     raise client_error(req.connection_key, exc) from exc
    | aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host ch:8123 ssl:default [Connect call failed ('10.50.249.11', 8123)]
    +------------------------------------
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f4e69ebe650>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.