대시보드의 메모
OS는 Ubuntu 14.04x8664
InflexDB 준비
InfluxDB - Open Source Time Series, Metrics, and Analytics Database
설치하다.
$ curl -LO http://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb
$ sudo dpkg -i influxdb_latest_amd64.deb
설정
config.toml
--- /opt/influxdb/shared/config.toml.bak 2014-10-12 02:52:28.992938615 +0000
+++ /opt/influxdb/shared/config.toml 2014-10-12 02:53:06.544940216 +0000
@@ -40,9 +40,9 @@
# Configure the graphite api
[input_plugins.graphite]
- enabled = false
- # port = 2003
- # database = "" # store graphite data in this database
+ enabled = true
+ port = 2003
+ database = "graphite" # store graphite data in this database
# udp_enabled = true # enable udp interface on the same port as the tcp interface
# Configure the udp api
부팅
$ sudo service influxdb start
데이터베이스 만들기
브라우저 액세스
http://example.com:8083/에서 만들기
graphite 데이터베이스 만들기
graphite를 입력하고 Create Database를 눌러 데이터베이스를 생성graphite의 링크를 눌러graphite 데이터베이스를 만든 사용자grafana 데이터베이스 만들기(대시보드용)
grafana를 입력하고 Create Database를 눌러 데이터베이스를 생성grafana의 링크를 눌러graphite 데이터베이스를 만든 사용자데이터 저장
Diamond를 사용하여 InflumxDB에 메트릭 저장
BrightcoveOS/Diamond
저장된 메트릭 확인
접근http://example.com:8083/graphite 데이터베이스에 연결
Query에
list series를 입력하면 graphite 데이터베이스에 저장된 메트릭이 표시됩니다.
Grafana
Grafana - Graphite and InfluxDB Dashboard and graph composer
설치하다.
Docoment Root에서 grafana를 위한 웹 서버를 미리 설정합니다.tar.펼치다
$ cd $DocumentRoot
$ curl -LO http://grafanarel.s3.amazonaws.com/grafana-1.8.1.tar.gz
$ tar zxvf http://grafanarel.s3.amazonaws.com/grafana-1.8.1.tar.gz
설정
$ cd grafana-1.8.1
$ cp config.sample.js config.js
config.js--- config.sample.js 2014-09-30 16:42:49.000000000 +0000
+++ config.js 2014-10-12 02:59:07.784955615 +0000
@@ -36,6 +36,22 @@
},
*/
+ datasources: {
+ influxdb: {
+ type: 'influxdb',
+ url: "http://example.com:8086/db/graphite",
+ username: 'admin',
+ password: 'password',
+ },
+ grafana: {
+ type: 'influxdb',
+ url: "http://example.com:8086/db/grafana",
+ username: 'admin',
+ password: 'password',
+ grafanaDB: true
+ },
+ },
+
// Graphite & Elasticsearch example setup
/*
datasources: {
차트 표시
액세스http://example.com/grafana-1.8.1
Edit
First Graph (click title to edit)를 선택하려면 누르십시오.series name를 선택하면 InfluxDB에 저장된 메트릭을 표시하므로 차트에 표시할 메트릭
한 도표에 여러 개의 조회 결과를 표시할 수도 있다
Influga
hakobera/influga
설치하다.
$ npm install -g influga
설정
프로파일 템플릿 만들기
$ influga init
Config file template is created to influga-config.json
Edit config for your environment
{
"dashboardDbPath": "./db/influga.db",
"host": "localhost",
"port": 8086,
"database": "db",
"username": "root",
"password": "root"
}
InflumxDB의 설정에 따라 다릅니다.json 변경influga-config.json
--- influga-config.json.bak 2014-10-12 03:35:48.739833258 +0000
+++ influga-config.json 2014-10-12 03:36:59.947836293 +0000
@@ -1,8 +1,8 @@
{
"dashboardDbPath": "./db/influga.db",
- "host": "localhost",
+ "host": "example.com",
"port": 8086,
- "database": "db",
- "username": "root",
- "password": "root"
-}
\ No newline at end of file
+ "database": "graphite",
+ "username": "admin",
+ "password": "password"
+}
부팅
$ influga -c influga-config.json start
차트 표시
브라우저에서com: 8089 액세스, Query 설정 등
설정된 차트 표시
Tasseo
obfuscurity/tasseo
설치하다.
$ git clone https://github.com/obfuscurity/tasseo
$ cd tasseo
$ bundle install
설정
계기판에 표시된metrics는dashboard/이하입니다.js 파일로 설정
$ cat <<EOT>dashboards/ubuntu-14-04-cpu0.js
var period = 1;
var metrics =
[
{
alias: "servers.ubuntu-1404.cpu.cpu0.user",
target: "value",
series: "servers.ubuntu-1404.cpu.cpu0.user",
unit: "%",
warning: 30,
critical: 60
},
{
alias: "servers.ubuntu-1404.cpu.cpu0.system",
target: "value",
series: "servers.ubuntu-1404.cpu.cpu0.system",
unit: "%",
warning: 30,
critical: 60
},
{
alias: "servers.ubuntu-1404.cpu.cpu0.idle",
target: "value",
series: "servers.ubuntu-1404.cpu.cpu0.idle",
unit: "%"
},
];
EOT
$ cat <<EOT>dashboards/ubuntu-14-04-cpu1.js
var period = 1;
var metrics =
[
{
alias: "servers.ubuntu-1404.cpu.cpu1.user",
target: "value",
series: "servers.ubuntu-1404.cpu.cpu1.user",
unit: "%",
warning: 30,
critical: 60
},
{
alias: "servers.ubuntu-1404.cpu.cpu1.system",
target: "value",
series: "servers.ubuntu-1404.cpu.cpu1.system",
unit: "%",
warning: 30,
critical: 60
},
{
alias: "servers.ubuntu-1404.cpu.cpu1.idle",
target: "value",
series: "servers.ubuntu-1404.cpu.cpu1.idle",
unit: "%"
},
];
EOT
부팅
$ foreman start
차트 표시
http://example.com:5000/에 방문하면dashboard/다음에 만든 js 파일의 이름 링크를 표시합니다
링크를 누르면 각 도표가 표시됩니다
js 파일에 설정된 Warning과critical의 값을 초과하면 도표의 색이 변합니다
Reference
이 문제에 관하여(대시보드의 메모), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/Hexa/items/052014ebb46f48b48dbf텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)