falcon

001-open-falcon的单机版安装

别等时光非礼了梦想. 提交于 2019-12-13 16:51:13
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> open-falcon 每台服务器,都有安装falcon-agent,falcon-agent是一个golang开发的daemon程序,用于自发现的采集单机的各种数据和指标 单机安装 redis mkdir /home/redis && cd /home/redis wget http://download.redis.io/releases/redis-4.0.9.tar.gz tar -zxvf redis-4.0.9.tar.gz mv redis-4.0.9 redis4.0.9 && cd redis4.0.9 mkdir logs make && make install cat >>/home/redis/redis4.0.9/redis.conf<<EOF bind 0.0.0.0 daemonize yes pidfile /var/run/redis_6379.pid logfile "/home/redis/redis4.0.9/logs/redis.log" EOF redis-server /home/redis/redis4.0.9/redis.conf #连接测试 redis-cli -h 127.0.0.1 -p 6379 mysql wget http://repo.mysql

how to visit the my falcon app after docker build and docker run?

对着背影说爱祢 提交于 2019-12-13 03:36:23
问题 As a follow up question of Docker run cannot find executable "uwsgi" : I have successfully executed docker build and docker run with the Dockerfile as: FROM python:2-onbuild # Set the working directory to /app WORKDIR /app # Copy the current directory contents into the container at /app ADD . /app # RUN pip install -r ./requirements.txt RUN pip install uwsgi EXPOSE 8000 CMD ["/usr/local/bin/uwsgi", "--http", " :8000" , "--wsgi-file", "falconapp.wsgi"] I know it's running since I saw this

Docker run cannot find executable “uwsgi”

試著忘記壹切 提交于 2019-12-11 12:22:44
问题 I am trying to deploy a falcon app with Docker. Here is my Dockerfile: FROM python:2-onbuild # Set the working directory to /app WORKDIR /app # Copy the current directory contents into the container at /app ADD . /app RUN pip install -r ./requirements.txt RUN pip install uwsgi EXPOSE 8000 CMD ["uwsgi", "--http”, " :8000" , "—wsgi-file”, "falconapp.wsgi"] However I keep getting error saying: /bin/sh: 1: [uwsgi,: not found I've tried running uwsgi in the local directory and it works well with

CORS failure in with Python Falcon even with heads for Auth Pre-Flight

核能气质少年 提交于 2019-12-10 10:44:25
问题 Receiving these error when using the OPTIONS verb in Angular2 http.get(url, options), even though the appropriate CORS headers are set in Falcon Rest API. XMLHttpRequest cannot load http://localhost:8000/names. Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response. resp.set_header("Access-Control-Allow-Origin", "*") resp.set_header("Access-Control-Allow-Credentials", "true") resp.set_header("Access-Control-Allow-Methods", "GET,HEAD,OPTIONS

Open-Falcon监控系统安装和使用

孤人 提交于 2019-12-09 17:32:37
0. 运维监控工具选择 1. 安装脚本(主服务) 常规安装环境搭建太复杂, dashboard安装碰到python依赖不容易解决, 直接使用docker安装, 这里总结除了一个安装 shell script, 如下: #!/bin/sh ## env params MYSQL_HOST=my.falcon.local MYSQL_PASSWORD=falcon MYSQL_USER=falcon ## init mysql table before the first running # cd /tmp && \ # git clone --depth=1 https://github.com/open-falcon/falcon-plus && \ # cd /tmp/falcon-plus/ && \ # for x in `ls ./scripts/mysql/db_schema/*.sql`; do # echo init mysql table $x ...; # docker exec -i falcon-mysql mysql -h $MYSQL_HOST -u $MYSQL_USER -p $MYSQL_PASSWORD < $x; # done ## falcon redis docker run --name falcon-redis --restart

大规模机器集群-故障自动处理(二)

我们两清 提交于 2019-12-07 19:25:31
本篇开始介绍具体的实现过程,为表述方便,先定义一些名词, _AutoRepairSystem: _ 故障自动维修系统, 缩写为ARS 原子操作: 任务的最小操作,机器任务通常是指重启、重装 运维人员:运维工程师= SRE = OP,系统工程师 = sys 远程管理工具: 远程控制操作物理机器的工具,如ipmi、ilo 先来看ARS的整体视图和流程图, ARS的工作流程, 故障检测: 每5分钟发起一次故障检测,获取当前时刻整个集群的故障机器列表,推送到工作流子系统 安全策略: 遍历故障机器列表,依次执行安全策略,过滤不符合要求的机器,得到一个可安全执行重启、重装的机器列表 服务离线: 遍历可安全操作的机器列表,执行服务离线 故障维修: 服务离线后,发起重启、维修操作,轮询机器状态,直至重启成功或维修完成 环境初始化: 执行环境初始化,保证机器环境符合业务需求 服务上线: 恢复服务,检查服务达到可服务状态,流程结束 接下来将介绍工作流子系统,这是所有具体操作任务执行的基础; 再依次介绍上述流程中的关键环节: 服务上下线,故障检测,安全策略,维修工具及SLA; 然后通过一个线上例子,说明整体的工作流程; 最后分享系统上线后的运行数据。 2.1 工作流子系统 工作流最基本的功能,是驱动一系列预定义任务顺序执行,达到明确的结束状态;在机器故障自动处理这个问题域里,对工作流还有闭环

