Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
ghichep-grafana
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hiep Nguyen
ghichep-grafana
Commits
694220aa
Commit
694220aa
authored
Jan 24, 2016
by
Tô Thành Công
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cập nhật hướng dẫn
cập nhật hướng dẫn
parent
d24aa479
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
106 deletions
+110
-106
caidat-grafana.md
caidat-grafana.md
+107
-0
ghichep-grafana.md
ghichep-grafana.md
+3
-106
No files found.
caidat-grafana.md
0 → 100644
View file @
694220aa
#### Các ghi chép về Grafana
### Cài đặt grafana
-
Môi trường cài đặt
```
sh
```
-
Các lệnh cài đặt
```
sh
echo
"deb https://packagecloud.io/grafana/stable/debian/ wheezy main"
>>
/etc/apt/sources.list
curl https://packagecloud.io/gpg.key |
sudo
apt-key add -
sudo
apt-get update
sudo
apt-get
-y
install
grafana
```
-
Khởi động grafana
```
sh
sudo
service grafana-server start
```
-
Khởi động cùng OS
```
sh
sudo
update-rc.d grafana-server defaults 95 10
```
##### Cấu hình cho zabbix
```
sh
Tham khảo: https://github.com/alexanderzobnin/grafana-zabbix
```
-
Download plugin zabbix cho grafana tu link
```
sh
https://github.com/alexanderzobnin/grafana-zabbix/releases/tag/v2.5.1
hoặc
https://github.com/alexanderzobnin/grafana-zabbix
```
-
Giải nén file
```
sh
apt-get
install
unzip
unzip grafana-zabbix-2.5.1.zip
```
-
Copy thư mục zabbix vừa giải nén vào thư mục plugin của grafana
```
sh
cp
-r
/root/grafana-zabbix-2.5.1/zabbix/ /usr/share/grafana/public/app/plugins/datasource/
```
-
Sửa file
`plugin.json`
trong thư mục
`/usr/share/grafana/public/app/plugins/datasource/zabbix`
như sau (thêm 2 dòng username và password)
```
sh
{
"pluginType"
:
"datasource"
,
"name"
:
"Zabbix"
,
"type"
:
"zabbix"
,
"serviceName"
:
"ZabbixAPIDatasource"
,
"module"
:
"app/plugins/datasource/zabbix/datasource"
,
"partials"
:
{
"config"
:
"app/plugins/datasource/zabbix/partials/config.html"
}
,
"username"
:
"admin"
,
"password"
:
"DATA2o016ZaBB1x"
,
"metrics"
:
true
,
"annotations"
:
true
}
```
-
Khởi động lại grafana
```
sh
service grafana-server restart
```
#### Phía client
##### Các bước add trên Zabbix


```
sh
5: Khai báo đường dẫn như sau
http://IP_CUA_MAY_CHU_ZABBIX/zabbix/api_jsonrpc.php
6: Chọn proxy
7: Tài khoản của Zabbix
8: Mật khẩu của Zabbix
```

\ No newline at end of file
ghichep-grafana.md
View file @
694220aa
#### Các ghi chép về G
rafana
### Các chú ý trong g
rafana
### Cài đặt grafana
-
Môi trường cài đặt
```
sh
```
-
Các lệnh cài đặt
```
sh
echo
"deb https://packagecloud.io/grafana/stable/debian/ wheezy main"
>>
/etc/apt/sources.list
curl https://packagecloud.io/gpg.key |
sudo
apt-key add -
sudo
apt-get update
sudo
apt-get
-y
install
grafana
```
-
Khởi động grafana
```
sh
sudo
service grafana-server start
```
-
Khởi động cùng OS
```
sh
sudo
update-rc.d grafana-server defaults 95 10
```
##### Cấu hình cho zabbix
```
sh
Tham khảo: https://github.com/alexanderzobnin/grafana-zabbix
```
-
Download plugin zabbix cho grafana tu link
```
sh
https://github.com/alexanderzobnin/grafana-zabbix/releases/tag/v2.5.1
hoặc
https://github.com/alexanderzobnin/grafana-zabbix
```
-
Giải nén file
```
sh
apt-get
install
unzip
unzip grafana-zabbix-2.5.1.zip
```
-
Copy thư mục zabbix vừa giải nén vào thư mục plugin của grafana
```
sh
cp
-r
/root/grafana-zabbix-2.5.1/zabbix/ /usr/share/grafana/public/app/plugins/datasource/
```
-
Sửa file
`plugin.json`
trong thư mục
`/usr/share/grafana/public/app/plugins/datasource/zabbix`
như sau (thêm 2 dòng username và password)
```
sh
{
"pluginType"
:
"datasource"
,
"name"
:
"Zabbix"
,
"type"
:
"zabbix"
,
"serviceName"
:
"ZabbixAPIDatasource"
,
"module"
:
"app/plugins/datasource/zabbix/datasource"
,
"partials"
:
{
"config"
:
"app/plugins/datasource/zabbix/partials/config.html"
}
,
"username"
:
"admin"
,
"password"
:
"DATA2o016ZaBB1x"
,
"metrics"
:
true
,
"annotations"
:
true
}
```
-
Khởi động lại grafana
```
sh
service grafana-server restart
```
#### Phía client
##### Các bước add trên Zabbix


```
sh
5: Khai báo đường dẫn như sau
http://IP_CUA_MAY_CHU_ZABBIX/zabbix/api_jsonrpc.php
6: Chọn proxy
7: Tài khoản của Zabbix
8: Mật khẩu của Zabbix
```

\ No newline at end of file
-
Từ bản 2.0 trở đi, khai báo datasource đã được đưa lên dashboard nên không phải khai báo trong file config.js như trước nữa.
-
Việc khai báo datasource trên dashboard sẽ sử dụng database để lưu trữ do vậy không cần sử dụng Elasticsearch nữa.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment