首页 > linux, nagios > check_nginx pnp4nagios 模版

check_nginx pnp4nagios 模版

2010年11月25日 eric 发表评论 阅读评论

   首先不好意思,最近几天由于公司极个人的有点忙,所以就没有及时做监控nginx的模版,今天闲下来,把PNP模版做出来了,感官上还好,由于我把 serveraccepts 、handled、requests 都做到了 PNP模版里,可能他们的图会占用的图比较多,如果你只想把 ActiveConn、reading、writing、waiting 图绘出来,可以把 serveraccepts 、handled、requests 注视掉。

1.首先添加check_nginx.sh 监控

nginx $> wget www.nginxs.com/download/check_nginx.sh

nginx $> mv check_nginx.sh /usr/local/nagios/libexec/

nginx $> vim /usr/local/nagios/etc/objects

nginx $> vim commands.cfg
#  添加:

define command{
        command_name check_nginx
        command_line $USER1$/check_nginx.sh -u $ARG1$ -p $ARG2$ -w $ARG3$ -c $ARG4$
}

2.添加监控服务

nginx $> vim /usr/local/nagios/etc/service/services.cfg
#添加:

 define service{
    use                     local-service,srv-pnp
    host_name               nginxs
    service_description     nginx_status
    check_command           check_nginx!www.nginxs.com!/!4000!5000
}

3.添加 pnp4nagios 模版

nginx $> wget  http://www.nginxs.com/download/check_nginx.php.gz

nginx $> tar zxvf check_nginx.php.gz

nginx $> mv check_nginx.php /usr/local/pnp4nagios/share/templates/

4.重启加载 nagios 服务

nginx $> /etc/init.d/nagios relod

5.看图:

转载请注明:文章转载自:Eric's linux and nginx! (http://www.nginxs.com)
本文地址:http://www.nginxs.com/linux/324.html

分类: linux, nagios 标签: ,
  1. 2017年11月6日06:51 | #1

    I believe that is among the most important info for me.
    And i’m satisfied reading your article. However want to
    remark on few common things, The website style is perfect, the articles is in reality great :
    D. Excellent job, cheers

  2. 2017年11月7日22:42 | #2

    Buy Amitriptyline Comprare Kamagra Piccola QuantitР С–Р’В  Online Acquisto Levitra Generico buy cialis Cialis Et Psa Can Amoxicillin Eliminate Tooth Infection Tadalis Sx Soft Competition

  3. 2017年11月12日07:14 | #3

    Hello, i feel that i noticed you visited my weblog
    so i came to return the favor?.I am trying to in finding things
    to enhance my website!I suppose its ok to make use of some of your ideas!!

  4. 2017年11月12日08:21 | #4

    May I just say what a relief to uncover somebody
    who really understands what they’re talking about on the net.
    You actually realize how to bring an issue to light and make it
    important. A lot more people really need to read this and
    understand this side of your story. I can’t believe you’re not more
    popular given that you certainly have the gift.

  5. 2017年11月12日18:04 | #5

    You have made some really good points there. I checked on the web for additional information about the issue and found most
    individuals will go along with your views on this site.

  6. 2017年11月14日01:30 | #6

    I am genuinely happy to glance at this web site posts which consists of tons of helpful
    information, thanks for providing these data.

  7. 2017年11月14日17:42 | #7

    Do you feel they begin to is often more freeze in the
    home?

  8. 2017年11月15日06:59 | #8

    To keeping your belongings in complete safety?

  9. 2017年11月17日04:54 | #9

    Awesome issues here. I am very glad to peer your post.
    Thank you so much and I’m looking forward to touch you.
    Will you please drop me a mail?

评论分页
1 2 3 4 324
订阅评论
5+5= (必填)