OpenShift实战(六):OpenShift日志监控EFK
1、镜像下载
为了防止安装过程中由于镜像下载缓慢导致自动部署失败,所以首先提前下载好EFK镜像。
docker pull openshift/origin-logging-fluentd
docker pull openshift/origin-logging-elasticsearch
docker pull openshift/origin-logging-kibana
docker pull openshift/origin-logging-auth-proxy
2、创建持久化PV
由于日志需要保存方便查询历史数据,故创建PV保存Elasticsearch的数据。
[root@master1 pv]# cat logging.json
apiVersion: v1
kind: PersistentVolume
metadata:
name: logging
spec:
capacity:
storage: 101Gi
accessModes:
- ReadWriteOnce
nfs:
path: /export/pv/logging
server: 192.168.10.110
persistentVolumeReclaimPolicy: Retain
3、修改ansible hosts
基于上节的hosts,添加的内容为红色字体部分。
[root@master1 ~]# cat /etc/ansible/hosts
# Create an OSEv3 group that contains the masters, nodes, and etcd groups
[OSEv3:children]
masters
nodes
etcd
new_nodes
#lb
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root
ansible_become=yes
debug_level=
openshift_deployment_type=origin
# If ansible_ssh_user is not root, ansible_become must be set to true
#ansible_become=true
openshift_repos_enable_testing=true
openshift_enable_service_catalog=false
template_service_broker_install=false
# uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
openshift_disable_check=disk_availability,docker_storage,memory_availability,docker_image_availability,package_version
# config for metrics
openshift_release=3.6.
openshift_metrics_install_metrics=true
openshift_metrics_image_prefix=openshift/origin-
openshift_metrics_image_version=v3.6.1
openshift_metrics_cassandra_pvc_size=21Gi # config for logging
openshift_logging_install_logging=true
#openshift_logging_image_prefix=openshift/origin-
#openshift_logging_image_version=v3.6.1
openshift_logging_master_url=https://master1.xxx.net:8443
openshift_logging_master_public_url=https://master1.xxx.net:8443
#openshift_logging_storage_volume_size=101Gi
openshift_logging_kibana_hostname=kibana.xxx.net
openshift_logging_es_allow_external=True
openshift_logging_es_hostname=elasticsearch.xxx.net
openshift_logging_es_pvc_dynamic=true
openshift_logging_es_pvc_size=101Gi
openshift_logging_es_cluster_size=1
openshift_logging_curator_default_days=30
openshift_logging_use_journal=true
openshift_logging_journal_read_from_head=false
openshift_logging_es_cluster_size=1
openshift_logging_es_nodeselector={"region":"infra"}
openshift_logging_kibana_nodeselector={"region":"infra"} # config by metrics
openshift_clock_enabled=true
#openshift_master_cluster_method=native
#openshift_master_cluster_hostname=openshift.xxx.net
#openshift_master_cluster_public_hostname=openshift.xxx.net
#openshift_node_kubelet_args={'pods-per-core': [''], 'max-pods': [''], 'image-gc-high-threshold': [''], 'image-gc-low-threshold': ['']}
# host group for masters
[masters]
master1.xxx.net
#master2.xxx.net # host group for lb
#[lb]
#etcd1.xxx.net # host group for etcd
[etcd]
etcd1.xxx.net
etcd2.xxx.net
etcd3.xxx.net
# host group for nodes, includes region info
[nodes]
master1.xxx.net
#master2.xxx.net
node1.xxx.net openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
node2.xxx.net openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
node3.xxx.net openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
node4.xxx.net
node5.xxx.net
node6.xxx.net openshift_node_labels="{'region': 'subnet8', 'zone': 'default'}"
node7.xxx.net openshift_node_labels="{'region': 'subnet8', 'zone': 'default'}"
node8.xxx.net openshift_node_labels="{'region': 'subnet7', 'zone': 'default'}"
node9.xxx.net openshift_node_labels="{'region': 'subnet7', 'zone': 'default'}"
#
[new_nodes]
4、执行安装
ansible-playbook -i /etc/ansible/hosts openshift-ansible-openshift-ansible-3.6.173.0.-/playbooks/byo/openshift-cluster/openshift-logging.yml
5、成功界面

6、Web控制台验证
fluentd主要用于数据采集,会在每个node上创建一个容器,服务会部署在logging下。

7、查看storage

8、查看日志


