Skip to content

Commit

Permalink
Update clickhouse.chart.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamvalsan authored May 22, 2024
1 parent 2405546 commit fa248f5
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion collectors/python.d.plugin/clickhouse/clickhouse.chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,34 @@ def _fullname(category, name: str) -> str:
fullname = _fullname(category, name)
ORDER.append(fullname)
# Options: None, <description>, <dimension>, <group>, <name>, <chart type>
units = "requests" if "Request" in name else \
"queries" if "Query" in name else \
"threads" if "Thread" in name else \
"syscalls" if "syscalls" in name else \
"connections" if "Connection" in name else \
"tasks" if "Task" in name else \
"nodes" if "Node" in name else \
"sessions" if "Session" in name else \
"threads" if "Thread" in name else \
"bytes" if "Bytes" in name else \
"bytes" if "Memory" in name else \
"bytes" if "malloc" in name else \
"files" if "File" in name else \
"reads" if "ReadBufferFromFile" in name else \
"writes" if "WriteBufferFromFile" in name else \
"seconds" if "Uptime" in name else \
"microseconds" if "Microseconds" in name else \
"chunks" if "Chunks" in name else \
"pages" if "Page" in name else \
"events"
fullname2 = "clickhouse." + fullname
CHARTS[fullname] = {
"lines": [[fullname, None, metric_type]],
"options": [None, desc or name, "units", category, fullname2, chart_type],
"options": [None, desc or name, units, category, fullname2, chart_type],
}



# Netdata breaks silently on unexpected keys :(
_expected = set()
for c in CHARTS.values():
Expand Down

0 comments on commit fa248f5

Please sign in to comment.