我们在配置watcher的时候,有时候期望将事件触发给自己写的服务来进行进一步的处理,这时候就需要写一些webhook了。 这里写个配置的例子。 { “actions”: { “test_webhook”: { “webhook”: { “scheme”: “http”, “host”: “10.255.255.101”, “port”: 3000, “method”: “post”, “path…
Leave a Comment小菜菜的博客 Posts
x-package的监控还是很强大的,但是对于告警内容的二次过滤和开发能力较弱。某些情况下,我们可能需要将数据拿出来,和我们自己开发的数据处理平台对接,对数据进行清洗之后发送告警信息给管理员。 默认从ctx.payload拿到的数据是一种很奇怪的格式,我们可以通过toJson将数据转换成标准JSON格式进行解析。 { “trigger”: { “schedule”: { “interval”: “…
Leave a Comment环境 已有: CentOS 7.3(基础设施服务器) Ceph 10.2.10(jewel) 后部署:Calamari 1.3.3 介绍 Calamari包含的组件主要有 calamari-server;romana;salt-minion;salt-master;diamond。 这些模块各自的作用: – calamari-server 这个是提供一个与集群进行交互,并且自己封装了一…
Leave a Comment准备工作 硬件准备 我准备了3台虚拟化机器, 安装的是centos7系统(CentOS-7-x86_64-Everything-1708.iso)的最精简安装。 网络规划 服务器的 IP地址规划为: swarm1:10.255.255.61 swarm2:10.255.255.62 swarm3:10.255.255.63 主机名和IP地址的映射我在路由器上配置好的,如果你没有配置dns,最好在本…
1 Commentjust google swarmprom
Leave a Comment一、准备环境 依赖:Docker, Node.js >= 0.8.4 和 npm [root@dev_08 ~]# curl –silent –location https://rpm.nodesource.com/setup_7.x | sudo bash – [root@dev_08 ~]# yum install -y nodejs [root@dev_08 ~]# npm ins…
Leave a Comment功能超级强大的网络工具netcat A机器执行 nc -l 1234 B机器执行 nc a-ip 1234 AB之间就可以联通了, 可以当聊天工具用。 A机器执行 nc -l 1234 -e /bin/bash -k B机器执行 nc a-ip 1234 B机器就可以运行A机器的shell了, -k 相当于 –keep-open,保持连接 可以接多会话。 A机器执行 tailf /va…
Leave a CommentTo send a directory, cd to inside the directory whose contents you want to send on the computer doing the sending and do: tar -cz . | nc -q 10 -l -p 45454 On the computer receiving the contents, cd to…
Leave a Comment某些时候,docker-compose创建的默认网络可能和你现有的内网网络有地址冲突,通过以下网上可以定制创建网络的网段来规避这个问题。 version : ‘3’ services: nginx: image: nginx networks: default: driver: bridge ipam: driver: default config: – subnet: 10.103.0.1/16…
Leave a CommentFROM busybox MAINTAINER CaiZhongzhen RUN echo “Asia/Shanghai” > /etc/timezone RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN dpkg-reconfigure -f noninteractive tzdata 补充一…
Leave a Comment