Forum

Notifications
Clear all

check_http

12 Posts
2 Users
0 Reactions
8 Views
(@wjterveld)
Active Member
Joined: 4 months ago
Posts: 13
Topic starter  

Hi,

 

I would like to create a check for a site http://site.to.check /nidp/app/heartbeat and the response should be "Success"

Could I do it this way? 

check_http -I HOST/nidp/app/heartbeat -p 80 -e 'Success' -t 5

 

Is there documentation for the checks that explains the options there are?

This topic was modified 6 hours ago by wjterveld

   
Quote
emiliocm
(@emiliocm)
SKUDONET Engineer Moderator
Joined: 8 months ago
Posts: 58
 

it is almost OK. 

 

For community edition the checks for farmguardian are located in path /usr/lib/nagios/plugins/

 

cd /usr/lib/nagios/plugins

./check_http --help 

*This output will give you more information about how to use the check. 

 

Following your indications:

for farmguardian config:

check_http -I HOST -u /nidp/app/heartbeat -p PORT -e 'Success' -t 5

for command line testing purposes: 

cd /usr/lib/nagios/plugins

./check_http -I backend_IP -u /nidp/app/heartbeat -p 80 -e 'Success' -t 5

It should work. If not, check if the path -u is properly configured and that you haven't missed any part in this URI. 

 

For further testing:

curl http://backend_IP/nidp/app/heartbeat should show you a 'Sucess' string in the body as well. 

 

Please confirm it works. 

 

Regards!

 


   
ReplyQuote
(@wjterveld)
Active Member
Joined: 4 months ago
Posts: 13
Topic starter  

Hi,

When I do curl https://domain.com/nesp/app/heartbeat I get an success

but when I try check_http -H domain.com/ -u /nidp/app/heartbeat -p 80 -e 'Success' -t 5

I get

HTTP CRITICAL - Invalid HTTP response received from host: HTTP/1.1 302 Found

 

This post was modified 5 hours ago by emiliocm

   
ReplyQuote
emiliocm
(@emiliocm)
SKUDONET Engineer Moderator
Joined: 8 months ago
Posts: 58
 

whe you run curl :

 curl  https://domain.com/nesp/app/heartbeat  I get an success

You are doing a SSL connection 

 

When you run:

check_http -H domain.com -u /nidp/app/heartbeat -p 80 -e 'Success' -t 5

 

You are not using SSL connection, use -S flag for SSL. 

 

Regards!

This post was modified 5 hours ago 2 times by emiliocm

   
ReplyQuote
(@wjterveld)
Active Member
Joined: 4 months ago
Posts: 13
Topic starter  

This returs:

CRITICAL - Cannot make SSL connection.
806B5979FA7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:354:

 

Can I disable the SSL check?


   
ReplyQuote
emiliocm
(@emiliocm)
SKUDONET Engineer Moderator
Joined: 8 months ago
Posts: 58
 

check the output error, it seems like the SSL version in end point or in the client check_http is not correct. 

 

You should point to the backend in the same way the farm is configured for the backends. 

 

It is quite important you understand what you are doing and where you are pointing to. check_http should be executed against the backends. you should ensure if the backend is in HTTP or HTTPS. 

 

Regards


   
ReplyQuote
(@wjterveld)
Active Member
Joined: 4 months ago
Posts: 13
Topic starter  

The backend is HTTPS

You can connect to HTTP, but it will redirect to HTTPS

 

curl https://domain.com/nesp/app/heartbeat -k

returns a success

This post was modified 5 hours ago 2 times by wjterveld
This post was modified 5 hours ago 2 times by emiliocm

   
ReplyQuote
(@wjterveld)
Active Member
Joined: 4 months ago
Posts: 13
Topic starter  

check_http -H domain.com -p 443 --ssl -S -u /nesp/app/heartbeat -e 'Success' -t 5

returns a Success, But when I put it in the moniotoring it fails?

This post was modified 5 hours ago 2 times by emiliocm

   
ReplyQuote
emiliocm
(@emiliocm)
SKUDONET Engineer Moderator
Joined: 8 months ago
Posts: 58
 

Glad to know you found the solution. Sometimes it isn't easy to help with something related to local configuration, as we don't have any data about this.

 

We will proceed to close this support request as it is solved. 

 

Regards!


   
ReplyQuote
emiliocm
(@emiliocm)
SKUDONET Engineer Moderator
Joined: 8 months ago
Posts: 58
 

configure farmguardian command field with the following content:

 

check_http -H HOST -p PORT --ssl -S -u /nesp/app/heartbeat -e 'Success' -t 5

In case the HTTPS backend field is enabled, I assume your backends are configured in SSL mode. 


   
ReplyQuote
(@wjterveld)
Active Member
Joined: 4 months ago
Posts: 13
Topic starter  

I do Think so


   
ReplyQuote
emiliocm
(@emiliocm)
SKUDONET Engineer Moderator
Joined: 8 months ago
Posts: 58
 

Hi, you are running 2 l4xnat farms: 

For the first farm (no ssl) you have to create a farmguardian without the SSL part (--ssl -S) 

For the second farm ( I assume port 443 accepts SSL traffic), you have to configure another farmguardian with the SSL part (--ssl -S) 

 

Regards!

 

This post was modified 4 hours ago 2 times by emiliocm

   
ReplyQuote
Share:

Download Skudonet ADC Load Balancer
Community Edition

Source Code

A versatile and installable ADC system designed for diverse vendor hardware.

DOWNLOAD SOURCE

Installable ISO 

Load Balancing as a Service alongside an ADC orchestration toolkit.

DOWNLOAD ISO
Download Community Edition

Download Community Edition

“We manage the information you provide with the sole aim of assisting with your requests or queries in regards to our products or services; applying the computer and security procedures to ensure its protection. Your data can be rectified or removed upon request but won’t be offered to any third parties, unless we are legally required to do so.” Responsible: SKUDONET SL - info@skudonet.com