1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

pingが通らないhostの監視でpingエラー対策

Last updated at Posted at 2013-08-02

参考

check_dummy

  • /usr/lib/nagios/plugins/check_dummy を使う。
/etc/nagios/conf.d/commands.cfg
define command{
        command_name    return-ok
        command_line    $USER1$/check_dummy 0
        }
  • $USER1$ は、resource.cfgで/usr/lib/nagios/plugins に定義されています。
  • /etc/nagios-plugins/config/dummy.cfgにcommandが沢山登録されているので目を通しておくと良い。

return-ok

  • nagios4では使えなかったので、上記のcheck_dummyを使えば良い
 define host{
     use        generic-host
     host_name  server01
     contact_groups admin_all
+    check_command   return-ok
 }

# define command
 
 # commands
 define command{
     command_name check_http-server01
     command_line $USER1$/check_http -H server01 -u http://server01.jp/check.html
 }

# define service
 
 # http
 define service{
     use                     generic-service
     service_description     http
     host_name               server01
     check_command           check_http-server01
 }
 # 特定port
 define service{
     use                     generic-service
     service_description     server01-12345
     host_name               server01
     check_command           check_tcp!12345
 }
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?