Ping Issue with Website Monitor

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
jamie87
Posts: 9
Joined: Thu Jul 11, 2024 9:18 am

Ping Issue with Website Monitor

Post by jamie87 »

Hi,

I have just started trialing Nagios XI and add a "Website Monitor" via the 'Website (Monitor a website)' config wizard.

I am having an issue with the Ping service though, this is looping through being Up and Critical.
It is also reported as flapping.

If i ssh onto the server, i can ping the website address continuously without issue.

I haven't changed any of the configuration settings but if it helps, the command under the host is

Code: Select all

check_xi_service_http! -f ok -u "/" -S --sni -p 443
I also noticed the command box in the ping service is empty (not sure if this is to be expected)?

My primary aim is just to check if the website is up.
I am using running nagios on the provided 64 bit Hyper-V Image (Centos Stream 9)

Apologies if i'm missing something simple but not been about to find a solution searching this forum.
(or if i did, then didn't realise i was looking at the solution).

Any help is greatly appreciated.

Regards,
Jamie
User avatar
ajcoil
Posts: 108
Joined: Wed Aug 09, 2023 10:30 am

Re: Ping Issue with Website Monitor

Post by ajcoil »

Hello @jamie87,

Thank you for reaching out!

Have you attempted to run the check manually on your machines terminal? If so, what was returned?
jamie87
Posts: 9
Joined: Thu Jul 11, 2024 9:18 am

Re: Ping Issue with Website Monitor

Post by jamie87 »

Hi,

I was able to ping continuously without issue from the server terminal.

Or do you you mean running a nagios specific command in the terminal?

Cheers,
Jamie
kg2857
Posts: 490
Joined: Wed Apr 12, 2023 5:48 pm

Re: Ping Issue with Website Monitor

Post by kg2857 »

I'd make a host check with check_ping or check_icmp, a service check on the httpd service and a check that verifies the web site returns a certain string.
jamie87
Posts: 9
Joined: Thu Jul 11, 2024 9:18 am

Re: Ping Issue with Website Monitor

Post by jamie87 »

kg2857 wrote: Thu Jul 11, 2024 10:59 pm I'd make a host check with check_ping or check_icmp, a service check on the httpd service and a check that verifies the web site returns a certain string.
Thank you for your reply and apologies for my lack of knowledge on this but does this mean adding a new host (using the wizard or other method) or changing the current host command from:

Code: Select all

check_xi_service_http! -f ok -u "/" -S --sni -p 443
to something else?

Cheers,
Jamie



EDIT/UPDATE

I think i understand this a little better now, when using the Core Config Manager i can see the drop down options for check_ping and check_icmp so i decided to delete my website monitor and start again.

This time i added the host via CCM and havent added any services yet.

I have it set to use check_icmp "$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$"
arg1 = 100.0,20%
arg2 = 200.0,20%


So all i have is a single Host Check (check_icmp) and this keeps flipping between

Up - PING OK - Packet loss = 0%, RTA = 14.47 ms
and
Down - PING CRITICAL - Packet loss = 100%

EDIT 2

i have now noticed that i can replicate this issue directly in the linux terminal, basically when i start a ping to a website, it either works immediately and i will get 0% packet loss or sometimes it hangs for ages (only when starting the ping command) and then starts pinging so it seems that from my linux box, when starting a ping it sometimes hangs for a while but on other occasions works fine.

If it doesnt hang when i start the ping, it just works and never drops out, seems to be only when initiating the ping request


Here is an example of 2 different linux boxes hosted on the same hyper-v machine running pings started at the same time
The right side is the nagios vm (as you can see it didn't respond to the first 20 requests), left is a Kali vm that works continuously
ping.png
You do not have the required permissions to view the files attached to this post.
Last edited by jamie87 on Fri Jul 12, 2024 8:28 am, edited 3 times in total.
jsimon
Posts: 339
Joined: Wed Aug 23, 2023 11:27 am

Re: Ping Issue with Website Monitor

Post by jsimon »

Hi @jamie87,

It looks like your Nagios XI machine has over a 60 percent packet loss. Since you're able to confirm this happens at the CLI level as well as within XI, and you have other machines that do not have this issue, I believe the issue would be related to either network configuration on the XI machine you are using, or possibly a modem or switch issue.
jamie87
Posts: 9
Joined: Thu Jul 11, 2024 9:18 am

Re: Ping Issue with Website Monitor

Post by jamie87 »

Hi,

Given the later test confirmed the ping working fine from another linux box which is also a VM on the same hyper-v machine, i am going to install Nagios XI from scratch on a fresh Ubuntu install rather than using the Nagios XI Hyper-V image and see how that gets on.

Thank you.

Cheers,
Jamie
Owenpauly
Posts: 3
Joined: Thu Jul 25, 2024 9:26 pm

Re: Ping Issue with Website Monitor

Post by Owenpauly »

jamie87 wrote: Thu Jul 11, 2024 9:39 am Hi,

I have just started trialing Nagios XI and add a "Website Monitor" via the 'Website (Monitor a website)' config wizard.

I am having an issue with the Ping service though, this is looping through being Up and Critical.
It is also reported as flapping.

If i ssh onto the server, i can ping the website address continuously without issue.

I haven't changed any of the configuration settings but if it helps, the command under the host is

Code: Select all

check_xi_service_http! -f ok -u "/" -S --sni -p 443
I also noticed the command box in the ping service is empty (not sure if this is to be expected)?

My primary aim is just to check if the website is up.
I am using running nagios on the provided 64 bit Hyper-V Image (Centos Stream 9)

Apologies if i'm missing something simple but not been about to find a solution searching this forum.
(or if i did, then didn't realise i was looking at the solution) strands hint

Any help is greatly appreciated.

Regards,
Jamie
Hi Jamie,

When I have problems with Nagios XI configuration for web monitoring, I usually troubleshoot by checking the network, service, and command settings.
Post Reply