监控安全
将zabbix 监控图以图片格式发送邮件到管理员邮箱 摘要: 将zabbix 监控图以图片格式发送邮件到管理员邮箱 1.cd /home/vim zabbix_send_mail.py#!/usr/bin/python# -*- coding:utf-8 -*-# http://www.cnblogs.com/hoods/p/6413330.html# http://blog.csdn.net/xiegh2014/article/details/76572556# http://www.runoob.com/python/python-email.html# 感谢上面三位仁兄的源码。# 各取一半一半,揉合之。# 能达到获取图片与发送邮件的效果。# 略粗糙,仅参考。# 2017-10-24# import HTMLParserimport urlparseimport urllibimport urllib2import cookielibimport stringimport osimport smtplibimport datetimeimport cookielib, urllib2, urllibfrom email.header import Headerfrom email.mime.multipart import MIMEMultipartfrom email.mime.text import MIMETextfrom email.mime.image import MIMEImagehost = "192.168.31.131"   smtpserver = 'smtp.aliyun.com'mail_username = 'user1@aliyun.com'mail_password = 'redhat'receiver = 'user2@aliyun.co...
您所在的组无权查看该日志
之前安装好 zabbix3.2与oracle,具体详见:http://www.92cto.com/blog/1953.html需要添加服务器的应用服务的日志监控与系统登陆信息监控,这里就作一个简单的例子。在zabbix上配置监控主机后,添加监控项目:监控日志key首先要了解key,log[ file  ,<regexp>,<encoding>,<maxlines>,<mode>,<output>]file:文件名,写绝对路径regexp:要匹配内容的正则表达式,或者直接写你要检索的内容也可以,例如我想检索带ERROR关键词的记录encoding:编码相关,留空即可maxlines:一次性最多提交多少行,这个参数覆盖配置文件zabbxi_agentd.conf中的’MaxLinesPerSecond’,我们也可以留空mode:默认是all,也可以是skip,skip会跳过老数据output:输出给zabbix server的数据。可以是\1、\2一直\9,\1表示第一个正则表达式匹配出得内容,\2表示第二个正则表达式匹配错的内容。项目:oracle_error_log类型 : zabbix agent(active)键值   :  log[/data/app/oracle/diag/rdbms/hextrack/hextrack/trace/alert_hextrack.log,"Warning|ORA\-",gbk,,,]这里是监控oracle告警文件中Warning或是ORA-开头的内容,采用GBK编码。信...
您所在的组无权查看该日志
Log file monitoringOverviewZabbix can be used for centralized monitoring and analysis of log files with/without log rotation support. Notifications can be used to warn users when a log file contains certain strings or string patterns.To monitor a log file you must have: Zabbix agent running on the host log monitoring item set upThe size limit of a monitored log file depends on large file support.ConfigurationVerify agent parametersMake sure that in the agent configuration file: 'Hostname' parameter matches the host name in the frontend Servers in the 'ServerActive' parameter are specified for the processing of active checksItem configurationConfigure a log monitoring item: Specifically for log monitoring items you enter:TypeSelect Zabbix agent (active) here.KeySet either:log[/path/to/file/file_name,<regexp>,<encoding>,<maxlines>,<mode>,<output>,<maxdelay>]orlogrt[/path/to/file/regexp_describing_filename_pattern,<regexp>,<encoding>,<ma...
 
0

zabbix agent protocol说明

发表者:admin分类:监控安全2017-03-21 17:30:21 阅读[1902]
zabbix agent/3.0Contents1 Zabbix agent protocol1.1 Active agents1.1.1 Items to be monitored exist1.1.2 No active items1.1.3 Host does not exist1.1.4 Host not monitored1.1.5 Meta information updateZabbix agent protocolActive agents Note: Also see the description in the zabbix manualWhen an active agent starts, it connects to the server to ask for any item it should be monitoring:{ "request":"active checks", "host":"Host name" } If host has metadata to send, it is included in this request:{ "host": "Host name", "host_metadata": "apache|mysql|postfix", "request": "active checks" } If host has non-default listen IP or port set, they are included in this request:{ "host": "Host name", "ip": "127.0.0.1", "port": 10055, "request": "active checks" } Items ...
配置Nginx和php-fpm监控(io的监控也在压缩包里面,可以参考一下)1,准备几个文件:http://pan.baidu.com/s/1DzJeI2,将fpm.sh,nginx-check.sh放到客户端服务器上,这里放在 /home/sh/ 目录下     chmod +x fpm.sh nginx-check.sh     添加缓存目录:  mkdir -p /usr/local/zabbix/var chown -R zabbix:zabbix /usr/local/zabbix/var3,添加zabbix_agentd配置文件,添加下面两行UserParameter=php-fpm[*],sh /home/sh/fpm.sh "$1" UserParameter=nginx[*],sh /home/sh/nginx-check.sh "$1"4,重启zabbix_agentd5,在服务器端测试一下是否能访问这些键值      zabbix_get -s 192.168.0.xx -k php-fpm[accepted_conn]  zabbix_get -s 192.168.0.30 -k nginx[accepted_connections]6,在服务器端zabbix网页上Configuration-Templates-import导入包里的两个模板。OK,加入到你需要监控的Host上.监控脚本附件
您所在的组无权查看该日志
Open-Falcon 是小米运维部开源的一款互联网企业级监控系统解决方案.Githubhttps://github.com/open-falcon/of-releaseHighlights and features数据采集免配置:agent自发现、支持Plugin、主动推送模式容量水平扩展:生产环境每秒50万次数据收集、告警、存储、绘图,可持续水平扩展。告警策略自发现:Web界面、支持策略模板、模板继承和覆盖、多种告警方式、支持回调动作。告警设置人性化:支持最大告警次数、告警级别设置、告警恢复通知、告警暂停、不同时段不同阈值、支持维护周期,支持告警合并。历史数据高效查询:秒级返回上百个指标一年的历史数据。Dashboard人性化:多维度的数据展示,用户自定义Dashboard等功能。架构设计高可用:整个系统无核心单点,易运维,易部署。Quick InstallOpen-Falcon,整体可以分为两部分,即绘图组件、告警组件。其中:安装绘图组件 负责数据的采集、收集、存储、归档、采样、查询、展示(Dashboard/Screen)等功能,可以单独工作,作为time-series data的一种存储展示方案。安装告警组件 负责告警策略配置(portal)、告警判定(judge)、告警处理(alarm/sender)、用户组管理(uic)等,可以单独工作。如果你熟悉docker,想快速搭建并...
How To Install Glances System Monitoring on CentOS 7In this tutorial we will show you how to install and configuration of Glances System Monitoring on your CentOS 7 server.  For those of you who didn’t know, Glances is a free software (licensed under LGPL) to monitor your GNU/Linux or BSD operating system from a text interface. Using it you can monitor CPU, Load Average, Memory, Network Interfaces, Disk I/O, File System spaces utilization, mounted devices, total number of active processes and top processes. There are many interesting options available in Glances. One of the main features is that you can set thresholds (careful, warning and critical) in a configuration file, and information will be shown in colors which indicates the bottleneck in the system. Glances uses the library libstatgrab to retrieve information from your system and it is developed in Python.This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, yo...
    总共11页,当前第3页 | 页数:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11