OpenShift实战(六):OpenShift日志监控EFK的更多相关文章
- ElasticSearch实战-日志监控平台
1.概述 在项目业务倍增的情况下,查询效率受到影响,这里我们经过讨论,引进了分布式搜索套件——ElasticSearch,通过分布式搜索来解决当下业务上存在的问题.下面给大家列出今天分析的目录: El ...
- Python爬虫实战六之抓取爱问知识人问题并保存至数据库
大家好,本次为大家带来的是抓取爱问知识人的问题并将问题和答案保存到数据库的方法,涉及的内容包括: Urllib的用法及异常处理 Beautiful Soup的简单应用 MySQLdb的基础用法 正则表 ...
- SpringSecurity权限管理系统实战—二、日志、接口文档等实现
系列目录 SpringSecurity权限管理系统实战-一.项目简介和开发环境准备 SpringSecurity权限管理系统实战-二.日志.接口文档等实现 SpringSecurity权限管理系统实战 ...
- Spring Boot 2.X(十六):应用监控之 Spring Boot Actuator 使用及配置
Actuator 简介 Actuator 是 Spring Boot 提供的对应用系统的自省和监控功能.通过 Actuator,可以使用数据化的指标去度量应用的运行情况,比如查看服务器的磁盘.内存.C ...
- 第1节 storm日志告警:1、 - 5、日志监控告警业务需求、代码、集群运行、总结
如何解决短信或者邮件频繁发送的问题:每次发送的时候都先查询数据库记录,看一下有没有给这个人发送消息,上一次发送消息的时间是什么时候,如果发送时间间隔小于半个小时,就不要再发了 ============ ...
- SpringSecurity权限管理系统实战—六、SpringSecurity整合jwt
目录 SpringSecurity权限管理系统实战-一.项目简介和开发环境准备 SpringSecurity权限管理系统实战-二.日志.接口文档等实现 SpringSecurity权限管理系统实战-三 ...
- Linux系统实战项目——sudo日志审计
Linux系统实战项目——sudo日志审计 由于企业内部权限管理启用了sudo权限管理,但是还是有一定的风险因素,毕竟运维.开发等各个人员技术水平.操作习惯都不相同,也会因一时失误造成误操作,从而 ...
- [Asp.net]SignalR实现实时日志监控
摘要 昨天吃饭的时候,突然想起来一个好玩的事,如果能有个页面可以实时的监控网站或者其他类型的程序的日志,其实也不错.当然,网上也有很多成熟的类似的监控系统.就想着如果通过.net该如何实现?所以就在想 ...
- elk实战分析nginx日志文档
elk实战分析nginx日志文档 架构: kibana <--- es-cluster <--- logstash <--- filebeat 环境准备:192.168.3.1 no ...
随机推荐
- 分享:docker swarm集群搭建
[Y_H]实践原创 三台虚拟机:1台centOS , 2台ubuntu. 网上有用docker-machine创建虚拟机做的例子. 这里直接用VMware创建这三台虚拟机,然后用xshell连 ...
- Linux进程间通信-消息队列(mqueue)
前面两篇文章分解介绍了匿名管道和命名管道方式的进程间通信,本文将介绍Linux消息队列(posix)的通信机制和特点. 1.消息队列 消息队列的实现分为两种,一种为System V的消息队列,一种是P ...
- 关于Java的异常
异常机制概述 异常机制是指当程序出现错误后,程序如何处理.具体来说,异常机制提供了程序退出的安全通道.当出现错误后,程序执行的流程发生改变,程序的控制权转移到异常处理器. 异常处理的流程 当程序中抛出 ...
- surging教学视频资源汇总
surging是什么 surging 是一个分布式微服务框架,提供高性能RPC远程服务调用,采用Zookeeper.Consul作为surging服务的注册中心,集成了哈希,随机,轮询.压力最小优先作 ...
- WPF自学入门(十一)WPF MVVM模式Command命令
在WPF自学入门(十)WPF MVVM简单介绍中的示例似乎运行起来没有什么问题,也可以进行更新.但是这并不是我们使用MVVM的正确方式.正如上一篇文章中在开始说的,MVVM的目的是为了最大限度地降低了 ...
- 解决yii2中 Class yii/web/JsonParser does not exist, ReflectionException问题
最近在调试RESTful API示例时,出现以下错误: { "name": "Exception", "message": "Cl ...
- Docker学习笔记 - Docker的基本概念
一.cs架构 Docker客户端:本地或远程 Docker服务端:守护进程Docker Daemon 二.基本概念 Docker镜像:打包阶段,层叠的只读文件系统,引导->root(ubuntu ...
- 新概念英语(1-7)Are you a teacher?
What is Robert's job? A:I am a new student. My name is Robert. B:Nice to meet you. My name's Sophie. ...
- 新概念英语(1-59)Is that all
Does the lady buy any chalk? A:I want some envelopes, please. B:Do you want the large size or the sm ...
- Easyui Datagrid 修改显示行号列宽度
EasyUI中Datagrid的第一列显示行号,可是如果数据量大的的时候,显示行号的那一列数据会显示不完全的. 可以通过修改Datagrid的样式来解决这个问题,在样式中加入下面这个样式,就可以自己修 ...