Monitoring HTTP service on different IPs on the same host

My understanding is that there are usually good reasons why not each active check can use all macros. In this case opening check_http for the macro $_HOSTADDRESSES_4_1$ should not pose any pitfalls, so this is a reasonable (rather small) feature request.

But it might take some weeks until implemented and backported. If you can live with this, it would probably be the best approach for this exact problem.

PS: And, yes, expanding the macros with the lists of whitespace separated IP addresses here clearly is a bug. Please mention this when reporting the missing macro expansions, since then it is more likely to be treated as bug.

I think we are turning in a circle. The ICMP check definitely has a bug. In the rule you can use “identified by its index” and the check command is then configured with the macro $_HOSTADDRESSES_4_1$ which fails with the error message ‘Temporary failure in name resolution’ because the macro is not available. At this moment it makes no difference if check_http can use it or not, its a bug in the software which needs needs be fixed.

To stay compatible with Nagios all macros needs to be available and I guess it would be beneficial for all to have them documented somewhere.

The rest is off topic and could be discussed in a separate thread.

regards

Michael

1 Like

Ok, I finally tested and can report that its a bug in 2.0.0p32. In 2.1.0p19 all works well and the various macros working even with check_http. Just missing the documentation.

In this case its not a bug its a feature. I was also unsure but at least check_icmp can handle whitespaced list of IP´s:

{code}
OMD[beta]:~/lib/nagios/plugins$ ./check_icmp -H 10.37.60.26 10.223.11.59 127.0.0.1 127.0.0.2
OK - 10.37.60.26: rta 0.027ms, lost 0% :: 10.223.11.59: rta 18.543ms, lost 0% :: 127.0.0.1: rta 0.011ms, lost 0% :: 127.0.0.2: rta 0.011ms, lost 0%|10.37.60.26rta=0.027ms;200.000;500.000;0; 10.37.60.26pl=0%;40;80;; 10.37.60.26rtmax=0.042ms;;;; 10.37.60.26rtmin;; 10.223.11.59rta=18.543ms;200.000;500.000;0; 10.223.11.59pl=0%;40;80;; 10.223.11.59rtmax=18.886ms;;;; 10.223.11.59rtmin=18.271ms;;;; 127.0.0.1rta=0.011ms;200.000;500.000;0; 127.0.0.1pl=0%;40;80;; 127.0.0.1rtmax=0.012ms;;;; 127.0.0.1rtmin=0.010ms;;;; 127.0.0.ms;200.000;500.000;0; 127.0.0.2pl=0%;40;80;; 127.0.0.2rtmax=0.012ms;;;; 127.0.0.2rtmin=0.009ms;;;;
{code}

And the rule offers this nice option:

image

Which even works in 2.1.0p16 :slight_smile:

@mschlenker Regarding the other topics you mentioned I feel its worth to open a dedicated thread to discuss with more focus on the subject. Please invite me.

Thanks folks

Michael

There is already a werk:

But its not fixed in 2.0.0p31 SIGH

What about the other requirement?

“Only one http rule with more than one destination”

@mike1098 Have you tried @thl-cmk 's plugin?

This would also solve the problem that you have to check from the clients view to the destination?

No, I did a workaround in 2.0 which fits our needs

1 Like