Nagios-Server adding multiple hosts to monitor them via ping

preview_player
Показать описание

Why Nagios:
Open-source
Customized Dashboards
Ease of Use
Infinite Scalability
Data in Real Time
Network Security
-------------------------------------------------------------
Starting to adding the host

$ cd /usr/local/nagios/etc/
$ mkdir hosts services
$ chown nagios:nagios hosts/ services/

# Paste the following in the file
cfg_dir=/usr/local/nagios/etc/hosts
cfg_dir=/usr/local/nagios/etc/services

# Go to hosts
$ cd /usr/local/nagios/etc/hosts
$ nano YOURHOSTFILENAME.cfg
# Paste the following there

define host{
name linux-box ; Name of this template
use generic-host ; Inherit default values
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 30
notification_options d,r
contact_groups admins
register 0 ; DONT REGISTER THIS - ITS A TEMPLATE
}

define host{
use linux-box ; Inherit default values from a template
host_name linux ; The name we're giving to this server
alias linux ; A longer name for the server
address ; IP address of Remote Linux host
}

# Go to services
$ cd /usr/local/nagios/services
$ nano YOURSERVICESNAME.cfg

# Paste the following there

define service{
use generic-service
host_name changeme
service_description check-host-alive
check_command check-host-alive
}
Рекомендации по теме
Комментарии
Автор

If the video didn't give you the information you looking for, please comment blow I will be glad to see comments to make improvements

cyber-tech-tips
Автор

We don't need configure on hosts, with this tutorial, we only need configure on server. Great. Thank sir !!!

HappyYourSelf
Автор

Thank you for spreading this knowledge with another great tutorial for the Nagios community!

nagioscommunity
Автор

Once again - THIS VIDEO IS VERY EXCEPTIONAL! :)
If you could understand how VALUABLE your videos are to the open-world community. I thank you SO VERY MUCH for your exceptional help. I only wish you we could repay the favor! THANK YOU!

VJ
Автор

Thank you for the video. I have some comments and some questions. First the comments: the sound from your mic hears a bit noisy, you may want to see a way to improve that. Regarding the video is very explicative and detailed, I appreciate your video and thank you very much. Now the questions: I see that in the linux-host template you have check_command check-host-alive and you also add the same check_command as service check-host-alive. Does this means we are checking with command check-host-alive two times for the same host? Nagios do supports host checks and service checks, and notifies when a host or a service is CRITICAL or WARNING, would this configuration mean we'll get two notifications? one for the host and one for the service? I appreciate in advance your answer.

Morroken
Автор

Great, I was looking for setting up my nagioscore system. keep it up. you are doing great very soon you will have 1000 sub!

agileops
Автор

Thank you for spreading this knowledge

samuelopoku-acheampong
Автор

please thank first for the video. But i wish to ask, when you cd to the hosts directory you created and the linux host1 file you created using nano, where do you get the directives/parameters you pasted before doing the editing ?. from the video you said just past ! but i don't know where you copy please.

kingslymbah
Автор

I was having a really hard time trying to figure out this. Thank you for this video.

bebavaresco
Автор

Pretty straightforward and simple explanation. Thanks

sasankavuyyuru
Автор

You helped great. My search ends here to get configure multiple hosts. Please post video on how to add multiple windows host and email alert setting from gmail account with ssmtp or any other way. Can you show how to add host in host group.

TheTuriyain
Автор

I am having an error failed to start Nagios Core 4.4.2. Any chance that we are in a different version? the error is happening anytime I tried to restart Nagios service even if the host.cfg file is almost empty

alejandroalvarez
Автор

Excellent Job !
Thanks for this great tutorial, easy and efficient !

A small error however when adding a second host and more :
"Job for nagios.service failed because the control process exited with error code.
See "systemctl status nagios.service" and "journalctl -xe" for details."

Solution I found is to rename inside the .cfg files of the hosts folder the line 2 and line 18 "linux-box" by incrementing it with +1 for each new host file (ex. linux-box1 linux-box2 etc...).
Then it works fine !

jeromebonneville
Автор

It is really helpful mate

I owe you this

Hindksher
Автор

I would supervise 3 routers as well as a linux server I manage to supervise 1 router but the others are not the same error at the level of the web interface of nagios host unreachable and I also want to supervise a linux server but I have a problem during installing nrpe any solution?

meryemhachani
Автор

I've done as followed and it works out great, however since I want to ping multiple servers I have copied the configs, renamed them, and changed the ip/hostname. The copied configs don't work and cause the nagios process to not run. Unsure what I'm doing wrong...

sadgesidney
Автор

Hi i am looking for a tuto to ping or check a host with multiple ip address with nagios. can you do it? thank you

maitrepilaf
Автор

Can I add additional services like swap and root partition in services/.cfg file

surya
Автор

Hi, this is for hosts, how I can add my network devices.

RaviRKumar_Maa
Автор

Wait.. so you have to restart the service each time a host is added? That is not right.

turbocpt
visit shbcf.ru