上一页 1 ··· 91 92 93 94 95 96 97 98 99 ··· 203 下一页
摘要: 一,pecl命令行安装: 1,注意切换为root权限: # /usr/local/soft/php8.3.9/bin/pecl install swoole 2,安装时的选项: enable sockets support? [no] : yes enable openssl support? [n 阅读全文
posted @ 2024-11-08 10:13 刘宏缔的架构森林 阅读(1017) 评论(0) 推荐(0)
摘要: 一,optimize创建的文件在哪里? 执行optimize: $ php artisan optimize INFO Caching framework bootstrap, configuration, and metadata. config ......................... 阅读全文
posted @ 2024-11-07 13:38 刘宏缔的架构森林 阅读(155) 评论(0) 推荐(0)
摘要: 一,使用venv中的python程序去执行 注意加绝对路径 # /data/loki/venv/bin/python3 /data/loki/search.py 二,执行venv/bin/activate之后再执行 因为有多行,我们写一个小脚本执行 #!/bin/bash cd /data/loki 阅读全文
posted @ 2024-11-05 16:48 刘宏缔的架构森林 阅读(157) 评论(0) 推荐(0)
摘要: 一,代码: 以3分钟为例:分别得到3分钟后的时间和3分钟之前的时间 import datetime import time # 获取当前时间 now = datetime.datetime.now() # 打印当前时间 print(now) # 获取当前时间的年、月、日、时、分、秒 year = n 阅读全文
posted @ 2024-11-05 16:24 刘宏缔的架构森林 阅读(202) 评论(0) 推荐(0)
摘要: 一,代码: import requests import json def send_alert(url,summary,description): data = [{ "labels":{ "job":"mysql", "alertname": summary, "severity": "crit 阅读全文
posted @ 2024-11-05 14:59 刘宏缔的架构森林 阅读(86) 评论(0) 推荐(0)
摘要: 一,代码: import requests # loki的地址 loki_url="http://127.0.0.1:3100/loki/api/v1/query_range" # 请求参数 query_params = { "query": "{job=\"devlogs\"} |= `dev.E 阅读全文
posted @ 2024-11-05 10:58 刘宏缔的架构森林 阅读(365) 评论(0) 推荐(0)
摘要: 一,在service文件中,指定日志的level 编辑service文件 [Unit] Description=Alert Manager wants=network-online.target After=network-online.target [Service] Type=simple Us 阅读全文
posted @ 2024-11-04 15:15 刘宏缔的架构森林 阅读(480) 评论(0) 推荐(0)
摘要: 一,官方的文档: 参考地址: https://docs.golaravel.com/docs/middleware 二,演示: 功能:一个中间件负责验证用户是否已登录, 传递参数的作用是:在已登录基础是否验证真人身份核验,值为1时要核验,其他情况可以不用 1, 为中间件注册一个别名: bootstr 阅读全文
posted @ 2024-11-01 10:36 刘宏缔的架构森林 阅读(121) 评论(0) 推荐(0)
摘要: 一,配置多个接收器: 配置文件: global: resolve_timeout: 5m smtp_smarthost: 'smtp.163.com:465' smtp_from: '发件人邮箱' smtp_auth_username: '发件人邮箱的用户名' smtp_auth_password: 阅读全文
posted @ 2024-10-30 16:35 刘宏缔的架构森林 阅读(450) 评论(0) 推荐(0)
摘要: 一,下载alertmanager 1,官网下载地址 https://prometheus.io/download/ 2,原理图: 二,下载和安装 1,下载安装包: 选择linux+amd64的版本下载: # wget https://github.com/prometheus/alertmanage 阅读全文
posted @ 2024-10-30 15:04 刘宏缔的架构森林 阅读(653) 评论(0) 推荐(0)
上一页 1 ··· 91 92 93 94 95 96 97 98 99 ··· 203 下一页