Тёмный

Nagios-Server adding multiple hosts to monitor them via ping 

Cyber - Tech - Tips
Подписаться 1,2 тыс.
Просмотров 63 тыс.
50% 1

Website: www.nagios.com
DOWNLOAD Nagios Core: nag.is/coresys
DOWNLOAD Nagios Plugins: nag.is/plugsys
DOWNLOAD Nagios XI: nag.is/xisys
DOWNLOAD Nagios Log Server: nag.is/logsys
DOWNLOAD Nagios Network Analyzer: nag.is/netsys
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/
$ nano -c nagios.cfg
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
}

Опубликовано:

 

14 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 62   
@cyber-tech-tips
@cyber-tech-tips 5 лет назад
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
@HappyYourSelf
@HappyYourSelf 3 года назад
We don't need configure on hosts, with this tutorial, we only need configure on server. Great. Thank sir !!!
@VJ1222
@VJ1222 6 лет назад
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!
@cyber-tech-tips
@cyber-tech-tips 6 лет назад
You are so welcome
@VJ1222
@VJ1222 6 лет назад
Ok, one FINAL question and I would imagine that I cannot be the only one who has this issue. All of my hostnames and matching IP addresses are in a .csv file. Is there not some tool or batch script in linux that can create a host.cfg for each line in my .CSV? In other words, what happens if you have 1200+ hosts to configure?
@cyber-tech-tips
@cyber-tech-tips 6 лет назад
I will try to do video about it :)
@nagioscommunity
@nagioscommunity 6 лет назад
Thank you for spreading this knowledge with another great tutorial for the Nagios community!
@cyber-tech-tips
@cyber-tech-tips 6 лет назад
You are so welcome!!
@kingslymbah9251
@kingslymbah9251 Год назад
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.
@agileops
@agileops 3 года назад
Great, I was looking for setting up my nagioscore system. keep it up. you are doing great very soon you will have 1000 sub!
@bebavaresco
@bebavaresco 4 года назад
I was having a really hard time trying to figure out this. Thank you for this video.
@sasankavuyyuru91
@sasankavuyyuru91 5 лет назад
Pretty straightforward and simple explanation. Thanks
@samuelopoku-acheampong5601
@samuelopoku-acheampong5601 2 месяца назад
Thank you for spreading this knowledge
@alejandroalvarez9608
@alejandroalvarez9608 5 лет назад
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
@cyber-tech-tips
@cyber-tech-tips 5 лет назад
What is the error code
@alejandroalvarez9608
@alejandroalvarez9608 5 лет назад
@@cyber-tech-tips Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details. Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain nagios[48178]: Check your configuration file(s) to ensure that they contain valid Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain nagios[48178]: directives and data definitions. If you are upgrading from a previous Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain nagios[48178]: version of Nagios, you should be aware that some variables/definitions Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain nagios[48178]: may have been removed or modified in this version. Make sure to read Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain nagios[48178]: the HTML documentation regarding the config files, as well as the Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain nagios[48178]: 'Whats New' section to find out what has changed. Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain systemd[1]: nagios.service: control process exited, code=exited status=1 Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain systemd[1]: Failed to start Nagios Core 4.4.2. Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain systemd[1]: Unit nagios.service entered failed state. Aug 26 12:56:48 SRVMT-B8-LinuxTraining.localdomain systemd[1]: nagios.service failed.
@alejandroalvarez9608
@alejandroalvarez9608 5 лет назад
The above is happening for services define service{ host_name linuxbox:wq- service_description check-disk-sda1 check_command check-disk!/dev/sda1 max_check_attempts 5 check_interval 5 retry_interval 3 check_period 24x7 notification_interval 30 notification_period 24x7 notification_options w,c,r }
@TheTuriyain
@TheTuriyain 4 года назад
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.
@meryemhachani791
@meryemhachani791 4 года назад
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?
@sadgesidney4009
@sadgesidney4009 5 лет назад
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...
@sadgesidney4009
@sadgesidney4009 5 лет назад
I've resolved the issue by removing the linux-box template from the copied config.
@cyber-tech-tips
@cyber-tech-tips 5 лет назад
@@sadgesidney4009 Happy to hear that you fixed the issue
@maitrepilaf8722
@maitrepilaf8722 2 года назад
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
@surya2597
@surya2597 3 года назад
Can I add additional services like swap and root partition in services/.cfg file
@triplea9838
@triplea9838 5 лет назад
can we add multiple host in shot like via Excel , CSV SHEET
@RaviRKumar_Maa
@RaviRKumar_Maa 2 года назад
Hi, this is for hosts, how I can add my network devices.
@prasannayempada8439
@prasannayempada8439 4 года назад
Hi i have followed the same step but unfortunately it is not showing up. i am using docker image for nagios monitoring. kindly help
@cyber-tech-tips
@cyber-tech-tips 4 года назад
What error you are getting ?
@Hindksher
@Hindksher 5 лет назад
It is really helpful mate I owe you this
@jeromebonneville
@jeromebonneville 2 года назад
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 !
@laurencemichael2997
@laurencemichael2997 5 лет назад
Nice video, but i'am having an error when i tried to create another host. Whenever i tried to copy the file inside the host and services folder and verify the nagios. It gives me an error "Duplicate definition found on host." I just basically follow the steps that you've given.
@streanor8
@streanor8 3 года назад
I found that for the .cfg host files in the /etc/hosts directory - you need to modify: name linux-box1
@turbocpt1
@turbocpt1 3 года назад
Wait.. so you have to restart the service each time a host is added? That is not right.
@cyber-tech-tips
@cyber-tech-tips 3 года назад
Why it's right ? Can you please tell me ? Thank you
@christianangelomsulit3759
@christianangelomsulit3759 4 года назад
How about add host using the web interface?
@_hurifikri
@_hurifikri 4 года назад
thank you, it's work!
@leilalili2589
@leilalili2589 4 года назад
How nagios supervise firwall cyberoam
@cyber-tech-tips
@cyber-tech-tips 4 года назад
What do you like to do ?
@leilalili2589
@leilalili2589 4 года назад
@@cyber-tech-tips l like supervise VPN, acess list trafic
@mohammaditoday
@mohammaditoday 5 лет назад
how we delete hos from nagios ?
@cyber-tech-tips
@cyber-tech-tips 5 лет назад
Delete the host file .cfg from /usr/local/nagios/etc/hosts Delete the host file cfg. from /usr/local/nagios/etc/services $ service nagios restart
@mohammaditoday
@mohammaditoday 5 лет назад
@@cyber-tech-tipsI want to delete 1 window machine out of 5 . according to your instruction if we delete host file from / host and /services it impacts on another machine.?
@cyber-tech-tips
@cyber-tech-tips 5 лет назад
@UCCs4V4SuLr5WesC3XQr5jbg If you removed the file make sure that you will have this in the other file -------------------------------------------- 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 } -------------------------------------------- You can put the above template in the host2 file no problem and then restart the nagios server
@youssefelbahlouliidrissi9908
@youssefelbahlouliidrissi9908 3 года назад
thanks
@educationalgeeks5999
@educationalgeeks5999 2 года назад
Good
@arianakens4900
@arianakens4900 2 года назад
SVp en français
@farirach1479
@farirach1479 2 года назад
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details. sil vois plait j
@cyber-tech-tips
@cyber-tech-tips 2 года назад
$ Service nagios status
@cyber-tech-tips
@cyber-tech-tips 2 года назад
What is the output of the command
@farirach1479
@farirach1479 2 года назад
@@cyber-tech-tips quand je rajoute le 2eme hots nagios failed (code=exited, status1/FAILURE)
@cyber-tech-tips
@cyber-tech-tips 2 года назад
@@farirach1479 $ systemctl status nagios.service
@cyber-tech-tips
@cyber-tech-tips 2 года назад
What is the output of the above command
@meryemhachani791
@meryemhachani791 4 года назад
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?
Далее
Nagios-Agent send checks to Nagios-Server - Step three
15:37
How To Monitor Windows Machines With NCPA In Nagios XI
8:10
18 Weird and Wonderful ways I use Docker
26:18
Просмотров 289 тыс.
What's the BEST home server operating system?
17:35
Просмотров 667 тыс.
OpenSSH for Absolute Beginners
23:00
Просмотров 112 тыс.
Network Ports Explained
10:33
Просмотров 1,7 млн
Add a Host to Nagios Core ?
14:04
Просмотров 76
How to Set Up a Linux Home Server from Start to Finish!
1:04:59