284354749 发表于 2018-10-25 12:01:10

Nagios 监控mongodb

# vi /usr/local/nagios/etc/objects/localhost.cfg  
######check_mongodb##########
  
define service{
  
      use                           linux-service
  
      host_name                     10.0.1.103
  
      service_description             check_mongodb_connect_54
  
      check_command            check_mongodb!10.0.1.54!connect!27017!2!4
  
      }
  
define service{
  
      use                           linux-service         ; Name of service template to use
  
      host_name                     10.0.1.103
  
      service_description             check_mongodb_connections_54
  
      check_command                   check_mongodb!10.0.1.54!connections!27017!70!80
  
      }
  
define service{
  
      use                           linux-service         ; Name of service template to use
  
      host_name                     10.0.1.103
  
      service_description             check_mongodb_memory_54
  
      check_command                   check_mongodb!10.0.1.54!memory!27017!20!28
  
      }
  
define service{
  
      use                           linux-service         ; Name of service template to use
  
      host_name                     10.0.1.103
  
      service_description             check_mongodb_rep_state_54
  
      check_command                   check_mongodb!10.0.1.54!replset_state!27017!0!0
  
}
  
define service{
  
      use                           linux-service         ; Name of service template to use
  
      host_name                     10.0.1.103
  
      service_description             check_mongodb_database_exam_54
  
      check_command                   check_mongodb_database!10.0.1.54!database_size!27017!300!500!exam
  
}


页: [1]
查看完整版本: Nagios 监控mongodb