同步git和mercurial存储库的预备份脚本

appuio-routes-monitoring的Python项目详细描述


Overview

appuio_routes_monitoring是一个从appuio生成hieradata的yaml代码的工具 要为这些路由配置http icinga2监视检查的路由。 但是脚本应该在任何openshift集群上工作。

appuio_routes_monitoring

appuio_routes_monitoring期望oc位于path变量中,您需要 在调用此脚本之前登录到appuio。

默认情况下,脚本将为登录用户有权访问的所有路由生成yaml代码。

有关详细信息,请参阅本文档的使用部分。

Dependencies

appuio_routes_monitoring支持python>;=3.4,并具有以下第三方依赖项

appuio_routes_monitoring进一步依赖于oc二进制文件从 openshift集群。

Installation

可以使用PIP轻松安装Appuio_Routes_Monitoringpip安装appuio_routes_监控

Configuration

appuio_routes_monitoring没有任何配置文件。 但它确实依赖于appuio的二进制有效会话。 此外,脚本从路由读取注释以生成适当的 山药代码。 目前支持以下注释:

monitoring/alert_customer

将路由上的此注释设置为true,将把alert_customer变量设置为 是的也是。这将配置http检查以向定义的电子邮件地址发出警报。

monitoring/alert_vshn: ‘true’

将路由上的此批注设置为true,将设置检查的生产级别 若要4,请将支票设为24/7支票。这意味着只要检查失败,vshn就会收到警报。

monitoring/path

在到uri的路由上设置此注释将把http-uri设置为指定的路径。 如果缺少注释,则http-uri将默认为/

Usage

usage: generate_monitoring_check [-h] [-p PROJECTS [PROJECTS ...]] [-k HIERAKEY]

generate hieradata from appuio routes

optional arguments:
  -h, --help            show this help message and exit
  -p PROJECTS [PROJECTS ...], --project PROJECTS [PROJECTS ...]
  -k HIERAKEY, --key HIERAKEY

Examples

为项目生成yaml代码

generate_monitoring_check -p my-test-project
profile_icinga2::hiera_httpchecks:
    test-project.example.com:
        display_name: test-project.example.com on APPUiO in my-test-project
        http_address: test-project.example.com
        http_ssl: true
        http_uri: /
        vars:
            alert_customer: false

Development

运行开发版本

git clone git@git.vshn.net:vshn/appuio_routes_monitoring.git
cd appuio_routes_monitoring
python -m venv pyvenv
. pyvenv/bin/activate
pip install -r requirements.txt

python -m appuio_routes_monitoring

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用split函数分割字符串,但没有得到期望的结果   未找到包含derby数据库嵌入架构的sql Java桌面应用程序错误   java elasticsearch vs solr用于定制全文搜索系统   java Android:创建没有startOffset的动画延迟?   java如何查看其他应用程序接收的数据?   java如何在Linux中使用D和classpath选项运行jar文件   java和域设计最佳实践   具有相同内存位置的java数组,将显示为输出   连接到java中的elasticsearch?   Java Playframework重定向到带有Json负载的外部url   java无法在Android平台上使用InputStream为蓝牙socket创建ObjectInputStream   使用POI将Excel日期转换为Java日期,年份未正确显示   oracle从数据库层还是Java层调用webservice?