Page 5 of 5

Re: Email notification and services issue

Posted: Wed Mar 25, 2020 10:58 am
by lmiltchev
Regarding "JCA WAN IP" might be there is nothing wrong in configuration. This is our WAN IP and last week due to some reason there was lots of packet lost for 2/3 days on this IP but Nagios did not sent any notification to us whereas there was notification setup for this. That's why I am confused why it did not send any notification, it should send us notification if there are lots of packet lost in any IP.
It is hard to say why Nagios didn't send notifications after the fact. I would recommend that you go through all steps, outline in the DB article below:

https://support.nagios.com/kb/article/n ... ms-36.html

You can also enable phpmailer debugging in order to further troubleshoot the issue:

https://support.nagios.com/kb/article/p ... g-820.html

If this happens again, take a screenshot of the State History report, showing the "problem" host/service in a HARD Non-OK state, and a screenshot of the Notifications report for the same timeperiod.
I did not add anything from command line. Regarding 192.168.155.113 can you remember when we added this agent first time Nagios did not discover the ping service for this agent and later we added it manually "Ping_155_113" for ping service. Might be this is the reason you see it same configuration in two locations.
When you added the Ping service, you used a different config name (Ping_155_113 instead of 192.168.155.113), which is not an issue per se, but a service definition, located in the host directory is.

Let's try to remove the these objects, and re-add them via a wizard.

1. Go to the CCM > Services, find the Ping_155_113 service, and delete it.
2. Go to the CCM > Host, find the 192.168.155.113 host, and delete it.
3. Apply Configuration
4. If you don't have any config errors, proceed with running the Generic Network Device wizard against 192.168.155.113

Configure > Configuration Wizards > Generic Network Device > 192.168.155.113 > Next > Leave the Ping check-box selected (don't clear it!) > Next > Next > Next > Finish

Note: You can modify any of the "default" values in steps 3 through 5 if needed.

5. Check the newly created host & service in the GUI. Make sure it works as expected.

Re: Email notification and services issue

Posted: Wed Mar 25, 2020 2:15 pm
by mhossain
Hi Jeffery,

Thant means you want me to delete both service Ping_155_113 and host 162.168.155.113 then re-add the host 192.168.155.113 from Wizard, right?

Also you mentioned to ad as "Generic Network Device" but this is a Ubuntu server. I guess this should be NCPA.

Thanks
Sazzad

Re: Email notification and services issue

Posted: Wed Mar 25, 2020 2:24 pm
by lmiltchev
If you would like to just ping the host, you could use the "Generic Network Device" wizard. It will work just fine. If however, you would like to monitor different metrics on the client, such as CPU, Memory, etc. then you would need to install an agent. NCPA is a good choice.

Let us know if you have any further questions or of it is ok to close this topic. Thank you!

Re: Email notification and services issue

Posted: Wed Mar 25, 2020 2:41 pm
by mhossain
Hi Jeffery,

We want to monitor ping service as well as other services like CPU, Memory, disk etc. but if I add using NCPA wizard it does not discover ping service. That was the reason I have added ping service later separately. I don't know why it does not discover ping service through NCPA wizard.

Thanks
Sazzad

Re: Email notification and services issue

Posted: Wed Mar 25, 2020 2:50 pm
by lmiltchev
OK, we will try adding the service a different way. After you run the NCPA wizard, and have the host/services added, go to the CCM > Services, select your host from the drop-down menu, and click on the View Config actions button, next to any of the services on that page (it will show all of the services added to the host). Copy the entire output, and paste it on the forum in code wraps.

Once we have it, I will modify it, and send it back to you with instructions on what to do.

Re: Email notification and services issue

Posted: Wed Mar 25, 2020 3:00 pm
by mhossain
Here is the configuration

Re: Email notification and services issue

Posted: Wed Mar 25, 2020 3:25 pm
by lmiltchev
Download the config below:
192.168.155.113.cfg
As you can see, I just added one new "Ping" service on the bottom.

Code: Select all

define service {
    host_name                192.168.155.113
    service_description      Ping    
    check_command            check_ping!3000.0,80%!3000.0,100%
    max_check_attempts       5
    check_interval           5
    retry_interval           1
    check_period             xi_timeperiod_24x7
    notification_interval    60
    notification_period      xi_timeperiod_24x7
    contacts                 mhossain    
    register                 1
}
Transfer the file to your Nagios XI server via FileZilla or a similar program, and place it in the /usr/local/nagios/etc/import directory. Once the file is in the import directory, run the following command from the command line:

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
Go and check the newly added Ping service to the 192.168.155.113 host in the GUI.

Re: Email notification and services issue

Posted: Thu Mar 26, 2020 8:33 am
by mhossain
Hi Jeffery,

This has been worked.

Thanks
Sazzad

Re: Email notification and services issue

Posted: Thu Mar 26, 2020 8:59 am
by lmiltchev
I am glad I was able to help! I am locking the thread.