Page 1 of 1

Isuue regarding rebooting nagios

Posted: Tue Feb 20, 2024 7:14 am
by mehmwt
Hello,

I want to monitor a router using nagios, i have followed the following steps:

First, I have opened the /usr/local/nagios/etc/

and uncomment the line

cfg_file=/usr/local/nagios/etc/objects/switch.cfg

and save and close the file


secondly, in cd /usr/local/nagios/etc/objects i opened the switch.cfg file and define the host and service.

After that i try to restart the nagios services by using commad

sudo systemctl restart nagios

but it gives me error (restart_error screenshot is attached for reference) and suggest me to run the command systemctl status nagios.service which shows that failed to start nagios.

Please help me if i am doing anything wrong or missing some important steps, looking forward for your responses.

Re: Isuue regarding rebooting nagios

Posted: Tue Feb 20, 2024 9:46 am
by lgute
Hi @mehmwt, thanks for reaching out.

What document are you using to setup your router monitoring?

FYI, XI has configuration wizards that can be used to handle the setup for monitoring routers/switches and many other apps and devices, so you do not have to manually configure monitoring.

Re: Isuue regarding rebooting nagios

Posted: Tue Feb 20, 2024 11:24 am
by hyang
Hi @mehmwt,

Here's official documentation/video on how you can start monitoring your router.

Re: Isuue regarding rebooting nagios

Posted: Wed Feb 21, 2024 6:14 am
by mehmwt
Thanks for your feedback, i was following some youtube video but then i followed the offical documentation from nagios
( https://assets.nagios.com/downloads/nag ... uters.html ) and sucessfully added router in nagios environment.

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