Nagios monitoring configuration details 4 monitoring hosts and services

Source: Internet
Author: User
# Asimpleconfigurationfileformonitoringthelocalhost # Thiscanserveasanexampleforconfiguringotherservers; # Customservicesspecifictothishostareadded...

# A simple configuration file for monitoring the local host
# This can serve as an example for logging ing other servers;
# Custom services specific to this host are added here, but services
# Defined in nagios2-common_services.cfg may also apply.
#

######################################## ################
# Define a host
######################################## ################
Define host {
Use generic-host // template used
Host_name localhost // define the host name
Alias localhost // alias
Address 127.0.0.1 // IP address
}


# Define host {
Use generic-host // template used
Host_name ceshi228
Alias ceshi228
Address 221.204.219.228
}
######################################## ################
# Define the service or process to be monitored
######################################## ################

# Check that web services are running
Define service {
Hostgroup_name http-servers
Service_description HTTP
Check_command check_http
Use generic-service
Notification_interval 0; set> 0 if you want to be renotified
}

Define service {
Hostgroup_name http-servers
Service_description Current Load
Check_command check_load
Use generic-service
Notification_interval 0; set> 0 if you want to be renotified
}
Define service {
Hostgroup_name http-servers
Service_description Current Disks
Check_command check_all_disks! 20%! 10%! /
Use generic-service
Notification_interval 0; set> 0 if you want to be renotified
}

Define service {
Hostgroup_name http-servers
Service_description Current Process
Check_command check_procs
Use generic-service
Notification_interval 0; set> 0 if you want to be renotified
}
######################################## ################
# Custom Service and listening port
######################################## ################
# Check that mysql services are running
Define service {
Hostgroup_name mysql-server // host group. many hosts running this service must be placed in this group.
Service_description mysql
Check_command check_tcp! 3306
Use generic-service
Notification_interval 1; set> 0 if you want to be renotified
}

Jaty0817 BLOG

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.