欢迎进入网络技术社区论坛,与200万技术人员互动交流 >>进入 大家用nagios一般是用来监控内网的机器,其实如果网络情况良好的话,它用来监测公网的机器也是可行的;我们以前用来监测我们公网的28台SQL Server2008数据库(电信对电信),事实证明,效果也是可以
欢迎进入网络技术社区论坛,与200万技术人员互动交流 >>进入
大家用nagios一般是用来监控内网的机器,其实如果网络情况良好的话,它用来监测公网的机器也是可行的;我们以前用来监测我们公网的28台SQL Server2008数据库(电信对电信),事实证明,效果也是可以的。
nagios不仅仅可以检测linux/unix服务器的即时状态,而且检测windows服务器效果也是非常好的;配置熟练的话,我感觉在windows下配置nsclient也是非常方便的,不过记得开启windows防火墙的12489端口,记得检测一下;什么,不会?你在别的机器上telnet windows机器IP 12489,依此状态来检测你的windows到底开启了12489端口没有;
大家的业务网站最好置于自己机房内,这是因为nagios对于内网监控效果是非常好的;因为nagios是依靠ping来检测服务器是否存活的,如果网络情况不好或别的原因造成nagios检测不到监测服务器的话,会造成一个啼笑皆非的问题,它会狂报警,说此服务器已宕机,非常critical;但事实上此服务器情况良好,仅仅只是跟nagios机器的网络不通而已;这种情况希望大家能甄别下。
如何正确判断我们的网站是否真正的挂掉了呢?nagios其实只能即时检测你的服务器情况,如果是你的防火墙或机房都挂掉了呢,这种情况怎么办呢?建议大家可购买一项即时扫描的服务(如Alertbot),它会即时扫描你的网站,如果遇到问题也会向我们的邮箱发送邮件;如果你的邮箱同时收到Alertbot和nagios的报警,一定要慎重对待。
有时我们的系统组有这个需求,特别是系统繁忙时希望能留下日志,以供分析:到底是受到了攻击,还是开发人员设置不当,亦或是运维人员改动了系统配置等。机器少时可能问题不大,但公司的CDN服务器集群是一百多台,目前看形势还在增长,所以我们设计了nagios+vmstat的shell脚本来作Nagios的方式,在系统繁忙时分离出日志,供系统组同事们一起分析问题,得出问题的症结所在,具体可参考我在51cto.com的其它文章,这里就不重复叙述了。
短信报警这块我没有用短信猫,但我推荐大家可以用飞信试下效果;我这边因为有更好更简便的办法,所以我暂时没采用短信猫和飞信;不是说这些不好,而是我嫌其繁琐了。
我们这边的system admin一直是采用移动的139邮箱来接收nagios的报警邮件,效果一直都很好;不过好像是全球通的效果最好,如果是神州行或动感地带的,效果也是很不好,时常收不到报警邮件。因为我看见同事用的全球通效果不错,我特的也去买了神州行的卡,结果杯具了,居然收不到报警短信。而我一直用的是联通的如意通手机,只有一开始收到短信,其余时间基本无视nagios的存在了。后来我一狠心算了款黑莓的商务手机,开通了手机邮,直接将我的163邮箱绑定了我的联通手机号才算是彻底解决了手机报警短信的问题;这些方法都不错,有兴趣的朋友们都可以尝试下;
nagios可以结合cacti或MRTG等流量监控软件一起来查找系统故障等,也可以结合awstats来分析Apache或postfix日志,不过我现在嫌awstats配置过于繁琐,直接用shell脚本来分析的。
如果有某台服务器的某一项,比如我们的jail,本来就是8台子虚拟机一起用于线上环境,负载很大,但nagios就不停的报警,认为这是不正常的,搞得人很烦燥,这时直接就可以点中此服务器的负载项,然后选择” Disable notifications for this service”,世界清静了。我们直接用FreeBSD的jail用于线上环境,由于配置起来很方便和高效,但jail有个缺点,由于下面的子机全都是共用原宿机的cpu和内存及磁盘,任何一台子jail机的负载过高或使用磁盘空间,都会导致原宿机的nagios报警;这个目前也没有什么好的办法,只能尽量优化吧。
个人上班时需要实时关注监控服务器主机及服务的 Nagios系统,觉得需一直开着一个网页页面自动刷新,感觉有点麻烦、而且浪费资源。虽说同事有分享一款Nagios辅助小软件,可以最小化到任务栏,有异常时会有浮动提示窗口,挺方便的。但是对于自己一向喜欢尽量将所有东西都嵌入到浏览器中进行操作的癖好者,便更希望能找到一款Firefox插件来实现类似于此辅助软件的功能,这插件即是Nagios Check插件。(这里提及一些题外话:不知为何如今自己越来越依赖于浏览器,想把所有的事情工作、生活涉及到的东西都看能不能只打开一个浏览器便可操作完成,而尽量不用开太多的应用程序,即将尽量多的应用程序使用插件功能进Firefox浏览器中进行使用)安装方法非常简单,不过在IE或chrome上一直没找到相关的插件,这不是不说是一种遗憾了。各人有各人的办法,这里就不多费篇幅了, 其效果图如下(注意右下角):

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version
God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor