forked from dschutterop/Graphite-graylog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
47 lines (38 loc) · 1.76 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Pushing monitoring data into Graphite
The Python scripts in this repository should help you on your way:
- elasticsearch_clusterhealth.py
- elasticsearch_indexes.py
- graylog_notifications.py
- graylog_throughput.py
### elasticsearch_clusterhealth.py
This script grabs the health status from Elasticsearch and transforms the string value to an integer (as Graphite can't handle strings):
- green = 0
- yellow = 1
- red = 2
It also transforms the boolean value of timed_out to 0 or 1
### elasticsearch_indices.py
This script grabs and rewrites index data metrics from Elasticsearch. one of the issues between elastic and Graylog is the orientation; where elastic messages are language oriented (cluster status green), Graphite can't handle anything but integers, therefor we rewrite a bunch of entries so we can make sense of it (in Grafana).
The data we push into Graphite:
- total number of indices
- number of green (ok) indices
- number of yellow (impaired) indices
- number of red (errro) indices
- number of messages
- deleted documents
- total store size in bytes
- total store size in gigabytes
- total store size in megabytes
- primary store size in bytes
- primary store size in gigabytes
- primary store size in megabytes
- replica store size in bytes
- replica store size in gigabytes
- replica store size in megabytes
- primary shards
- replica shards
### graylog_notifications.py
A script that grabs the number of current notifications from a graylog node and pushes the integer value into Graylog.
Nothing too special
### graylog_throughput.py
Grabs the Graylog throughput (number of messages) and pushes it into Graphite so you can unleash all kinds of funky graphs, through Grafana too!
# All files contain the necessary information to get you going!