You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very light proxy for graphite metrics with additional features:
4
-
- Taking metrics from network (see [configuration](https://github.com/leoleovich/grafsy#configuration)) or from file directly
4
+
- Taking metrics from network (see [configuration](https://github.com/innogames/grafsy#configuration)) or from file directly
5
5
- Buffering metrics if Graphite itself is down
6
-
- Function of summing/averaging metrics with a special prefix (see [configuration](https://github.com/leoleovich/grafsy#configuration))
6
+
- Function of summing/averaging metrics with a special prefix (see [configuration](https://github.com/innogames/grafsy#configuration))
7
7
- Filtering 'bad' metrics, which are not passing check against regexp
8
8
- Periodical sending to Graphite server to avoid traffic pikes
9
9
@@ -24,54 +24,54 @@ Also I recommend you to see the presentation https://prezi.com/giwit3kyy0vu/graf
24
24
We are using release-based workflow with tags. Please do not add in your CI `master` branch. Use latest tag. For jenkins it might look like this (`+refs/tags/*:refs/remotes/uw/tags/*` and `*/tags/*`):
Please look at [releases](https://github.com/leoleovich/grafsy/releases)
27
+
Please look at [releases](https://github.com/innogames/grafsy/releases)
28
28
29
29
# Configuration
30
30
31
-
There is a config file which must be located under */etc/grafsy/grafsy.toml*
32
-
But you can redefine it with option *-c*
31
+
There is a config file which must be located under `/etc/grafsy/grafsy.toml`
32
+
But you can redefine it with option `-c`
33
33
Most of the time you need to use default (recommended) configuration of grafsy, but you can always modify params:
34
34
35
35
## Base
36
36
37
-
- supervisor - Supervisor manager which is used to run Grafsy. e.g. systemd or supervisord. Default is none
38
-
- clientSendInterval - The interval, after which client will send data to graphite. In seconds
39
-
- metricsPerSecond - Maximum amount of metrics which can be processed per second
40
-
In case of problems with connection/amount of metrics, this configuration will take save up to maxMetrics\*clientSendInterval metrics in retryFile
37
+
-`supervisor` - supervisor manager which is used to run Grafsy. e.g. systemd or supervisord. Default is none
38
+
-`clientSendInterval` - the interval, after which client will send data to graphite. In seconds
39
+
-`metricsPerSecond` - maximum amount of metrics which can be processed per second
40
+
In case of problems with connection/amount of metrics, this configuration will take save up to `maxMetrics*clientSendInterval` metrics in retryDir
41
41
Also these 2 params are exactly allocating memory
42
-
- allowedMetrics - Regexp of allowed metric. Every metric which is not passing check against regexp will be removed
43
-
- log - Main log file
44
-
- hostname - alias to use instead of os.Hostname() result
42
+
-`allowedMetrics` - regexp of allowed metric. Every metric which is not passing check against regexp will be removed
43
+
-`log` - main log file
44
+
-`hostname` - alias to use instead of os.Hostname() result
45
45
46
46
## Sending and cache
47
47
48
-
-graphiteAddr - Real Graphite server to which client will send all data
49
-
- connectTimeout - Timeout for connecting to graphiteAddr. Timeout for writing metrics themselves will be clientSendInterval-connectTimeout-1. Default 7. In seconds
50
-
- localBind - Local address:port for local daemon
51
-
- metricDir - Directory, in which developers/admins... can write any file with metrics
52
-
- useACL - Enables ACL for metricDir to let grafsy read files there with any permissions. Default is false
53
-
-retryFile - Data, which was not sent will be buffered in this file
48
+
-`carbonAddrs` - array of carbon metrics receivers.
49
+
-`connectTimeout` - timeout for connecting to `carbonAddrs`. Timeout for writing metrics themselves will be `clientSendInterval-connectTimeout-1`. Default 7. In seconds
50
+
-`localBind` - local address:port for local daemon
51
+
-`metricDir` - directory, in which developers or admins can write any file with metrics
52
+
-`useACL` - enables ACL for metricDir to let grafsy read files there with any permissions. Default is false
53
+
-`retryDir` - data, which was not sent will be buffered in this directory per carbon server
54
54
55
55
## Aggregation
56
56
57
-
- sumPrefix - Prefix for metric to sum. Do not forget to include it in allowedMetrics if you change it
58
-
- avgPrefix - Prefix for metric to calculate average. Do not forget to include it in allowedMetrics if you change it
59
-
- minPrefix - Prefix for metric to find minimal value. Do not forget to include it in allowedMetrics if you change it
60
-
- maxPrefix - Prefix for metric to find maximum value. Do not forget to include it in allowedMetrics if you change it
61
-
- aggrInterval - Summing up interval for metrics with all prefixes. In seconds
62
-
- aggrPerSecond - Amount of aggregations which grafsy performs per second. If grafsy receives more metrics than aggrPerSecond*aggrInterval - rest will be dropped
57
+
-`sumPrefix` - prefix for metric to sum. Do not forget to include it in allowedMetrics if you change it
58
+
-`avgPrefix` - prefix for metric to calculate average. Do not forget to include it in allowedMetrics if you change it
59
+
-`minPrefix` - prefix for metric to find minimal value. Do not forget to include it in allowedMetrics if you change it
60
+
-`maxPrefix` - prefix for metric to find maximum value. Do not forget to include it in allowedMetrics if you change it
61
+
-`aggrInterval` - summing up interval for metrics with all prefixes. In seconds
62
+
-`aggrPerSecond` - amount of aggregations which grafsy performs per second. If grafsy receives more metrics than `aggrPerSecond * aggrInterval` - rest will be dropped
63
63
64
64
## Monitoring
65
65
66
-
- monitoringPath - Full path for metrics, send by grafsy itself. "HOSTNAME" will be replaced with os.Hostname() result from GO.
67
-
If os.Hostname() returns result with dots in it - they will be replaced with "_".
68
-
You can define your own path. If it does not contain magic "HOSTNAME" word, it will be preserved.
69
-
At the end of your path grafsy will append **grafsy.{sent,dropped,got...}**
70
-
E.g **servers.HOSTNAME.software** or **servers.my-awesome-hostname**
71
-
Default is "HOSTNAME"
66
+
-`monitoringPath` - full path for metrics, send by grafsy itself. "HOSTNAME" will be replaced with `os.Hostname()` result from GO.
67
+
If os.Hostname() returns result with dots in it - they will be replaced with `_`.
68
+
You can define your own path. If it does not contain magic "HOSTNAME" word, it will be preserved.
69
+
At the end of your path grafsy will append **grafsy.{sent,dropped,got...}**
70
+
E.g **servers.HOSTNAME.software** or **servers.my-awesome-hostname**
71
+
Default is "HOSTNAME"
72
72
73
73
## Overwrite
74
-
Grafsy can overwrite metric name. It might be very useful if you have a software, which has hardcoded path. E.g., PowerDNS 3.
74
+
Grafsy can overwrite metric name. It might be very useful if you have a software, which has hardcoded path. E.g., PowerDNS 3.
75
75
You can specify as many overwrites as you want. Each of them must be in separate section:
76
76
```toml
77
77
[[overwrite]]
@@ -86,16 +86,15 @@ This will ask Grafsy to replace all kinds of metric starting with **pdns** or ag
86
86
# Installation
87
87
88
88
- Install go https://golang.org/doc/install
89
-
- Make a proper structure of directories: ```mkdir -p /opt/go/src /opt/go/bin /opt/go/pkg```
90
-
- Setup g GOPATH variable: ```export GOPATH=/opt/go```
91
-
- Clone this project to src: ```go get github.com/leoleovich/grafsy```
92
-
- Fetch dependencies: ```cd /opt/go/github.com/leoleovich/grafsy && go get ./...```
0 commit comments