Hello,
I am new to nagios and using it nagios core (4.4.9) first time. I have added router in nagios environment by following this documentation
( https://assets.nagios.com/downloads/nag ... uters.html ),
But I have encountered some problems for which I need your guidance.
1) First, i have added a router in nagios, which should be member of router not switch (Screenshot not_switch is attached for reference)
2)Second, i have defined only one service PING to monitor but it shows other services as well which i did not defined in my switch.cfg file. (switch.cfg file screenshot is attached for reference)
I have attached also the screenshot of switch.cfg file for further reference.
Please guide me if i am missing something important in switch.cfg file or making some errors
Thanks
Host and Service configuration Problem
-
- Posts: 202
- Joined: Wed Aug 23, 2023 11:29 am
Re: Host and Service configuration Problem
Hi @mehmwt,
It appears as if core is still reading from the default switch.cfg file which has definitions for all of the services you're seeing and places the host in the switches hostgroup. I would make sure of 3 things:
1. The changes you made to switch.cfg have saved
2. The main Nagios config file is pointing to the right place
3. You have verified your configuration and restarted Nagios core.
Let us know what you find.
Thank you!
It appears as if core is still reading from the default switch.cfg file which has definitions for all of the services you're seeing and places the host in the switches hostgroup. I would make sure of 3 things:
1. The changes you made to switch.cfg have saved
2. The main Nagios config file is pointing to the right place
3. You have verified your configuration and restarted Nagios core.
Let us know what you find.
Thank you!
Re: Host and Service configuration Problem
Thanks for your reply
1) I have check the switch.cfg file and it is saved correctly.
2) I have checked the path of nagios.cfg file and it looks fine but i have attached the screenshoot (nagios_file_path) for your reference. In addition
i have attached the screenshot (etc_folder) of etc folder containing nagios.cfg file.
3) I have carried out the verification step (Screenshot is attached as verification step) which results shows zero warning and zero error.
4) Finally, i have executed the restart command to restart nagios. (screenshot as restart_nagios)
But still i find the same results which were before.
Thanks
1) I have check the switch.cfg file and it is saved correctly.
2) I have checked the path of nagios.cfg file and it looks fine but i have attached the screenshoot (nagios_file_path) for your reference. In addition
i have attached the screenshot (etc_folder) of etc folder containing nagios.cfg file.
3) I have carried out the verification step (Screenshot is attached as verification step) which results shows zero warning and zero error.
4) Finally, i have executed the restart command to restart nagios. (screenshot as restart_nagios)
But still i find the same results which were before.
Thanks
-
- Posts: 202
- Joined: Wed Aug 23, 2023 11:29 am
Re: Host and Service configuration Problem
Hi @mehmwt,
1) Good
2) It looks like you renamed the file to router.cfg. Make sure that the file path in is correct (i.e. the line is changed to ). There may be additional places where the filename has to be changed as well, but I am not certain at the moment. It might be worth it to just keep the filename as switch.cfg while you try to figure this out.
3) Good
4) It looks like you started nagios, but didn't necessarily restart it. I would make sure to follow the steps in the "Restarting Nagios Core" section of this document.
1) Good
2) It looks like you renamed the file to router.cfg. Make sure that the file path in
Code: Select all
/usr/local/nagios/etc/nagios.cfg
Code: Select all
cfg_file=/usr/local/nagios/etc/objects/switch.cfg
Code: Select all
cfg_file=/usr/local/nagios/etc/objects/router.cfg
3) Good
4) It looks like you started nagios, but didn't necessarily restart it. I would make sure to follow the steps in the "Restarting Nagios Core" section of this document.