hfjn / ch-exporter Goto Github PK
View Code? Open in Web Editor NEWEasily configurable Clickhouse Exporter
Easily configurable Clickhouse Exporter
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>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.