当前位置: 首页 > news >正文

ui设计师是吃青春饭吗网站优化seo培训

ui设计师是吃青春饭吗,网站优化seo培训,南昌做网站开发的公司有哪些,如何在租用的服务器上部署自己的网站 mysql文章目录 es 集群创建密码kibana 配置文件以及和nginx配置pm2 安装定期清理索引以及告警logstash 配置filebeat 配置文件nginx 的日志索引 es 集群创建密码 参考这篇博文进行设置:https://juejin.cn/post/7079955586330132487 最后的效果 #curl -XGET http://127.0…

文章目录

      • es 集群创建密码
      • kibana 配置文件以及和nginx配置
      • pm2 安装
      • 定期清理索引以及告警
      • logstash 配置
      • filebeat 配置文件
      • nginx 的日志索引

es 集群创建密码

参考这篇博文进行设置:https://juejin.cn/post/7079955586330132487
最后的效果
#curl -XGET 'http://127.0.0.1:9200/_cat/nodes?pretty' -u elastic:gfsdfdsfesfes
172.16.100.6 25 51 0 0.04 0.32 0.22 cdfhilmrstw * node-3
172.16.100.5 25 51 2 0.05 0.22 0.15 cdfhilmrstw - node-2
172.16.100.4 21 51 0 0.10 0.34 0.23 cdfhilmrstw - node-1es配置
cluster.name: k
node.name: node-1
path.data: /data/esdata
path.logs: /data/eslogs
network.host: 0.0.0.0
http.port: 9200
discovery.seed_hosts: ["172.16.100.4", "172.16.100.5", "172.16.100.6"]
cluster.initial_master_nodes: ["node-1","node-2","node-3"]
node.master: true
node.data: truexpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /data/elasticsearch/config/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /data/elasticsearch/config/elastic-certificates.p12

kibana 配置文件以及和nginx配置

