自动化与监控运维日志
监控体系
一、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