Question

Replace nagios check_http with centreon_protocol_http.pl

  • 15 March 2024
  • 2 replies
  • 68 views

Badge +2

Hi guys,

I recently installed a fresh 23.10 version of Centreon, and I successfully migrated everything from my older 20.10 version. I have now every host and services on both sides, with a lot of services in an unknown or critical mode on the newest one.

I understand that I have a lot to do with perl modules but that will be for a later post or later research on my own.

 

My aim here is to either use or replace the old nagios check_http plugin, here is where i am at the moment :

I tried to copy the old plugin to the newer version → two libs gives an error, even when I “create” them with symbolic link to my current versions of libcrypto.so.10 and libssl.so.10, the errors keep saying that they are not found

 

So i tried to “update” my command with centreon commands

Here’s my old command :

/usr/local/nagios/libexec/check_http -I 10.1.2.3 -u https://foo.bar.fr/some/path/somewhere -S

actual response for my older centreon : 

HTTP OK: HTTP/1.1 200 OK - 24227 octets en 0,072 secondes de temps de réponse

From my understanding, here’s what it should look like with the newer command : 

/usr/lib/centreon/plugins/centreon_protocol_http.pl --plugin=apps::protocols::http::plugin --mode=response --hostname=10.1.2.3 --urlpath=’/some/path/somewhere’ --proto='https'

I also tried with replacing the hostname arg with the beginning of my previous URL : 

/usr/lib/centreon/plugins/centreon_protocol_http.pl --plugin=apps::protocols::http::plugin --mode=response --hostname='foo.bar.fr' --urlpath=’/some/path/somewhere’ --proto='https'

both giving this same output :

CRITICAL: 450 Timeout reached | 'time'=5.066s;;;0; 'size'=144B;;;0;

I tried to add --verbose but no additionnal output is given.

I tried to run the commands as root and as centreon-engine

The ping with either the IP or foo.bar.fr both are OK from my new central server

 

Am I doing something wrong here ?

I think this check_http alone make around 200 checks on my configuration, but if I understand this one I’ll be able to solve most of my issues with “nagios legacy” problems.

 

Many thanks to anyone that will have read through this =)

I’m available for any test that you’ll think can improve this command in a way or another

 


2 replies

Userlevel 1
Badge +4
Hello, generally, you can use the --debug option to get more information. The URL can be reached directly, no proxy? 
Badge +2
Hello, generally, you can use the --debug option to get more information. The URL can be reached directly, no proxy? 

Hi Mike, sorry for my late answer ! 

Thank you for your reply, yes the URL is (maybe only now ?) reachable from both of the old and the new centreon server.
I spend few time on this since my last post, but I finally found a solution, unfortunately not with the latest commands.

 

I now have only one kind of error when using centreon_protocol_http.pl:

CRITICAL: 500 Can’t connect

I tried to add port event when I already have --proto defined, I tried simple and double quote, I successfully troubleshooted some errors thanks to your --debug command (like some ’ where a ‘ was expected, nothing alike of course) with some random charachters before and after my path

But at the end of the day, I successfully used the old /usr/local/nagios/libexec/check_http
I just needed to recompile the plugin on my new server, instead of juste copying the folder with every commande from the old server (not the same gen / OS)

 

Some network troubleshooting later, all of my commands were up again

Thank you so much for your time, i know that both of my requests were problems on my side, sorry for the bothering 

Reply