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
diff --git a/expr/functions/cairo/png/picture_params.go b/expr/functions/cairo/png/picture_params.go | |
index 43402d2..34fa781 100644 | |
--- a/expr/functions/cairo/png/picture_params.go | |
+++ b/expr/functions/cairo/png/picture_params.go | |
@@ -3,6 +3,7 @@ package png | |
import ( | |
"math" | |
"net/http" | |
+ "net/url" | |
"strconv" |
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
1. Убедиться что не бывает тегированных метрик с точкой в имени. Проще всего это сделать по табличке с индексом серий. | |
SELECT * FROM graphite_tagged WHERE position(Path, '?') > 0 AND position(Path, '.') > 0 AND position(Path, '.') < position(Path, '?'); | |
Должен вернуть пустой результат | |
2. Заинсертить с исправленным значением Path | |
INSERT INTO graphite_reverse (Path,Value,Time,Date,Timestamp) |
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
Общий смысл: | |
- мы из своей карты серверов и сервисов генерим правила разметки метрик. | |
после этого в графите появляется виртуальная директория _tag. В ней список тегов. | |
Внутри каждого из них опять все дерево (но уже ограниченное метриками, подходящими под тег) и снова директория _tag | |
У нас соответственно теги по сервисам, датацентрам и тд. Очень удобно для построения дашбордов вида | |
_tag.service_name.host.*.cpu_avg | |
----- |
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
#!/bin/bash | |
set -x | |
set -e | |
IMAGE="Докер образ с centos7, rpmbuild, fpm" | |
# Докер-образ строится примерно такой командой (возможно что-то забыто): | |
# RUN yum install -y rpm-build ruby ruby-devel rubygems && gem install fpm && yum clean all | |
docker run --rm -ti $IMAGE bash -c ' |
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
#!/bin/sh | |
# | |
# chkconfig: - 91 35 | |
# description: Starts and stops the go-carbon daemon | |
# | |
# pidfile: /var/run/go-carbon.pid | |
# config: /etc/go-carbon/go-carbon.conf | |
DAEMON="/usr/bin/go-carbon" | |
NAME=$(basename $DAEMON) |
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
#!/usr/bin/env python | |
# RUN ./change_xfilesfactor.py blabla.wsp | |
import mmap | |
import sys | |
import struct | |
X_FILES_FACTOR = 0.01 | |
EPSILON = 0.00000001 | |
FLOAT_FORMAT = "!f" |