大修升级工具和现场联系信息
whatsup的Python项目详细描述
whatsup是站点和联系人列表的中断升级工具
安装whatsup
whatsup可通过中的easy_install或python setup.py安装 来自python源代码https://svn.openplans.org/svn/whatsup的常用方法。建议的安装步骤是 virtualenv:
python <(curl http://svn.colorstudy.com/virtualenv/trunk/virtualenv.py) whatsup cd whatsup . bin/activate mkdir src cd src svn co https://svn.openplans.org/svn/whatsup cd whatsup python setup.py develop
您还需要联系人和站点的数据文件(.ini)。由 默认这些活动在${VIRTUAL_ENV}/src/whatsup/contacts和 ${virtual{env}/src/whatsup/sites,尽管这是可配置的。
实例化whatsup
whatsup由paste.ini文件提供:
paster serve whatsup.ini
应用程序选项可以在 [app:whatsup]节,前缀为whatsup.:
- contacts, sites: location of the contacts and sites files. can be a single file or a directory containing .ini files
- auto_reload: whether to reload the configuration on each request
- ping: whether to ping the sites
- ping_frequency: how often, in seconds, to ping the sites
- smtp_from: who to send email as if the user does not specified
- smtp_server: mail server to use. If not specified, whatsup will not send email
whatsup contact.ini文件
contact.ini文件包含一个或多个节,每个节对应 给一个联系人。节的名称应为 联系。每个联系人可指定多个数据:
- email: comma separated list of email addresses.
- phone: comma separated list of phone numbers
- irc: comma separated list of IRC names
- aim: AIM screenname
- url: canonical web presence
- contact: description of how to contact this person, or a filename containing that information
对于每个逗号分隔的列表,第一项被视为主要项。
whatsup site.ini文件
一个site.ini文件包含一个或多个节,每个节对应于 一个网站。按照惯例,节名称是 地点。可为每个站点指定多个数据:
- url: location of the site. If not specified, the url will be from the section name (presumedly the domain name)
- contact: comma separated list of contacts in case of site outage
- description: brief description of the website
- outage_procedure: if specified, a description of what to do in case the site is down or a filename containing that information. By default, this links to the contact form which emails the contacts upon submission.
- trac: URL of the associated Trac site