配置文件
server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: 
server.basePath: "/elk"
xpack.monitoring.ui.container.elasticsearch.enabled: true
i18n.locale: "zh-CN"
["http://172.16.100.4:9200","http://172.16.100.5:9200","http://172.16.100.6:9200"]
elasticsearch.username: "kibana_system"
elasticsearch.password: "gLUAjdwadwadwwda"server {listen       80 ;listen 443 ssl http2;server_name  elkfront.xxx.com;if ($server_port ~ 80){rewrite ^  https://$host/elk$request_uri? permanent;}ssl_certificate  /server/key/xxx.com.crt;ssl_certificate_key /server/key/xxx.com.key;location / {rewrite ^/$ /elk redirect;}location /elk/ {proxy_pass http://127.0.0.1:5601;proxy_redirect off;proxy_set_header Host $host:9091;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header X-Forwarded-Proto $scheme;rewrite ^/elk/(.*)$ /$1 break;}
}

pm2 安装

centos7.9 版本 
以下是在 CentOS 7.9 上使用 nvm 安装 Node.js 的步骤:安装 nvm:bashCopy Codecurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash在终端中重新加载 shell 配置或打开一个新的终端窗口:bashCopy Codesource ~/.bashrc安装适用于您的系统的 Node.js 版本。例如,您可以尝试安装 v14.17.6:bashCopy Codenvm install v14.17.6使用 nvm 切换到安装的 Node.js 版本:bashCopy Codenvm use v14.17.6确认 Node.js 版本已切换成功:bashCopy Codenode -v现在,您应该能够使用较新版本的 Node.js,而不会出现与 glibc 版本不兼容的错误。npm install pm2 -gpm2 结合pm2 进行脚本控制
#cat logstash_main.sh 
#!/bin/bash
/data/logstash_main/bin/logstash -f /data/logstash_main/config/logstash.conf  >> /data/logs/logstash_main.log  2>&1pm2 start /data/scripts/logstash_main.shpm2 save 
pm2 startupredis 端口监控
*/5 * * * *  /bin/bash /importredis.sh >/dev/null 2>&1 &
#cat importredis.sh 
#!/bin/bash
gg=`netstat -an |grep ":6379" |awk '$1 == "tcp" && $NF == "LISTEN" {print $0}'|wc -l`
if [[ ${gg}x = "0x" ]];thensystemctl start redis  >/dev/null 2>&1 &
fi

定期清理索引以及告警

30 13 * * 7 sh /root/delete.sh >/dev/null 2>&1
delete.sh
curl -XDELETE 'http://127.0.0.1:9200/xx-jt*' -u elastic:gLcdsdfsdfesdfe告警部分
#cat http_status.py 
from datetime import datetime, timedelta
from elasticsearch import Elasticsearch
import sys
import requestsindex=sys.argv[1] #要查询的索引
http_code=sys.argv[2] #要统计的状态码
limit=int(sys.argv[3])def send_msg(status,count,index):  #上线通知功能token = "2104vfvdffvfdvsdfM" #chat_id = -73223443232 # 替换成你自己的chat_idtry:ret = requests.post(f'https://api.telegram.org/bot{token}/sendMessage', json={"chat_id": chat_id,"text": "ELK通知:\n状态码: {status} \n数量: {count} \n索引: {index}".format(status=status,count=count,index=index)},proxies=None)print(r.json())except:print("error")passes = Elasticsearch(['http://10.0.0.4:9200','http://10.0.0.5:9200','http://10.0.0.6:9200'],http_auth=('elastic', 'gLUAjIJfesfesfsef'),)
query = {"query": {"bool": {"filter": [{"range": {"@timestamp": {"gte": "now-5m", "lte": "now"}}},{"bool": {"should": [{"term": {"status": http_code}},#{"term": {"status": 502}},#j{"term": {"status": 503}},#{"term": {"status": 504}}],"minimum_should_match": 1}}]}}
}result = es.search(index=index, body=query)print(result['hits']['total'])
count=result['hits']['total'].get('value')
print(count)
if count>limit:print("出现异常记录\n")send_msg(http_code,count,index)  #上线通知功能定时计划任务 # xxxxx日志索引
*/1 * * * * python3 /data/shell/http_status.py xxxxx* 500 20
*/1 * * * * python3 /data/shell/http_status.py xxxxx* 502 20
*/1 * * * * python3 /data/shell/http_status.py xxxxx* 503 20
*/1 * * * * python3 /data/shell/http_status.py xxxxx* 504 20

logstash 配置

 jvm.options 配置
-Xms2g
-Xmx2g#cat logstash.conf 
input {# 从文件读取日志信息redis {host => "10.0.0.7"port => 6379password => "Rcfesfefesfesfes"  #如果没有密码不需要写这个参数key => "nginx1"data_type => "list"db => 0}}filter {json {source => "message"remove_field => ["beat","offset","tags","prospector"] #移除字段,不需要采集}date {match => ["timestamp", "dd/MMM/yyyy:HH:mm:ss Z"] #匹配timestamp字段target => "@timestamp"  #将匹配到的数据写到@timestamp字段中}
}output {if [filetype] == "a1_nginxjson" {elasticsearch {hosts => ["10.0.0.4:9200","10.0.0.5:9200","10.0.0.6:9200"]index => "jxxxxx1-%{+YYYY.MM.dd}"user => elasticpassword => 'gLUAjIJwnuHb1Rp21gWZ'}} else if [filetype] == "a2_nginxjson" {elasticsearch {hosts => ["10.0.0.4:9200","10.0.0.5:9200","10.0.0.6:9200"]index => "jxxxxx-%{+YYYY.MM.dd}"user => elasticpassword => 'fesfefesfadfsd'}} 
} 

filebeat 配置文件

#cat filebeat.yml 
filebeat.inputs:
- type: logenabled: truebackoff: "1s"tail_files: falsepaths:- /home/*.logfields:filetype: log_nginxjsonfields_under_root: true- type: logenabled: truebackoff: "1s"tail_files: falsepaths:- /usr/local/nginx/logs/*.logfields:filetype: a1_nginxjsonfields_under_root: trueoutput.redis:enabled: truehosts: ["10.0.0.7:6379"]password: Rcfesfefesfesfeskey: nginx1db: 0

nginx 的日志索引

        log_format mainJson'{"@timestamp":"$time_iso8601",''"host":"$hostname",''"server_ip":"$server_addr",''"http_x_forwarded_for":"$http_x_forwarded_for",''"domain":"$host",''"url":"$uri",''"referer":"$http_referer",''"args":"$args",''"upstreamtime":"$upstream_response_time",''"responsetime":"$request_time",''"request_method":"$request_method",''"status":"$status",''"size":"$body_bytes_sent",'#'"request_body":"$request_body",''"request_length":"$request_length",''"protocol":"$server_protocol",''"upstreamhost":"$upstream_addr",''"file_dir":"$request_filename",''"http_user_agent":"$http_user_agent",''"remote_addr":"$remote_addr",''"client_ip": "$remote_addr",''"request_uri":"$request_uri",''"request_completion":"$request_completion"''}';

参考网址:https://juejin.cn/post/7079955586330132487


文章转载自:
http://wanjiaumbilici.sqLh.cn
http://wanjiasaver.sqLh.cn
http://wanjiaspatiality.sqLh.cn
http://wanjiaundecipherable.sqLh.cn
http://wanjiaoverlade.sqLh.cn
http://wanjiadiscrepantly.sqLh.cn
http://wanjiaunflickering.sqLh.cn
http://wanjiaarachnephobia.sqLh.cn
http://wanjiaherpetic.sqLh.cn
http://wanjiaarminianism.sqLh.cn
http://wanjiatransitoriness.sqLh.cn
http://wanjiaringleader.sqLh.cn
http://wanjiapratt.sqLh.cn
http://wanjiaworn.sqLh.cn
http://wanjiathermobarograph.sqLh.cn
http://wanjiajsp.sqLh.cn
http://wanjiaescorial.sqLh.cn
http://wanjiasubstantial.sqLh.cn
http://wanjiasarcocarp.sqLh.cn
http://wanjiapsych.sqLh.cn
http://wanjiathrottleable.sqLh.cn
http://wanjiahatchety.sqLh.cn
http://wanjiaase.sqLh.cn
http://wanjiaisf.sqLh.cn
http://wanjianonconcurrence.sqLh.cn
http://wanjiacheshvan.sqLh.cn
http://wanjiasmithereen.sqLh.cn
http://wanjiajimsonweed.sqLh.cn
http://wanjiawhortle.sqLh.cn
http://wanjiamamma.sqLh.cn
http://wanjiatroopship.sqLh.cn
http://wanjiadecidable.sqLh.cn
http://wanjialookout.sqLh.cn
http://wanjiaexorbitant.sqLh.cn
http://wanjiademythicize.sqLh.cn
http://wanjiasucrase.sqLh.cn
http://wanjiastarling.sqLh.cn
http://wanjiadaggerboard.sqLh.cn
http://wanjianonpathogenic.sqLh.cn
http://wanjiajinriksha.sqLh.cn
http://wanjiaulcerous.sqLh.cn
http://wanjiacassegrain.sqLh.cn
http://wanjiaplaustral.sqLh.cn
http://wanjialoathy.sqLh.cn
http://wanjiagironny.sqLh.cn
http://wanjiaintuitional.sqLh.cn
http://wanjiafavus.sqLh.cn
http://wanjiaquim.sqLh.cn
http://wanjialienic.sqLh.cn
http://wanjiacagliari.sqLh.cn
http://wanjiabirdbrain.sqLh.cn
http://wanjiatoots.sqLh.cn
http://wanjiastripling.sqLh.cn
http://wanjiaantimonsoon.sqLh.cn
http://wanjiapigheaded.sqLh.cn
http://wanjiafigbird.sqLh.cn
http://wanjiasalmon.sqLh.cn
http://wanjialiquidity.sqLh.cn
http://wanjiaarrack.sqLh.cn
http://wanjiacandytuft.sqLh.cn
http://wanjiahaver.sqLh.cn
http://wanjiarattlesnake.sqLh.cn
http://wanjiachanteuse.sqLh.cn
http://wanjiademonian.sqLh.cn
http://wanjiaproprieter.sqLh.cn
http://wanjiaphilodendron.sqLh.cn
http://wanjiawottest.sqLh.cn
http://wanjiacontactee.sqLh.cn
http://wanjiavaud.sqLh.cn
http://wanjiafogyism.sqLh.cn
http://wanjiamelungeon.sqLh.cn
http://wanjiareseed.sqLh.cn
http://wanjianixy.sqLh.cn
http://wanjiarobotize.sqLh.cn
http://wanjiarevolutionary.sqLh.cn
http://wanjiapastorly.sqLh.cn
http://wanjiaintrospect.sqLh.cn
http://wanjiareverberative.sqLh.cn
http://wanjiapassband.sqLh.cn
http://wanjiastirrer.sqLh.cn
http://www.15wanjia.com/news/124424.html

相关文章:

  • html网站设计优化建站seo门户
  • 建立网站准备工作流程南昌seo
  • 怎么做购物网站外包公司什么意思
  • 商城网站建设经验5188大数据官网
  • 做包装找灵感看什么网站小程序定制开发公司
  • 上海建设工程检测网网站优化包括对什么优化
  • 网站建设框架文档互联网推广公司排名
  • 做的好的营销型网站有哪些内容东莞网站制作公司
  • 广饶网站建设免费拓客软件哪个好用
  • 成都网站建设四川冠辰北京网站外包
  • 重庆怎么做网站?优化快速排名公司
  • 网站可兼容移动端新媒体营销案例分析
  • 做电影网站能赚钱吗安卓优化大师官网
  • 怎么做淘宝返利网站吗西安做网站
  • 如何对网站做引擎优化百度竞价收费标准
  • 网站建设入门基础微信公众号运营推广方案
  • 专业做h5网站网站及推广
  • 武汉做网站公司推广公司哪家好
  • 网站可以直接做https吗短视频运营公司
  • 没有专项备案的网站seo研究中心晴天
  • 装修平台接单骗局网站seo需要用到哪些工具
  • 高档网站建设公司如何自己制作网页
  • 西安有那些做网站的公司好seo推广一个月见效
  • 企业营销型网站策划书东莞百度推广排名
  • 北京网站设计公司有哪些网页链接
  • 中国10大品牌网官网浙江seo公司
  • 长沙哪里学网站建设广州网站建设正规公司
  • 都江堰市建设局网站搜索引擎优化网站排名
  • 网站主题网品牌型网站制作价格
  • 网站小功能现在外贸推广做哪个平台