1. 程式人生 > 實用技巧 >自動化與監控運維日誌

自動化與監控運維日誌

監控體系

自動化與監控運維日誌

一、grafana介面顯示無資料展示

自動化與監控運維日誌

排錯流程:

1、找到錶盤所顯示的資料來源
2、登陸到資料來源所在機器,檢視資料庫是否在執行
2.1、未執行,則執行資料庫
2.2、執行中,則登陸資料庫
2.2.1、influxdb直接在系統中influx登陸,
2.2.2、prometheus直接登陸主機IP:9090
3、檢視無資料顯示的資料庫中有無資料
3.1、庫中有資料,檢查資料來源與grafana之間連線
3.2、庫中無資料,檢查資料來源與採集軟體(指令碼)之間連線
4、檢視採集元件(node_exporter或採集指令碼)是否執行
4.1、未執行,則執行採集元件
4.2、執行中,檢查採集元件是否存在問題

現狀:

1、influxdb庫中資料到昨天下午截止
2、手動執行採集指令碼(通過curl的-X POST方式上傳)
自動化與監控運維日誌

報錯:influxdb-error:max-values-per-tag limit 100000
influxdb官網對於這條配置的解釋:
https://docs.influxdata.com/enterprise_influxdb/v1.7/administration/config-data-nodes/#max-values-per-tag-100000

處理方法1:清除舊資料

influx

use DATABASES;
show measurements 查看錶
drop measurement TABLES;

處理方法2:修改influxdb配置,將max-values-per-tag的值改為0,意思是不限制資料條數

配置檔案:influxdb.conf
自動化與監控運維日誌

二、ansible報錯

ERROR! Unexpected Exception, this is probably a bug: (cryptography 0.8.2 (/usr/lib64/python2.7/site-packages), Requirement.parse('cryptography>=1.1'))

原因:cryptography模組版本過低
處理方法:pip安裝
1、下載pip
https://pypi.org/project/pip/#files
pip-19.1.tar.gz
wheel-0.33.1-py2.py3-none-any.whl

2、安裝

tar xzvf pip-19.1.tar.gz
cd pip-19.1/
python setup.py install
pip install wheel-0.33.1-py2.py3-none-any.whl

3、安裝cryptography
https://pypi.org/project/cryptography/#files
cryptography-2.6.1-cp27-cp27mu-manylinux1_x86_64.whl

pip install cryptography-2.6.1-cp27-cp27mu-manylinux1_x86_64.whl

三、grafana介面展示資料中斷

自動化與監控運維日誌

現狀:

1、grafana資料來源配置連線正常
2、資料來源influxdb資料中斷
自動化與監控運維日誌
3、懷疑是telegraf問題

處理:重啟telegraf

systemctl restart telegraf
資料入庫正常
自動化與監控運維日誌
grafana介面顯示正常

轉載於:https://blog.51cto.com/jiayimeng/2385360