data passing app in falcon python

丶灬走出姿态 提交于 2019-12-07 12:30:25
问题 Before asking the question i want to mention that i am aware of the fact that i can use django instead to make the app, but i need to use falcon and nothing else. i am just looking for an approach lets take a very simple scenario so that i can understand how data flows between various parts of the app. i have a simple login page using html: <!DOCTYPE html> <html> <body> <form action="***what-do-i-put-here***"> <fieldset> <legend>Personal information:</legend> First name:<br> <input type="text

大规模机器集群-故障自动处理(二)

梦想的初衷 提交于 2019-12-07 09:08:32
本篇开始介绍具体的实现过程,为表述方便,先定义一些名词, _AutoRepairSystem: _ 故障自动维修系统, 缩写为ARS 原子操作: 任务的最小操作,机器任务通常是指重启、重装 运维人员:运维工程师= SRE = OP,系统工程师 = sys 远程管理工具: 远程控制操作物理机器的工具,如ipmi、ilo 先来看ARS的整体视图和流程图, ARS的工作流程, 故障检测: 每5分钟发起一次故障检测,获取当前时刻整个集群的故障机器列表,推送到工作流子系统 安全策略: 遍历故障机器列表,依次执行安全策略,过滤不符合要求的机器,得到一个可安全执行重启、重装的机器列表 服务离线: 遍历可安全操作的机器列表,执行服务离线 故障维修: 服务离线后,发起重启、维修操作,轮询机器状态,直至重启成功或维修完成 环境初始化: 执行环境初始化,保证机器环境符合业务需求 服务上线: 恢复服务,检查服务达到可服务状态,流程结束 接下来将介绍工作流子系统,这是所有具体操作任务执行的基础; 再依次介绍上述流程中的关键环节: 服务上下线,故障检测,安全策略,维修工具及SLA; 然后通过一个线上例子,说明整体的工作流程; 最后分享系统上线后的运行数据。 2.1 工作流子系统 工作流最基本的功能,是驱动一系列预定义任务顺序执行,达到明确的结束状态;在机器故障自动处理这个问题域里,对工作流还有闭环

Python微信公众号开发—小白篇(1)

我与影子孤独终老i 提交于 2019-12-06 14:58:36
本文面向想通过Python学习公众号开发的同学。一站式解决新手开发微信公众号遇到的所有问题。 为了防止我的文章被到处转载,贴一下我的公众号【智能制造社区】,欢迎大家关注。 github仓库地址 https://github.com/injetlee/Python/tree/master/wechat 本篇文章首先实现与公众号的对接,实现简单的回复文字、图片内容。下一篇会对接腾讯的AI平台,实现对照片的人脸检测与分析,分析年龄、性别、表情、魅力值等。 准备工作 首先要注册一个公众号,这个很简单,我们到微信公众平台注册就可以了,选择个人订阅号就可以。但是如果可以认证的,我建议选择认证订阅号,因为未认证的号很多功能权限都没有。好了,话不多说进入正题。 1. 配置公众号 打开公众号,在 开发->基本配置 页面填写内容。 下面说下需要填的内容,第一个URL要填的就是我们的服务地址,这个地址必须是外网地址并且是80端口。我们要本地开发时可以用 ngrok 解决。在ngrok.com官网下载。解压后就是一个exe程序。在当前目录下输入 .\ngrok.exe http 80 即可启动。启动后如下图所示,图片中网址就是我们需要的 然后我们复制红色方框里面的地址到微信的URL输入框中,比如我的就输入http://c9b15df5.ngrok.io/connect

data passing app in falcon python

*爱你&永不变心* 提交于 2019-12-05 17:56:19
Before asking the question i want to mention that i am aware of the fact that i can use django instead to make the app, but i need to use falcon and nothing else. i am just looking for an approach lets take a very simple scenario so that i can understand how data flows between various parts of the app. i have a simple login page using html: <!DOCTYPE html> <html> <body> <form action="***what-do-i-put-here***"> <fieldset> <legend>Personal information:</legend> First name:<br> <input type="text" name="firstname" value="Mickey"> <br> Last name:<br> <input type="text" name="lastname" value="Mouse"