Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm getting mail that the PC is OK every 3 minutes.
And I don't know what I should config in Service and host .cfg. Sow that I will get a good description of the problem in the mail that Nagios is sending me.
Not sure why you are getting the e-mail saying things are OK every 3 minutes, I may just be missing it.
When you define your services, make sure you use names that mean something to you. Here is a portion of my services that checks the mail gateways services, notice how each service_description states the service being watched. This is just a very small portion of my configs, I watch everything.
Code:
define service{
use generic-service ; Name of service template to use
host_name HOST
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 2
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options c,r
check_command check_ping!100.0,20%!500.0,60%
}
define service{
use generic-service ; Name of service template to use
host_name HOST
service_description SMTP [Pre Maia]
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_interval 30
notification_period 24x7
notification_options c,r
check_command check_smtp!25
}
define service{
use generic-service ; Name of service template to use
host_name HOST
service_description SMTP [Maia]
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options c,r
check_command check_smtp!1024
}
define service{
use generic-service ; Name of service template to use
host_name HOST
service_description SMTP [Post Maia]
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options c,r
check_command check_smtp!1025
}
define service{
use generic-service ; Name of service template to use
host_name HOST
service_description MailQ
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options w,u,c,r
check_command check_mailq!10,100!100,1000
# }
define service{
use generic-service ; Name of service template to use
host_name HOST
service_description SMTP [SQLGrey]
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_interval 60
notification_period 24x7
notification_options c,r
check_command check_tcp!2501!
}
I'v solved the problem of the mail comming in every 3 minutes. normal_check_interval 3 in combination with the service was the problem.
Now the second problem.
The services that you show, are they the default services of Nagios? Or did you add them, if this is the case were did you add them?
I'm running Check_mk over nagios. My services are defined in the config file of check_mk. So if I add a host it will automatic add the services that he recognized. But I don't know how I add those in the service.cfg.
Some are Nagios Plugins (add-ons) some come with Nagios. I added all these checks by hand to the Nagios Config (over 400 so far). I am not familiar with Check_mk, so I afraid I can't help you figure out how to get it to report more relevant information.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.