Giter Club home page Giter Club logo

greenplum-monitor's Introduction

@author: kikyoar
@contact: [email protected]

此脚本配置支持Zabbix3.0及以上版本
python脚本支持2.7 监控项如下:

- GP数据库总体运行状态    
- 对节点的数据同步状态进行检查  
- 对standby的数据同步状态进行检查  
- 检查数据库集群中是否有实例宕  
- 检查集群中角色实例是否正确  
- 检查执行时间超长SQL语句,此例为检查执行时间大于1小时的SQL语句  
- 查看数据库占用空间大小  
- 查看死锁表的数量  
- 查看GP连接数item  

脚本配置办法:

  • 上传脚本Zabbix_GP_Monitor.py至/home/zabbix目录下

  • chmod + x Zabbix_GP_Monitor.py

  • 修改并添加zabbix_agentd.conf配置文件

    • AllowRoot=1
    • UnsafeUserParameters=1
    • UserParameter=gp_monitor[*],python /home/zabbix/Zabbix_GP_Monitor.py $1
    • Timeout=30
  • 修改并添加zabbix_server.conf配置文件

    • Timeout=30
  • 重启zabbix_agentd,zabbix_server

  • 测试
    GP服务器:
    输入:zabbix_agentd -t gp_monitor[deadlock_number] 返回:gp_monitor[deadlock_number] [t|0] zabbix_server:
    输入:zabbix_get -s 192.168.6.210 -p 10050 -k "gp_monitor[deadlock_number]" 返回:0

Zabbix直接导入模板即可

greenplum-monitor's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.