Home Database Mysql Tutorial 玩转Nagios实战篇:你应该知道的Nagios技巧

玩转Nagios实战篇:你应该知道的Nagios技巧

Jun 07, 2016 pm 03:30 PM
nagios Actual combat Skill Have fun Know network Enter

欢迎进入网络技术社区论坛,与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上一直没找到相关的插件,这不是不说是一种遗憾了。各人有各人的办法,这里就不多费篇幅了, 其效果图如下(注意右下角):

玩转Nagios实战篇:你应该知道的Nagios技巧

玩转Nagios实战篇:你应该知道的Nagios技巧

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What's going on when the network can't connect to the wifi? What's going on when the network can't connect to the wifi? Apr 03, 2024 pm 12:11 PM

1. Check the wifi password: Make sure the wifi password you entered is correct and pay attention to case sensitivity. 2. Confirm whether the wifi is working properly: Check whether the wifi router is running normally. You can connect other devices to the same router to determine whether the problem lies with the device. 3. Restart the device and router: Sometimes, there is a malfunction or network problem with the device or router, and restarting the device and router may solve the problem. 4. Check the device settings: Make sure the wireless function of the device is turned on and the wifi function is not disabled.

Win11 Tips Sharing: Skip Microsoft Account Login with One Trick Win11 Tips Sharing: Skip Microsoft Account Login with One Trick Mar 27, 2024 pm 02:57 PM

Win11 Tips Sharing: One trick to skip Microsoft account login Windows 11 is the latest operating system launched by Microsoft, with a new design style and many practical functions. However, for some users, having to log in to their Microsoft account every time they boot up the system can be a bit annoying. If you are one of them, you might as well try the following tips, which will allow you to skip logging in with a Microsoft account and enter the desktop interface directly. First, we need to create a local account in the system to log in instead of a Microsoft account. The advantage of doing this is

What are the tips for novices to create forms? What are the tips for novices to create forms? Mar 21, 2024 am 09:11 AM

We often create and edit tables in excel, but as a novice who has just come into contact with the software, how to use excel to create tables is not as easy as it is for us. Below, we will conduct some drills on some steps of table creation that novices, that is, beginners, need to master. We hope it will be helpful to those in need. A sample form for beginners is shown below: Let’s see how to complete it! 1. There are two methods to create a new excel document. You can right-click the mouse on a blank location on the [Desktop] - [New] - [xls] file. You can also [Start]-[All Programs]-[Microsoft Office]-[Microsoft Excel 20**] 2. Double-click our new ex

PHP Practical: Code Example to Quickly Implement Fibonacci Sequence PHP Practical: Code Example to Quickly Implement Fibonacci Sequence Mar 20, 2024 pm 02:24 PM

PHP Practice: Code Example to Quickly Implement the Fibonacci Sequence The Fibonacci Sequence is a very interesting and common sequence in mathematics. It is defined as follows: the first and second numbers are 0 and 1, and from the third Starting with numbers, each number is the sum of the previous two numbers. The first few numbers in the Fibonacci sequence are 0,1,1.2,3,5,8,13,21,...and so on. In PHP, we can generate the Fibonacci sequence through recursion and iteration. Below we will show these two

A must-have for veterans: Tips and precautions for * and & in C language A must-have for veterans: Tips and precautions for * and & in C language Apr 04, 2024 am 08:21 AM

In C language, it represents a pointer, which stores the address of other variables; & represents the address operator, which returns the memory address of a variable. Tips for using pointers include defining pointers, dereferencing pointers, and ensuring that pointers point to valid addresses; tips for using address operators & include obtaining variable addresses, and returning the address of the first element of the array when obtaining the address of an array element. A practical example demonstrating the use of pointer and address operators to reverse a string.

VSCode Getting Started Guide: A must-read for beginners to quickly master usage skills! VSCode Getting Started Guide: A must-read for beginners to quickly master usage skills! Mar 26, 2024 am 08:21 AM

VSCode (Visual Studio Code) is an open source code editor developed by Microsoft. It has powerful functions and rich plug-in support, making it one of the preferred tools for developers. This article will provide an introductory guide for beginners to help them quickly master the skills of using VSCode. In this article, we will introduce how to install VSCode, basic editing operations, shortcut keys, plug-in installation, etc., and provide readers with specific code examples. 1. Install VSCode first, we need

PHP programming skills: How to jump to the web page within 3 seconds PHP programming skills: How to jump to the web page within 3 seconds Mar 24, 2024 am 09:18 AM

Title: PHP Programming Tips: How to Jump to a Web Page within 3 Seconds In web development, we often encounter situations where we need to automatically jump to another page within a certain period of time. This article will introduce how to use PHP to implement programming techniques to jump to a page within 3 seconds, and provide specific code examples. First of all, the basic principle of page jump is realized through the Location field in the HTTP response header. By setting this field, the browser can automatically jump to the specified page. Below is a simple example demonstrating how to use P

Win11 Tricks Revealed: How to Bypass Microsoft Account Login Win11 Tricks Revealed: How to Bypass Microsoft Account Login Mar 27, 2024 pm 07:57 PM

Win11 tricks revealed: How to bypass Microsoft account login Recently, Microsoft launched a new operating system Windows11, which has attracted widespread attention. Compared with previous versions, Windows 11 has made many new adjustments in terms of interface design and functional improvements, but it has also caused some controversy. The most eye-catching point is that it forces users to log in to the system with a Microsoft account. For some users, they may be more accustomed to logging in with a local account and are unwilling to bind their personal information to a Microsoft account.

See all articles