欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
Prometheus Grafana監控系統安裝實(shí)記

1 安裝prometheus

1 下載軟件

[root@localhost opt]# wget

[root@localhost opt]# ls

kingbus mysql8.0 prometheus-2.13.1.linux-amd64.tar.gz

[root@localhost opt]# tar zxf prometheus-2.13.1.linux-amd64.tar.gz

[root@localhost opt]# cd prometheus-2.13.1.linux-amd64/

[root@localhost prometheus-2.13.1.linux-amd64]# ls

console_libraries consoles LICENSE NOTICE prometheus prometheus.yml promtool tsdb

2 service 文件

[root@localhost opt]# vi /usr/lib/systemd/system/prometheus.service

[root@localhost opt]# cat /usr/lib/systemd/system/prometheus.service

[Unit]

Description=Prometheus Server

Documentation=https://prometheus.io/docs/introduction/overview/

After=network.target

[Service]

User=prometheus

Restart=on-failure

WorkingDirectory=/opt/prometheus-2.13.1.linux-amd64/

ExecStart=/opt/prometheus-2.13.1.linux-amd64/prometheus --config.file=/opt/prometheus-2.13.1.linux-amd64/prometheus.yml

[Install]

WantedBy=multi-user.target

3 添加用戶(hù)

[root@localhost opt]# adduser prometheus

[root@localhost opt]# chown prometheus:prometheus -R ./prometheus-2.13.1.linux-amd64/

4 啟動(dòng)服務(wù)

[root@localhost opt]# systemctl daemon-reload

[root@localhost ~]# systemctl start Prometheus

5 訪(fǎng)問(wèn)web

(本地ip:9090)

點(diǎn)擊Status—Target 可以看到Prometheus的metrics

目前看到的只是Prometheus的一些監控項,我們一下安裝一些插件來(lái)完成系統監控項的一些收集

2 安裝node-exporter

[root@localhost opt]# tar zxf node_exporter-0.18.1.linux-amd64.tar.gz

[root@localhost opt]# cd node_exporter-0.18.1.linux-amd64/

[root@localhost node_exporter-0.18.1.linux-amd64]# ls

LICENSE node_exporter NOTICE

2 service文件

[root@localhost opt]# vi /usr/lib/systemd/system/node_exporter.service

[root@localhost opt]# cat /usr/lib/systemd/system/node_exporter.service

Description=node_exporter

Type=simple

ExecStart=/opt/node_exporter-0.18.1.linux-amd64/node_exporter

3 修改權限

[root@localhost opt]# chown prometheus:prometheus -R ./node_exporter-0.18.1.linux-amd64

[root@localhost ~]# systemctl start node_exporter

4 添加prometheus的job

[root@localhost prometheus-2.13.1.linux-amd64]# cat prometheus.yml

# my global config

global:

scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.

evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.

# scrape_timeout is set to the global default (10s).

# Alertmanager configuration

alerting:

alertmanagers:

- static_configs:

- targets:

# - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.

rule_files:

# - 'first_rules.yml'

# - 'second_rules.yml'

# A scrape configuration containing exactly one endpoint to scrape:

# Here it's Prometheus itself.

scrape_configs:

# The job name is added as a label `job=` to any timeseries scraped from this config.

- job_name: 'prometheus'

# metrics_path defaults to '/metrics'

# scheme defaults to 'http'.

static_configs:

- targets: ['192.168.135.240:9090']

- job_name: 192.168.135.240_centos

- targets: ['192.168.135.240:9100']

labels:

instance: 192.168.135.240_centos

##此部分為新加的nodxexporter的地址信息nodeexporter的默認端口是9100

5 重啟prometheus

[root@localhost prometheus-2.13.1.linux-amd64]# systemctl restart prometheus

可以看到nodeexporter的信息已經(jīng)發(fā)送到了prometheus,為了更好的展示我們收集到的監控信息安裝grafana

6 grafana

Dashboard https://grafana.com/api/dashboards/10645/revisions/1/download

3 安裝grafana

[root@localhost opt]# tar zxf grafana-6.4.3.linux-amd64.tar.gz

[root@localhost bin]# cd /usr/lib/systemd/system

[root@localhost bin]# cat /usr/lib/systemd/system/grafana.service

Description=Grafana Server

EnvironmentFile=/opt/grafana-6.4.3/conf/grafana-server

WorkingDirectory=/opt/grafana-6.4.3

ExecStart=/opt/grafana-6.4.3/bin/grafana-server \\

--config=${CONF_FILE} \\

--pidfile=${PID_FILE_DIR}/grafana-server.pid \\

--packaging=rpm \\

cfg:default.paths.logs=${LOG_DIR} \\

cfg:default.paths.data=${DATA_DIR} \\

cfg:default.paths.plugins=${PLUGINS_DIR} \\

cfg:default.paths.provisioning=${PROVISIONING_CFG_DIR}

[root@localhost bin]# cat /opt/grafana-6.4.3/conf/grafana-server

GRAFANA_USER=grafana

GRAFANA_GROUP=grafana

GRAFANA_HOME=/opt/grafana-6.4.3/

LOG_DIR=/opt/grafana-6.4.3/data/log

DATA_DIR=/opt/grafana-6.4.3/data

MAX_OPEN_FILES=10000

CONF_DIR=/opt/grafana-6.4.3/conf

CONF_FILE=/opt/grafana-6.4.3/conf/defaults.ini

RESTART_ON_UPGRADE=true

PLUGINS_DIR=/opt/grafana-6.4.3/data/plugins

# Only used on systemd systems

PID_FILE_DIR=/opt/grafana-6.4.3/data

3 啟動(dòng)服務(wù)

[root@localhost system]# systemctl daemon-reload

[root@localhost system]# systemctl start grafana

4 訪(fǎng)問(wèn)web

http:192.168.135.240:3000(本地ip:3000) 用戶(hù)名密碼admin:admin

1 添加數據源

Configuration---Add data source

因為我們的數據是prometheus所以此處選擇prometheus

2 添加dashboard

這里可以添加一寫(xiě)系統自帶的prometheus的dashboard但是只可以看到prometheus的一些監控信息

3下載其他dashboard模板

下載好模板后再Dashboars – Manage 選擇import 將文件導入

導入后就可以看到我們新加的模板,點(diǎn)擊他就可以看到監控頁(yè)面了

注:如果頁(yè)面上又報錯說(shuō)grafana-piechart-panel不存在那么就安裝他

[root@localhost bin]# ./grafana-cli plugins install grafana-piechart-panel

installing grafana-piechart-panel @ 1.3.9

from: https://grafana.com/api/plugins/grafana-piechart-panel/versions/1.3.9/download

into: /var/lib/grafana/plugins

? Installed grafana-piechart-panel successfully

Restart grafana after installing plugins .

[root@localhost bin]# systemctl restart grafana

4 安裝mysqld_exporter

[root@localhost opt]# wget https://github.com/prometheus/mysqld_exporter/releases/download/v0.12.1/mysqld_exporter-0.12.1.linux-amd64.tar.gz

[root@localhost opt]$ tar zxf mysqld_exporter-0.12.1.linux-amd64.tar.gz

[root@localhost mysqld_exporter-0.12.1.linux-amd64]# ls

LICENSE mysqld_exporter NOTICE

[root@localhost mysqld_exporter-0.12.1.linux-amd64]# cat /usr/lib/systemd/system/mysqld_exporter.service

ExecStart=/opt/mysqld_exporter-0.12.1.linux-amd64/mysqld_exporter --config.my-cnf=/opt/mysqld_exporter-0.12.1.linux-amd64/.my.cnf

[root@localhost mysqld_exporter-0.12.1.linux-amd64]# cat .my.cnf

[client]

user=jian

password=123456

3 修改權限創(chuàng )建user

mysql> create user jian@'%' identified by '123456';

Query OK, 0 rows affected (0.02 sec)

mysql> grant replication client,process on *.* to jian@'%';

Query OK, 0 rows affected (0.01 sec)

mysql> grant select on performance_schma.* to jian@'%';

[root@localhost opt]# chown prometheus:prometheus -R ./mysqld_exporter-0.12.1.linux-amd64 [root@localhost opt]# systemctl daemon-reload

[root@localhost opt]# systemctl start mysqld_exporter

- job_name: 192.168.135.236_mysql

- targets: ['192.168.135.236:9104']

instance: 192.168.135.236_mysql

##此部分為新加的mysqldxexporter的地址信息mysqldexporter的默認端口是9104

Dashboard:

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
顏值實(shí)力派—打造MySQL運行監控環(huán)境
Prometheus Grafana,開(kāi)源監控神器!
【MySQL】企業(yè)級監控解決方案Promethus Grafana · 語(yǔ)雀
ASP.NET Core 集成Prometheus+grafana
EMQX+Prometheus+Grafana:MQTT 數據可視化監控實(shí)踐
配置 Prometheus 服務(wù)器監控和 Grafana 看板
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久