日志收集分析-heka
https://github.com/mozilla-services/heka/http://hekad.readthedocs.io/en/latest/config/decoders/index.htmlhttp://www.ourlove520.com/Article/netsafe/gongju/126846.html可扩展的数据收集和处理工具。它的可扩展性不仅仅是体现在程序本身可以进行插件开发、更可以方便的通过添加机器进行水平扩展。Heka是一...
zabbix Triggers Top 100
查询1天内的Top点击(此处)折叠或打开SELECT h.`host`, t.`description`, COUNT(*) numFROM `events` eJOIN `triggers` t ON e.`objectid`=t.`triggerid` AND t.`priority`>=2JOIN functions f ON f.`triggerid`=t.`triggerid`JOIN it...
【独家发布】京东发布MySQL Group Replication官方文档中文版!
http://mp.weixin.qq.com/s?__biz=MzI1NzQyOTM3Ng==&mid=2247484326&idx=1&sn=16b4c3adba34c1690fe2ceb06d43aa21&chksm=ea16d949dd61505f042022f90bb95b10fe8f700ab3141ea89d70da307b267bb76533849f813f&mpshare=1&scene=23&srcid=0316GX7g5YEcIQokBINVfeIU#rd下载地址:http://storage.360buyimg.com/brickhaha/My...
Golang- import 导入包的语法
转载自:http://blog.csdn.net/zhangzhebjut/article/details/25564457?utm_source=tuicool当导入一个包时,它所有的init()函数就会被执行包的导入语法# 标准库, GOROOT 下去加载该模块import "fmt"fmt.Println("hello world")# 绝对路径 , 加载 GOPATH/src/shorturl/model模块import "shorturl/mod...
python 随机字符串
点击(此处)折叠或打开#!/usr/bin/env python# -*- coding:utf-8 -*- import randomimport stringdef random_str(size): all_char = string.letters + string.digits + ...
python mysql utf8mb4
conn = MySQLdb.connect(host=ip, port=port, user=user, passwd=passwd, db=db, charset="utf8", connect_timeout=1)cur = conn.cursor()#将这3个 character_set_client, character_set_connection, and character_set_results 都设为 utf8mb4cur.execute("set names utf8mb4")
oracle 密码验证函数
点击(此处)折叠或打开CREATE OR REPLACE FUNCTION verify_function(username varchar2,password varchar2,old_password varchar2)RETURN boolean ISn boolean;m integer;differ integer;...
doDBA tools,全新的MySQL实时性能监控利器
http://mp.weixin.qq.com/s?__biz=MjM5NzAzMTY4NQ==&mid=2653929717&idx=1&sn=0774d10e4e2271334dd7fd1c4c792813&chksm=bd3b5a9f8a4cd389ff9e82d1be2b5984afb903fbd2e1c55306e04b97a12d573a354ed75fba30#rddoDBA tools,全新的MySQL实时性能监控利器2016-12-16 卢飞 老叶...
python : Python egg cache directory 异常处理
转载: https://davidwalsh.name/python-eggs异常内容用php调用python脚本时报出这个异常,从提示看,没有权限访问 $PYTHON_EGG_CACHE 点击(此处)折叠或打开pkg_resources.ExtractionError: Can't extract file(s) to egg cacheThe following error occ...
python 调度框架 apscheduler
安装 pip install apscheduleAPScheduler中四个组件:调度器(scheduler)是其他的组成部分。你通常在应用只有一个调度器,应用的开发者通常不会直接处理作业存储、调度器和触发器,相反,调度器提供了处理这些的合适的接口。配置作业存储和执行器可以在调度器中完成,例如添加、修改和移除...
influxdb 笔记: Continuous Queries - CQs
https://docs.influxdata.com/influxdb/v0.13/guides/downsampling_and_retention/# 自动执行查询CREATE CONTINUOUS QUERY cq_30m ON food_data BEGIN SELECT mean(website) AS mean_website,mean(phone) AS mean_phone INTO food_data."default".downsampled_orders FROM orders GROUP BY time(30m) END...
influxdb 笔记: Retention Police - RPs
https://docs.influxdata.com/influxdb/v0.13/guides/downsampling_and_retention/# RP 的数据管理策略https://docs.influxdata.com/influxdb/v0.13/query_language/database_management/#retention-policy-management#每个database创建时,默认会自动创建一个RP每个database可以有多个RPwrite时如果不知道RP,默认...
influxdb 笔记: API & CRUD
### APIhttps://docs.influxdata.com/influxdb/v0.13/concepts/api/## write curl -i -XPOST 'http://192.168.1.12:8086/write?db=test_dba' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'## query# pretty=true, 以json格式输出curl -GET 'http://192.168.1...
influxdb 笔记: 写高可用 Relay
https://github.com/influxdata/influxdb-relay# 依赖 go 1.5++### 原理只负责write的高可用,write时根据配置的每个节点都要写一次,相当于多写read需要其他工具做Load Balance# 安装,Install influxdb-relay to your $GOPATH/bingo get -u github.com/influxdata/influxdb-relay### docker 编译BuildingTh...
influxdb 笔记: 备份/恢复
https://docs.influxdata.com/influxdb/v0.13/administration/backup_and_restore/##### 备份# 备份 metastore, InfluxDB’s metastore contains internal information about the status of the system:# including: user information, database/shard metadata, and which retention policies are enabledinf...
influxdb 笔记: 用户管理
https://docs.influxdata.com/influxdb/v0.13/administration/authentication_and_authorization/#authorization# /etc/influxdb/influxdb.conf# 必须在未开启前创建用户[http] auth-enabled = false|true### 授权# admin# GRANT ALL PRIVILEGES TO # REVOKE ALL PRIVILEGES FROM CR...
influxdb 笔记: 安装
# 存储引擎https://docs.influxdata.com/influxdb/v0.13/concepts/storage_engine/一开始使用LevelDB(Log Structured Merge Tree or LSM Tree),0.9后使用BoltDB( mmap B+Tree database )# 添加yum源> vim /etc/yum.repos.d/influxdb.repo[influxdb]name = InfluxDB Repository - RHEL \$releaseverbaseurl = http...
配置推送: diamond 使用
https://github.com/melin/super-diamond# TAOBAOhttps://github.com/takeseem/diamond
php 获取函数被调用位置
点击(此处)折叠或打开
salt cmd.run 禁用命令
> vim salt/utils/args.py# ++ def valid_cmd_arg(args): ''' Valid cmd arg ''' # 禁用包含的命令,可自定义 ilLegCmds = ['init', 'shutdown'] for arg in args: shell_cmd = arg.lower...