Page 4 of 5
Re: Email notification and services issue
Posted: Thu Mar 19, 2020 12:04 pm
by lmiltchev
It worked. Great thanks for your support. I think Windows and Ubuntu are good now.
I am glad I was able to help!
Now we have two more issues.
One...we have Fortigate firewall but on the Configuration Wizards there is nothing for Fortigate and I have added it using Generic Network device but it actually did not added properly. Some of the ports are not detected and some of the ports are added but physically these are not exists in Firewall. Is there any other alternate way available to add Fortigate Firewall.
We don't have a wizard that is going to monitor a Fortigate Firewall, however there are some 3rd party plugins on the Nagios Exchange that may work for you. Here's the results from a simple search for "Fortigate" on the Nagios Exchage:
https://exchange.nagios.org/index.php?o ... =Fortigate
Normally, you would try a plugin from the command line to make sure it works. Once you verify that, you would need to add a new command and a service in the Nagios XI. Please review the document below to see how this is done:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
2nd..We have some public IP for WAN connection. I have added one public IP as a host and setup the notification for this IP. I have noticed there is some packet drops from this IP but it does not detect by Nagios. We want if there is any packet drop from this WAN IP, Nagis will send us a notification.
Can you show us the actual command that you are using, run from the command line along with the output of it? Most likely, you would need to adjust your thresholds, so that when packet drop occurs, Nagios will detect the issue, and alert you.
Re: Email notification and services issue
Posted: Thu Mar 19, 2020 3:13 pm
by mhossain
Hi Jeffery,
I will check the plug-ins for Fortigate and will let you know. Regarding the command for WAN IP can you please clarify what command do you mean?
Thanks
Sazzad
Re: Email notification and services issue
Posted: Thu Mar 19, 2020 3:58 pm
by lmiltchev
You said:
I have added one public IP as a host and setup the notification for this IP
So, if you added a Ping service to this host, and this is what you are using for notifications, we would need to see the service command. You can view it by going to the
CCM > Services > <your service> > Edit > Run Check Command. Copy/paste the actual command and the output, and post it on the forum.
If you don't have a Ping service (you only have a host check), this may not work as you might be missing the
Run Check Command test button. No worries, let us know what is the name of the host that you are trying to monitor. We still have your profile. We will review your configs, and let you know what command to run.
Re: Email notification and services issue
Posted: Tue Mar 24, 2020 8:37 am
by mhossain
Hi Jefferey,
Sorry for late response a I was lost my post because of recent change in Nagios support portal.
First screenshot please find the command for host Ping_155.113.
[
[email protected] ~]$ /usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,80% -p 5
PING OK - Packet loss = 0%, RTA = 0.09 ms|rta=0.095000ms;3000.000000;5000.000000;0.000000 pl=0%;80;80;0
2nd screenshot for host "JCA WAN IP" there is no command in service to run.
Thanks
Sazzad
Re: Email notification and services issue
Posted: Tue Mar 24, 2020 9:03 am
by lmiltchev
First screenshot please find the command for host Ping_155.113.
[
[email protected] ~]$ /usr/local/nagios/libexec/check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,80% -p 5
PING OK - Packet loss = 0%, RTA = 0.09 ms|rta=0.095000ms;3000.000000;5000.000000;0.000000 pl=0%;80;80;0
What is your host's IP address? What you are doing here is running check_ping against 127.0.0.1 (localhost) on the Nagios XI server... If you goal is to monitor a remote machine, your command should be something like this:
Code: Select all
/usr/local/nagios/libexec/check_ping -H <remote host's IP address> -w 3000.0,80% -c 5000.0,80% -p 5
2nd screenshot for host "JCA WAN IP" there is no command in service to run.
If the command is not defined locally (on the service level), most likely it is inherited from a template. What you need to do is click on the
Manage Templates button under
Service Management (the screenshot you showed us). This way, you can see what template is assigned to the "Ping" service on the "JCA WAN IP" host.
Once you see your template on the right hand side (under
Assigned), you can search for this template in the CCM to find out what is the command that is used.
CCM > Templates > Service Templates, paste (or type) the name of your template in the search bar, and hit Enter. Click on the template to see what is the check command that is defined.
Note: Sometimes, the check command could be inherited from another template. Other words, there could be a several layers of templates. You can "drill down" in the CCM to determine what command is used for this service. In the CCM, you can define a check command explicitly, overwriting the one that is inherited from the template.
Read more about object inheritance with templates here:
https://assets.nagios.com/downloads/nag ... tance.html
Re: Email notification and services issue
Posted: Tue Mar 24, 2020 9:59 am
by mhossain
Hi Jeffery,
For Ping_155.113 I don't know why it is 127.0.0.1. I did not added any command manually. I just added the ping service using template "check_ping" and the command added auto. The Nagios host is 192.168.155.73 and the agent host is 192.168.155.113. How can I modify the command.
For JCA_WAN_IP attached please find the screen shot for the command.
[
[email protected] ~]$ /usr/local/nagios/libexec/check_icmp -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5
OK - 127.0.0.1: rta 0.102ms, lost 0%|rta=0.102ms;3000.000;5000.000;0; pl=0%;80;100;; rtmax=0.194ms;;;; rtmin=0.069ms;;;;
Re: Email notification and services issue
Posted: Tue Mar 24, 2020 12:24 pm
by lmiltchev
Let's take a look at your latest configs. Go to Admin > System Profile > Download Profile, and PM me the profile.zip file. Thanks!
Re: Email notification and services issue
Posted: Wed Mar 25, 2020 7:12 am
by mhossain
Hi Jeffery,
Attached please find the latest profile.
Thanks
Sazzad
Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
Re: Email notification and services issue
Posted: Wed Mar 25, 2020 10:07 am
by lmiltchev
I didn't see any issues with the definitions of the "JCA WAN IP" host, and the "Ping" service attached to it:
Code: Select all
define service {
host_name JCA WAN IP
service_description Ping
use xiwizard_genericnetdevice_ping_service
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard genericnetdevice
register 1
}
define host {
host_name JCA WAN IP
use xiwizard_genericnetdevice_host
address 184.67.162.66
max_check_attempts 5
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
contacts mhossain
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
icon_image network_node.png
statusmap_image network_node.png
_xiwizard genericnetdevice
register 1
}
What kind of issues are you having with these checks?
When you go to:
Home >Details > Host Status > JCA WAN IP
or
Home >Details > Service Status > Ping (on host JCA WAN IP)
and force an immediate check on the host (or the service), does it work?
In regards to the "192.168.155.113" host, and the "Ping" service attached to it, I am confused. You have the SAME config in two different locations - "/usr/local/nagios/etc/hosts" and /usr/local/nagios/etc/services"...
Code: Select all
define service {
host_name 192.168.155.113
service_description Ping
use xiwizard_generic_service
check_command check_ping!3000.0,80%!5000.0,80%!!!!!!
register 1
}
You should have hosts' configs in the first directory, and services' configs - in the second. I have no idea why you would have a service config in the "/usr/local/nagios/etc/hosts" directory. It just doesn't make sense. Are you adding configs or making changes manually, from the command line by any chance? If you do, keep in mind that all of the changes would be wiped out next time you apply configuration. You need to add/configure hosts/services either via config wizards or in the CCM.
Let try the following:
1. Go to the CCM > Tools > Config File Management, and click on the following buttons (in this EXACT order!):
Delete Files >
Write Configs >
Verify Files
2. If you don't see any config errors - Apply Configuration
3. If you see errors, post them on the forum
Re: Email notification and services issue
Posted: Wed Mar 25, 2020 10:23 am
by mhossain
Hi Jeffery,
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.
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.
I have followed the below instruction and there was no error.
CCM > Tools > Config File Management, and click on the following buttons (in this EXACT order!): Delete Files > Write Configs > Verify Files
Thanks
Sazzad