-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvements but still does not work right
- Loading branch information
Matthew Hollick
committed
Sep 16, 2019
1 parent
dc2ed3b
commit 197c805
Showing
11 changed files
with
336 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM ubuntu | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y upgrade \ | ||
&& apt-get install -y collectd | ||
|
||
CMD collectd -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[common] | ||
# Prefix for store all internal carbon-clickhouse graphs. Supported macroses: {host} | ||
metric-prefix = "carbon.agents.{host}" | ||
# Endpoint for store internal carbon metrics. Valid values: "" or "local", "tcp://host:port", "udp://host:port" | ||
metric-endpoint = "local" | ||
# Interval of storing internal metrics. Like CARBON_METRIC_INTERVAL | ||
metric-interval = "1m0s" | ||
# GOMAXPROCS | ||
max-cpu = 1 | ||
|
||
[logging] | ||
# "stderr", "stdout" can be used as file name | ||
file = "stdout" | ||
# Logging error level. Valid values: "debug", "info", "warn" "error" | ||
level = "warn" | ||
|
||
[data] | ||
# Folder for buffering received data | ||
path = "/data/carbon-clickhouse/" | ||
# Rotate (and upload) file interval. | ||
# Minimize chunk-interval for minimize lag between point receive and store | ||
chunk-interval = "1s" | ||
# Auto-increase chunk interval if the number of unprocessed files is grown | ||
# Sample, set chunk interval to 10 if unhandled files count >= 5 and set to 60s if unhandled files count >= 20: | ||
# chunk-auto-interval = "5:10s,20:60s" | ||
chunk-auto-interval = "5:5s,10:60s" | ||
|
||
[upload.graphite_reverse] | ||
type = "points-reverse" | ||
table = "graphite_reverse" | ||
threads = 1 | ||
url = "http://clickhouse:8123/" | ||
timeout = "1m0s" | ||
|
||
[upload.graphite_index] | ||
type = "index" | ||
table = "graphite_index" | ||
threads = 1 | ||
url = "http://clickhouse:8123/" | ||
timeout = "1m0s" | ||
cache-ttl = "12h0m0s" | ||
|
||
[upload.graphite_tagged] | ||
type = "tagged" | ||
table = "graphite_tagged" | ||
threads = 1 | ||
url = "http://clickhouse:8123/" | ||
timeout = "1m0s" | ||
cache-ttl = "12h0m0s" | ||
|
||
[udp] | ||
listen = ":2003" | ||
enabled = true | ||
|
||
[tcp] | ||
listen = ":2003" | ||
enabled = true | ||
|
||
[pickle] | ||
listen = ":2004" | ||
enabled = true | ||
|
||
[prometheus] | ||
listen = ":2006" | ||
enabled = true | ||
|
||
# https://github.com/lomik/carbon-clickhouse/blob/master/grpc/carbon.proto | ||
[grpc] | ||
listen = ":2005" | ||
enabled = false | ||
|
||
[pprof] | ||
listen = "localhost:7007" | ||
enabled = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
docker-compose exec clickhouse bash -c " | ||
export HOME=/var/lib/clickhouse/ | ||
exec clickhouse client | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# | ||
# Config file for collectd(1). | ||
# Please read collectd.conf(5) for a list of options. | ||
# http://collectd.org/ | ||
# | ||
|
||
############################################################################## | ||
# Global # | ||
#----------------------------------------------------------------------------# | ||
# Global settings for the daemon. # | ||
############################################################################## | ||
|
||
FQDNLookup false | ||
|
||
#----------------------------------------------------------------------------# | ||
# When enabled, plugins are loaded automatically with the default options # | ||
# when an appropriate <Plugin ...> block is encountered. # | ||
# Disabled by default. # | ||
#----------------------------------------------------------------------------# | ||
AutoLoadPlugin true | ||
|
||
#----------------------------------------------------------------------------# | ||
# When enabled, internal statistics are collected, using "collectd" as the # | ||
# plugin name. # | ||
# Disabled by default. # | ||
#----------------------------------------------------------------------------# | ||
CollectInternalStats true | ||
|
||
#----------------------------------------------------------------------------# | ||
# Interval at which to query values. This may be overwritten on a per-plugin # | ||
# base by using the 'Interval' option of the LoadPlugin block: # | ||
# <LoadPlugin foo> # | ||
# Interval 60 # | ||
# </LoadPlugin> # | ||
#----------------------------------------------------------------------------# | ||
Interval 60 | ||
|
||
# Limit the size of the write queue. Default is no limit. Setting up a limit is | ||
# recommended for servers handling a high volume of traffic. | ||
WriteQueueLimitHigh 1000000 | ||
WriteQueueLimitLow 800000 | ||
|
||
############################################################################## | ||
# Logging # | ||
#----------------------------------------------------------------------------# | ||
# Plugins which provide logging functions should be loaded first, so log # | ||
# messages generated when loading or configuring other plugins can be # | ||
# accessed. # | ||
############################################################################## | ||
|
||
LoadPlugin logfile | ||
<Plugin logfile> | ||
LogLevel err | ||
File stdout | ||
</Plugin> | ||
|
||
############################################################################## | ||
# LoadPlugin section # | ||
#----------------------------------------------------------------------------# | ||
# Lines beginning with a single `#' belong to plugins which have been built # | ||
# but are disabled by default. # | ||
# # | ||
# Lines beginning with `##' belong to plugins which have not been built due # | ||
# to missing dependencies or because they have been deactivated explicitly. # | ||
############################################################################## | ||
|
||
LoadPlugin cpu | ||
LoadPlugin memory | ||
LoadPlugin uptime | ||
|
||
############################################################################## | ||
# Plugin configuration # | ||
#----------------------------------------------------------------------------# | ||
# In this section configuration stubs for each plugin are provided. A desc- # | ||
# ription of those options is available in the collectd.conf(5) manual page. # | ||
############################################################################## | ||
|
||
<Plugin cpu> | ||
ReportByCpu true | ||
ReportByState true | ||
ValuesPercentage true | ||
</Plugin> | ||
|
||
<Plugin memory> | ||
ValuesAbsolute true | ||
ValuesPercentage true | ||
</Plugin> | ||
|
||
<Plugin "write_kafka"> | ||
Property "metadata.broker.list" "kafka:9092" | ||
<Topic "collectd"> | ||
Format JSON | ||
</Topic> | ||
</Plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[common] | ||
listen = ":9090" | ||
max-cpu = 8 | ||
|
||
[clickhouse] | ||
url = "http://clickhouse:8123/?max_query_size=2097152&readonly=2" | ||
index-table = "graphite_index" | ||
data-timeout = "1m0s" | ||
index-timeout = "1m0s" | ||
tagged-table = "graphite_tagged" | ||
|
||
[[data-table]] | ||
table = "graphite_reverse" | ||
reverse = true | ||
rollup-conf = "/etc/graphite-clickhouse/rollup.xml" | ||
|
||
[logging] | ||
file = "stdout" | ||
level = "info" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
CREATE TABLE IF NOT EXISTS default.graphite_reverse ( | ||
Path String, | ||
Value Float64, | ||
Time UInt32, | ||
Date Date, | ||
Timestamp UInt32 | ||
) ENGINE = GraphiteMergeTree('graphite_rollup') | ||
PARTITION BY toYYYYMM(Date) | ||
ORDER BY (Path, Time); | ||
|
||
CREATE TABLE IF NOT EXISTS default.graphite_index ( | ||
Date Date, | ||
Level UInt32, | ||
Path String, | ||
Version UInt32 | ||
) ENGINE = ReplacingMergeTree(Version) | ||
PARTITION BY toYYYYMM(Date) | ||
ORDER BY (Level, Path, Date); | ||
|
||
CREATE TABLE IF NOT EXISTS default.graphite_tagged ( | ||
Date Date, | ||
Tag1 String, | ||
Path String, | ||
Tags Array(String), | ||
Version UInt32 | ||
) ENGINE = ReplacingMergeTree(Version) | ||
PARTITION BY toYYYYMM(Date) | ||
ORDER BY (Tag1, Path, Date); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.