iambocai / falcon-monit-scripts Goto Github PK
View Code? Open in Web Editor NEW用于小米开源监控系统open-falcon的监控采集脚本集合
用于小米开源监控系统open-falcon的监控采集脚本集合
memcached-monitor.py第69行少了一个单引号。
另外比较奇怪的是我在shell里手动执行这条命令有正确的输出,但在python里用commands执行却得不到同样输入。
File "redis-monitor.py", line 79
except:
^
IndentationError: unindent does not match any outer indentation level
删除后重新输入正常
$ python ./redis-monitor.py
File "./redis-monitor.py", line 18
_stat_regex = re.compile(ur'(\w+):([0-9]+.?[0-9]*)\r')
^
IndentationError: unexpected indent
按照说明配置了,不知道哪里出了问题
RT
the function encodestring
has been deprecated, and it is not convenient to use it as it will always contain an extra tailing \n
. So, just use the b64encode
function.
Original:
base64string = base64.encodestring('guest:guest').replace('\n', '')
New:
base64string = base64.b64encode('guest:guest')
def __init__(self, port='6379', passwd=None, host='127.0.0.1'):
self._cmd = '%s -h %s -p %s info' % (self._redis_cli, host, port)
if passwd not in ['', None]:
self._cmd = "%s -a %s" % (self._cmd, passwd ) // 如果带有密码的话,不能直接把-a password放到命令中,需要把info 放在最后。
env:centos7+python2.7
`[root@openfalcon redis]# python redis-monitor.py
Traceback (most recent call last):
File "redis-monitor.py", line 116, in
main()
File "redis-monitor.py", line 75, in main
value = float(stats[key])
KeyError: 'mem_fragmentation_ratio'`
help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.