Contexte

Afin de superviser les instances et site web via le protocole HTTP, le pack HTTP/HTTPS met à disposition un modèle d'hôtes. 

  • http permet une supervision d'une instance ou d'un site web.

Liste des modèles d'hôte pour http

Vérification de la connectivité HTTP avec l'instance à superviser

Vérification de la connectivité HTTPS avec l'instance à superviser

Remplacer dans la commande ci-dessous :

  • DOMAINE par le domain ou l'ip cible ( google.com, 192.168.1.1, ...)
  • PORT par le port cible (  443 par défaut si non indiqué ).


[root@shinken-poller ~]# curl https://DOMAINE:PORT -vvv

Exemple de résultat

les échanges s'effectuent avec le serveur cible, les différents certificats Echanges TLS )  sont validés et le code de retour 200 OK nous confirme la connexion réussite.

$ curl https://www.google.com -vvv
* Rebuilt URL to: https://www.google.com/
*   Trying 2a00:1450:4007:810::2004...
* TCP_NODELAY set
*   Trying 172.217.20.196...
* TCP_NODELAY set
* Connected to www.google.com (172.217.20.196) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, [no content] (0):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=www.google.com
*  start date: Mar  4 07:19:07 2024 GMT
*  expire date: May 27 07:19:06 2024 GMT
*  subjectAltName: host "www.google.com" matched cert's "www.google.com"
*  issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* TLSv1.3 (OUT), TLS app data, [no content] (0):
* TLSv1.3 (OUT), TLS app data, [no content] (0):
* TLSv1.3 (OUT), TLS app data, [no content] (0):
* Using Stream ID: 1 (easy handle 0x56005e2ee6d0)
* TLSv1.3 (OUT), TLS app data, [no content] (0):
> GET / HTTP/2
> Host: www.google.com
> User-Agent: curl/7.61.1
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, [no content] (0):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS app data, [no content] (0):
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
* TLSv1.3 (OUT), TLS app data, [no content] (0):
* TLSv1.3 (IN), TLS app data, [no content] (0):
* TLSv1.3 (IN), TLS app data, [no content] (0):
< HTTP/2 200