GitXplorerGitXplorer
r

ops

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
7d42da3d11e7a2aa1b8375e2cfa599fe6cf854a4

add mysql & redis install script

rrj03hou committed 11 years ago
Unverified
0339c7cac997832ba34286d0d7d95593d1b4d41e

add rest.py doc

rrj03hou committed 11 years ago
Unverified
f86a77b86ed65d993ab6f7e8aab7949039806b24

add restful mysql service

rrj03hou committed 11 years ago
Unverified
f79a95462568c2cb899545c4d655216f4334156b

add zabbix tools

rrj03hou committed 11 years ago
Unverified
434ecc79c6baca592d049047c3446819b089ede0

add readme

rrj03hou committed 11 years ago
Unverified
53dbaf7fba7a49c317620f4584e05a4d40591db8

chang the file to zabbix.py

rrj03hou committed 11 years ago

README

The README file for this repository.

##rest.py 使用web.py编写的提供REST风格的API,主要提供下面api,分别用于获取数据库列表、表列表、初始化一台服务器的zabbix监控。其中initial_zb调用zabbix.py

'/db/(.+)/(\d+)', 'get_db',
'/table/(.+)/(\d+)/(.+)', 'get_table',
'/initialzb/(.+)/(.+)', 'initial_zb'

##zabbix.py

  • config

    用于存储配置项

  • log

    简单的log模块

  • Zabbixtools

    对zabbix常用的操作进行了封装。

  • set_db_group_and_template

    调用Zabbixtools的API,初始化数据库时设置服务器的group和template。

  • calc_all_db_group_disk_consume

    调用Zabbixtools的API,计算某个服务组中的机器的磁盘消耗趋势,得出多久之后服务器的磁盘空间将消耗殆尽,可以提前给出实际的容量预估。