From b7737e7192a29e9490f5222eeaac50759f5223a1 Mon Sep 17 00:00:00 2001 From: Lucie Dubrunfaut Date: Wed, 11 Dec 2024 11:19:09 +0100 Subject: [PATCH] Wrong values for THRESHOLDVALUE --- .../procedures/applications-protocol-http.md | 279 +++++++++-------- .../procedures/applications-protocol-http.md | 295 +++++++++--------- 2 files changed, 286 insertions(+), 288 deletions(-) diff --git a/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/applications-protocol-http.md b/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/applications-protocol-http.md index 7f3de1922fdc..3e1a764d1e85 100644 --- a/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/applications-protocol-http.md +++ b/i18n/fr/docusaurus-plugin-content-docs-pp/current/integrations/plugin-packs/procedures/applications-protocol-http.md @@ -30,10 +30,10 @@ Le connecteur apporte les modèles de service suivants | Alias | Modèle de service | Description | |:----------------------|:------------------------------------------|:------------------------------------------------------------------| -| Collection | App-Protocol-HTTP-Collection-custom | Collecte et calcule des données obtenues par le protocole HTTP. | -| HTTP-Expected-Content | App-Protocol-HTTP-Expected-Content-custom | Contrôle la présence d'une chaîne de caractères dans une page web. | -| HTTP-Json-Content | App-Protocol-HTTP-Json-Content-custom | Contrôle un webservice JSON. | -| HTTP-Soap-Content | App-Protocol-HTTP-Soap-Content-custom | Contrôle un webservice SOAP. | +| Collection | App-Protocol-HTTP-Collection-custom | Collecte et calcule des données obtenues par le protocole HTTP | +| HTTP-Expected-Content | App-Protocol-HTTP-Expected-Content-custom | Contrôle la présence d'une chaîne de caractères dans une page web | +| HTTP-Json-Content | App-Protocol-HTTP-Json-Content-custom | Contrôle un webservice JSON | +| HTTP-Soap-Content | App-Protocol-HTTP-Soap-Content-custom | Contrôle un webservice SOAP | > Les services listés ci-dessus ne sont pas créés automatiquement lorsqu'un modèle d'hôte est appliqué. Pour les utiliser, [créez un service manuellement](/docs/monitoring/basic-objects/services) et appliquez le modèle de service souhaité. @@ -98,8 +98,8 @@ Les métriques obtenues dépendent entièrement de la configuration de la collec ## Prérequis -La page ou application web interrogée doit être accessible via le protocole HTTP ou HTTPS depuis le collecteur. Il est possible -d'utiliser un proxy lorsque cela est nécessaire. +La page ou application web interrogée doit être accessible via le protocole HTTP ou HTTPS depuis le collecteur. +Il est possible d'utiliser un proxy lorsque cela est nécessaire. ## Installer le connecteur de supervision @@ -196,10 +196,10 @@ yum install centreon-plugin-Applications-Protocol-Http 3. Appliquez le modèle d'hôte **App-Protocol-HTTP-custom**. Une liste de macros apparaît. Les macros vous permettent de définir comment le connecteur se connectera à la ressource, ainsi que de personnaliser le comportement du connecteur. 4. Renseignez les macros désirées. Attention, certaines macros sont obligatoires. -| Macro | Description | Valeur par défaut | Obligatoire | -|:-------------|:-----------------------------------------------------------------------------------------------------|:------------------|:-----------:| -| PROTOCOL | Specify https if needed (default: 'http') | http | | -| PORT | Port used by web server | 80 | X | +| Macro | Description | Valeur par défaut | Obligatoire | +|:-------------|:---------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| PROTOCOL | Specify https if needed | http | | +| PORT | Port used by web server | 80 | X | | EXTRAOPTIONS | Any extra option you may want to add to every command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | 5. [Déployez la configuration](/docs/monitoring/monitoring-servers/deploying-a-configuration). L'hôte apparaît dans la liste des hôtes supervisés, et dans la page **Statut des ressources**. La commande envoyée par le connecteur est indiquée dans le panneau de détails de l'hôte : celle-ci montre les valeurs des macros. @@ -212,9 +212,9 @@ yum install centreon-plugin-Applications-Protocol-Http -| Macro | Description | Valeur par défaut | Obligatoire | -|:-------------|:---------------------------------------------------------------------------------------------------|:------------------|:-----------:| -| CONFIG | Configuration file or JSON code to use (required). | | X | +| Macro | Description | Valeur par défaut | Obligatoire | +|:-------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| CONFIG | Configuration file or JSON code to use | | X | | EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | @@ -223,57 +223,57 @@ yum install centreon-plugin-Applications-Protocol-Http | Macro | Description | Valeur par défaut | Obligatoire | |:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| | EXPECTEDCONTENT | Define the expected expression, where --expected-string='mypattern' is actually a shortcut for --critical-content='%{content} !~ /mypattern/mi'. It is recommended to use --critical-content directly | | | -| URLPATH | Define the path of the web page to get (default: '/') | / | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | +| URLPATH | Define the path of the web page to get | / | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | -| Macro | Description | Valeur par défaut | Obligatoire | -|:----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|:-----------:| -| URLPATH | Set path to get Webpage (default: '/') | / | | -| HEADER | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx' | Content-Type: text/xml;charset=UTF-8 | | -| THRESHOLDVALUE | Define the scope to which the numeric thresholds apply. Possible values for this option: 'value' to check numeric values, 'count' to check the number of values (default: count) | count | | -| FORMATOK | Customize the format of the output when the status is OK (default: '%{count} element(s) found'). You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | %{count} element(s) found | | -| DATAFILE | Set file with JSON request | | | -| LOOKUP | What to lookup in JSON response (JSON XPath string) (can be multiple) See: http://goessner.net/articles/JsonPath/ | | | -| FORMATWARNING | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | %{count} element(s) found | | -| FORMATCRITICAL | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | %{count} element(s) found | | -| WARNINGNUMERIC | Warning threshold (default: on total matching elements) | | | -| CRITICALNUMERIC | Critical threshold (default: on total matching elements) | | | -| WARNINGSTRING | Returns a WARNING status if the value matches the string | | | -| CRITICALSTRING | Returns a CRITICAL status if the value matches the string | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|:-----------:| +| URLPATH | Set path to get Webpage | / | | +| HEADER | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx' | Content-Type: text/xml;charset=UTF-8 | | +| THRESHOLDVALUE | Define the scope to which the numeric thresholds apply. Possible values for this option: 'values' to check numeric values, 'count' to check the number of values | count | | +| FORMATOK | Customize the format of the output when the status is OK. You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | %{count} element(s) found | | +| DATAFILE | Set file with JSON request | | | +| LOOKUP | What to lookup in JSON response (JSON XPath string) (can be multiple) See: http://goessner.net/articles/JsonPath/ | | | +| FORMATWARNING | Customize the format of the output when the status is WARNING. You can use the variables described in --format-ok | %{count} element(s) found | | +| FORMATCRITICAL | Customize the format of the output when the status is CRITICAL. You can use the variables described in --format-ok | %{count} element(s) found | | +| WARNINGNUMERIC | Warning threshold (default: on total matching elements) | | | +| CRITICALNUMERIC | Critical threshold (default: on total matching elements) | | | +| WARNINGSTRING | Returns a WARNING status if the value matches the string | | | +| CRITICALSTRING | Returns a CRITICAL status if the value matches the string | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | -| Macro | Description | Valeur par défaut | Obligatoire | -|:-------------|:---------------------------------------------------------------------------------------------------|:------------------|:-----------:| -| URLPATH | Define the path of the web page to get (default: '/') | / | | -| CRITICAL | | | | -| WARNING | | | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:-------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| +| URLPATH | Define the path of the web page to get | / | | +| CRITICAL | Warning threshold | | | +| WARNING | Critical threshold | | | | EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | -| Macro | Description | Valeur par défaut | Obligatoire | -|:----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|:-----------:| -| URLPATH | Set path to get the web page (default: '/') | / | | -| SERVICESOAP | Service Soap Action (required) | | | -| HEADER | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx' | Content-Type: text/xml;charset=UTF-8 | | -| DATAFILE | Set file with SOAP request (required) | | | -| LOOKUP | What to lookup in XML response (XPath string) (can be multiple) FORMAT OPTIONS: | | | -| THRESHOLDVALUE | Define the scope to which the numeric thresholds apply. Possible values for this option: 'value' to check numeric values, 'count' to check the number of values (default: count) | count | | -| FORMATOK | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | %{count} element(s) found | | -| FORMATWARNING | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | %{count} element(s) found | | -| FORMATCRITICAL | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | %{count} element(s) found | | -| WARNINGNUMERIC | Warning threshold (default: on total matching elements) | | | -| CRITICALNUMERIC | Critical threshold (default: on total matching elements) | | | -| WARNINGSTRING | Returns a WARNING status if the value matches the string | | | -| CRITICALSTRING | Returns a CRITICAL status if the value matches the string | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | +| Macro | Description | Valeur par défaut | Obligatoire | +|:----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|:-----------:| +| URLPATH | Set path to get the web page | / | X | +| SERVICESOAP | Service Soap Action | | | +| HEADER | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx' | Content-Type: text/xml;charset=UTF-8 | | +| DATAFILE | Set file with SOAP request | | X | +| LOOKUP | What to lookup in XML response (XPath string) (can be multiple) FORMAT OPTIONS: | | | +| THRESHOLDVALUE | Define the scope to which the numeric thresholds apply. Possible values for this option: 'values' to check numeric values, 'count' to check the number of values | count | | +| FORMATOK | Customize the format of the output when the status is OK. You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | %{count} element(s) found | | +| FORMATWARNING | Customize the format of the output when the status is WARNING. You can use the variables described in --format-ok | %{count} element(s) found | | +| FORMATCRITICAL | Customize the format of the output when the status is CRITICAL. You can use the variables described in --format-ok | %{count} element(s) found | | +| WARNINGNUMERIC | Warning threshold (default: on total matching elements) | | | +| CRITICALNUMERIC | Critical threshold (default: on total matching elements) | | | +| WARNINGSTRING | Returns a WARNING status if the value matches the string | | | +| CRITICALSTRING | Returns a CRITICAL status if the value matches the string | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). Toutes les options sont listées [ici](#options-disponibles). | | | @@ -304,7 +304,6 @@ La commande devrait retourner un message de sortie similaire à : ```bash OK: response time 0.078s | 'http.response.time.seconds'=0.078s;;;0; 'http.response.size.count'=49602B;;;0; 'http.response.resolve.time.milliseconds'=4.176ms;;;0; 'http.response.connect.time.milliseconds'=4.176ms;;;0; 'http.response.processing.time.milliseconds'=44.163ms;;;0; 'http.response.transfer.time.milliseconds'=4.176ms;;;0; - ``` ### Diagnostic des erreurs communes @@ -440,52 +439,52 @@ Les options disponibles pour chaque modèle de services sont listées ci-dessous -| Option | Description | -|:--------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | -| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | -| --proxypac | Proxy pac file (can be a URL or a local file). | -| --insecure | Accept insecure SSL connections. | -| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | -| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | -| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | -| --data | Set file with JSON request | -| --lookup | What to lookup in JSON response (JSON XPath string) (can be multiple) See: http://goessner.net/articles/JsonPath/ | -| --lookup-perfdatas-nagios | Take perfdatas from the JSON response (JSON XPath string) Chain must be formated in Nagios format. Ex : "rta=10.752ms;50.000;100.000;0; pl=0%;20;40;; rtmax=10.802ms;;;;" FORMAT OPTIONS: | -| --format-lookup | Take the output message from the JSON response (JSON XPath string) Override all the format options but substitute are still applied. | -| --format-ok | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | -| --format-warning | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --format-critical | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --format-unknown | Customize the format of the output when the status is UNKNOWN (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --values-separator | Separator used for values in format option (default: ', ') THRESHOLD OPTIONS: | -| --warning-numeric | Warning threshold (default: on total matching elements) | -| --critical-numeric | Critical threshold (default: on total matching elements) | -| --threshold-value | Define the scope to which the numeric thresholds apply. Possible values for this option: 'value' to check numeric values, 'count' to check the number of values (default: count). | -| --warning-string | Returns a WARNING status if the value matches the string. | -| --critical-string | Returns a CRITICAL status if the value matches the string. | -| --unknown-string | Returns a UNKNOWN status if the value matches the string. | -| --warning-time | Warning threshold in seconds of webservice response time | -| --critical-time | Critical threshold in seconds of webservice response time HTTP OPTIONS: | -| --hostname | IP Addr/FQDN of the web server host. | -| --port | Port used by web server. | -| --proto | Specify https if needed. | -| --urlpath | Set path to get Webpage (default: '/'). | -| --credentials | Specify this option if you are accessing a web page using authentication. | -| --username | Specify the username for authentication (mandatory if --credentials is specified). | -| --password | Specify the password for authentication (mandatory if --credentials is specified). | -| --basic | Specify this option if you are accessing a web page using basicauthentication and don't want a '401 UNAUTHORIZED' error to be logged on your web server. Specify this option if you are accessing a web page using hidden basic authentication or you'll get a '404 NOT FOUND' error. (use with --credentials) | -| --ntlmv2 | Specify this option if you are accessing a web page using ntlmv2 authentication (use with --credentials and --port options). | -| --timeout | Define the timeout in seconds (default: 10). | -| --cert-file | Specify the path to the certificate to send to the web server. | -| --key-file | Specify the path to the key to send to the web server. | -| --cacert-file | Specify the root certificate to send to the web server. | -| --cert-pwd | Specify the certificate's password. | -| --cert-pkcs12 | Specify that the type of certificate is PKCS1. | -| --get-param | Set GET params (multiple option. Example: --get-param='key=value'). | -| --header | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx'. | -| --unknown-status | Unknown conditions for http response code (default: '%{http\_code} \< 200 or %{http\_code} \>= 300'). | -| --warning-status | Warning conditions for http response code. | -| --critical-status | Critical conditions for http response code. | +| Option | Description | +|:--------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | +| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | +| --proxypac | Proxy pac file (can be a URL or a local file). | +| --insecure | Accept insecure SSL connections. | +| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | +| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | +| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | +| --data | Set file with JSON request | +| --lookup | What to lookup in JSON response (JSON XPath string) (can be multiple) See: http://goessner.net/articles/JsonPath/ | +| --lookup-perfdatas-nagios | Take perfdatas from the JSON response (JSON XPath string) Chain must be formated in Nagios format. Ex : "rta=10.752ms;50.000;100.000;0; pl=0%;20;40;; rtmax=10.802ms;;;;" FORMAT OPTIONS: | +| --format-lookup | Take the output message from the JSON response (JSON XPath string) Override all the format options but substitute are still applied. | +| --format-ok | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | +| --format-warning | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --format-critical | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --format-unknown | Customize the format of the output when the status is UNKNOWN (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --values-separator | Separator used for values in format option (default: ', ') THRESHOLD OPTIONS: | +| --warning-numeric | Warning threshold (default: on total matching elements) | +| --critical-numeric | Critical threshold (default: on total matching elements) | +| --threshold-value | Define the scope to which the numeric thresholds apply. Possible values for this option: 'values' to check numeric values, 'count' to check the number of values (default: count). | +| --warning-string | Returns a WARNING status if the value matches the string. | +| --critical-string | Returns a CRITICAL status if the value matches the string. | +| --unknown-string | Returns a UNKNOWN status if the value matches the string. | +| --warning-time | Warning threshold in seconds of webservice response time | +| --critical-time | Critical threshold in seconds of webservice response time HTTP OPTIONS: | +| --hostname | IP Addr/FQDN of the web server host. | +| --port | Port used by web server. | +| --proto | Specify https if needed. | +| --urlpath | Set path to get Webpage (default: '/'). | +| --credentials | Specify this option if you are accessing a web page using authentication. | +| --username | Specify the username for authentication (mandatory if --credentials is specified). | +| --password | Specify the password for authentication (mandatory if --credentials is specified). | +| --basic | Specify this option if you are accessing a web page using basicauthentication and don't want a '401 UNAUTHORIZED' error to be logged on your web server. Specify this option if you are accessing a web page using hidden basic authentication or you'll get a '404 NOT FOUND' error. (use with --credentials) | +| --ntlmv2 | Specify this option if you are accessing a web page using ntlmv2 authentication (use with --credentials and --port options). | +| --timeout | Define the timeout in seconds (default: 10). | +| --cert-file | Specify the path to the certificate to send to the web server. | +| --key-file | Specify the path to the key to send to the web server. | +| --cacert-file | Specify the root certificate to send to the web server. | +| --cert-pwd | Specify the certificate's password. | +| --cert-pkcs12 | Specify that the type of certificate is PKCS1. | +| --get-param | Set GET params (multiple option. Example: --get-param='key=value'). | +| --header | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx'. | +| --unknown-status | Unknown conditions for http response code (default: '%{http\_code} \< 200 or %{http\_code} \>= 300'). | +| --warning-status | Warning conditions for http response code. | +| --critical-status | Critical conditions for http response code. | @@ -529,48 +528,48 @@ Les options disponibles pour chaque modèle de services sont listées ci-dessous -| Option | Description | -|:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | -| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | -| --proxypac | Proxy pac file (can be a URL or a local file). | -| --insecure | Accept insecure SSL connections. | -| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | -| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | -| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | -| --service-soap | Service Soap Action (required) | -| --data | Set file with SOAP request (required) | -| --lookup | What to lookup in XML response (XPath string) (can be multiple) FORMAT OPTIONS: | -| --format-ok | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | -| --format-warning | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --format-critical | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --values-separator | Separator used for values in format option (default: ', ') THRESHOLD OPTIONS: | -| --warning-numeric | Warning threshold (default: on total matching elements) | -| --critical-numeric | Critical threshold (default: on total matching elements) | -| --threshold-value | Define the scope to which the numeric thresholds apply. Possible values for this option: 'value' to check numeric values, 'count' to check the number of values (default: count). | -| --warning-string | Returns a WARNING status if the value matches the string. | -| --critical-string | Returns a CRITICAL status if the value matches the string. | -| --warning-time | Warning threshold in seconds of webservice response time | -| --critical-time | Critical threshold in seconds of webservice response time HTTP OPTIONS: | -| --hostname | IP Addr/FQDN of the web server host. | -| --port | Port used by web server. | -| --proto | Specify https if needed (default: 'http'). | -| --urlpath | Set path to get the web page (default: '/'). | -| --credentials | Specify this option if you are accessing a web page using authentication. | -| --username | Specify the username for authentication (mandatory if --credentials is specified). | -| --password | Specify the password for authentication (mandatory if --credentials is specified). | -| --basic | Specify this option if you are accessing a web page using basicauthentication and don't want a '401 UNAUTHORIZED' error to be logged on your web server. Specify this option if you are accessing a web page using hidden basic authentication or you'll get a '404 NOT FOUND' error (use with --credentials). | -| --ntlmv2 | Specify this option if you are accessing a web page using ntlmv2 authentication (use with --credentials and --port options). | -| --timeout | Define the timeout in seconds (default: 10). | -| --cert-file | Specify certificate to send to the web server. | -| --key-file | Specify key to send to the web server. | -| --cacert-file | Specify root certificate to send to the web server. | -| --cert-pwd | Specify certificate's password. | -| --cert-pkcs12 | Specify that the type of certificate is PKCS1. | -| --header | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx'. | -| --unknown-status | Unknown conditions for http response code (default: '%{http\_code} \< 200 or %{http\_code} \>= 300'). | -| --warning-status | Warning conditions for http response code. | -| --critical-status | Critical conditions for http response code. | +| Option | Description | +|:-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | +| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | +| --proxypac | Proxy pac file (can be a URL or a local file). | +| --insecure | Accept insecure SSL connections. | +| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | +| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | +| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | +| --service-soap | Service Soap Action (required) | +| --data | Set file with SOAP request (required) | +| --lookup | What to lookup in XML response (XPath string) (can be multiple) FORMAT OPTIONS: | +| --format-ok | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | +| --format-warning | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --format-critical | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --values-separator | Separator used for values in format option (default: ', ') THRESHOLD OPTIONS: | +| --warning-numeric | Warning threshold (default: on total matching elements) | +| --critical-numeric | Critical threshold (default: on total matching elements) | +| --threshold-value | Define the scope to which the numeric thresholds apply. Possible values for this option: 'values' to check numeric values, 'count' to check the number of values (default: count). | +| --warning-string | Returns a WARNING status if the value matches the string. | +| --critical-string | Returns a CRITICAL status if the value matches the string. | +| --warning-time | Warning threshold in seconds of webservice response time | +| --critical-time | Critical threshold in seconds of webservice response time HTTP OPTIONS: | +| --hostname | IP Addr/FQDN of the web server host. | +| --port | Port used by web server. | +| --proto | Specify https if needed (default: 'http'). | +| --urlpath | Set path to get the web page (default: '/'). | +| --credentials | Specify this option if you are accessing a web page using authentication. | +| --username | Specify the username for authentication (mandatory if --credentials is specified). | +| --password | Specify the password for authentication (mandatory if --credentials is specified). | +| --basic | Specify this option if you are accessing a web page using basicauthentication and don't want a '401 UNAUTHORIZED' error to be logged on your web server. Specify this option if you are accessing a web page using hidden basic authentication or you'll get a '404 NOT FOUND' error (use with --credentials). | +| --ntlmv2 | Specify this option if you are accessing a web page using ntlmv2 authentication (use with --credentials and --port options). | +| --timeout | Define the timeout in seconds (default: 10). | +| --cert-file | Specify certificate to send to the web server. | +| --key-file | Specify key to send to the web server. | +| --cacert-file | Specify root certificate to send to the web server. | +| --cert-pwd | Specify certificate's password. | +| --cert-pkcs12 | Specify that the type of certificate is PKCS1. | +| --header | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx'. | +| --unknown-status | Unknown conditions for http response code (default: '%{http\_code} \< 200 or %{http\_code} \>= 300'). | +| --warning-status | Warning conditions for http response code. | +| --critical-status | Critical conditions for http response code. | diff --git a/pp/integrations/plugin-packs/procedures/applications-protocol-http.md b/pp/integrations/plugin-packs/procedures/applications-protocol-http.md index 0e7ae3ae631b..ce84d217a427 100644 --- a/pp/integrations/plugin-packs/procedures/applications-protocol-http.md +++ b/pp/integrations/plugin-packs/procedures/applications-protocol-http.md @@ -18,21 +18,21 @@ The connector brings the following service templates (sorted by the host templat -| Service Alias | Service Template | Service Description | -|:-------------------|:---------------------------------------|:---------------------------------| -| HTTP-Response-Time | App-Protocol-HTTP-Response-Time-custom | Check response time of a web page. | +| Service Alias | Service Template | Service Description | +|:-------------------|:---------------------------------------|:----------------------------------| +| HTTP-Response-Time | App-Protocol-HTTP-Response-Time-custom | Check response time of a web page | > The services listed above are created automatically when the **App-Protocol-HTTP-custom** host template is used. -| Service Alias | Service Template | Service Description | -|:----------------------|:------------------------------------------|:--------------------------------------------| -| Collection | App-Protocol-HTTP-Collection-custom | Collect and compute data obtained using the HTTP protocol. | -| HTTP-Expected-Content | App-Protocol-HTTP-Expected-Content-custom | Check the presence of a string in a web page. | -| HTTP-Json-Content | App-Protocol-HTTP-Json-Content-custom | Check JSON content | -| HTTP-Soap-Content | App-Protocol-HTTP-Soap-Content-custom | Check SOAP content | +| Service Alias | Service Template | Service Description | +|:----------------------|:------------------------------------------|:----------------------------------------------------------| +| Collection | App-Protocol-HTTP-Collection-custom | Collect and compute data obtained using the HTTP protocol | +| HTTP-Expected-Content | App-Protocol-HTTP-Expected-Content-custom | Check the presence of a string in a web page | +| HTTP-Json-Content | App-Protocol-HTTP-Json-Content-custom | Check JSON content | +| HTTP-Soap-Content | App-Protocol-HTTP-Soap-Content-custom | Check SOAP content | > The services listed above are not created automatically when a host template is applied. To use them, [create a service manually](/docs/monitoring/basic-objects/services), then apply the service template you want. @@ -97,8 +97,8 @@ The obtained metrics depend fully on the collection's configuration. ## Prerequisites -The target website or webapp should be accessible over HTTP/HTTPS from the poller. Specific option can be used -to specify a proxy when it is required. +The target website or webapp should be accessible over HTTP/HTTPS from the poller. +Specific option can be used to specify a proxy when it is required. ## Installing the monitoring connector @@ -197,11 +197,11 @@ yum install centreon-plugin-Applications-Protocol-Http 3. Apply the **App-Protocol-HTTP-custom** template to the host. A list of macros appears. Macros allow you to define how the connector will connect to the resource, and to customize the connector's behavior. 4. Fill in the macros you want. Some macros are mandatory. -| Macro | Description | Default value | Mandatory | -|:-------------|:-----------------------------------------------------------------------------------------------------|:------------------|:-----------:| -| PROTOCOL | Specify https if needed (default: 'http') | http | | -| PORT | Port used by web server | 80 | X | -| EXTRAOPTIONS | Any extra option you may want to add to every command (a --verbose flag for example). All options are listed [here](#available-options). | | | +| Macro | Description | Default value | Mandatory | +|:-------------|:-----------------------------------------------------------------------------------------------------------------------------------------|:------------------|:---------:| +| PROTOCOL | Specify https if needed | http | | +| PORT | Port used by web server | 80 | X | +| EXTRAOPTIONS | Any extra option you may want to add to every command (a --verbose flag for example). All options are listed [here](#available-options). | | | 5. [Deploy the configuration](/docs/monitoring/monitoring-servers/deploying-a-configuration). The host appears in the list of hosts, and on the **Resources Status** page. The command that is sent by the connector is displayed in the details panel of the host: it shows the values of the macros. @@ -213,10 +213,10 @@ yum install centreon-plugin-Applications-Protocol-Http -| Macro | Description | Default value | Mandatory | -|:-------------|:---------------------------------------------------------------------------------------------------|:------------------|:-----------:| -| CONFIG | Configuration file or JSON code to use (required). | | X | -| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | +| Macro | Description | Default value | Mandatory | +|:-------------|:---------------------------------------------------------------------------------------------------------------------------------------|:------------------|:---------:| +| CONFIG | Configuration file or JSON code to use | | X | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | @@ -224,57 +224,57 @@ yum install centreon-plugin-Applications-Protocol-Http | Macro | Description | Default value | Mandatory | |:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|:-----------:| | EXPECTEDCONTENT | Define the expected expression, where --expected-string='mypattern' is actually a shortcut for --critical-content='%{content} !~ /mypattern/mi'. It is recommended to use --critical-content directly | | | -| URLPATH | Define the path of the web page to get (default: '/') | / | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | +| URLPATH | Define the path of the web page to get | / | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | -| Macro | Description | Default value | Mandatory | -|:----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|:-----------:| -| URLPATH | Set path to get Webpage (default: '/') | / | | -| HEADER | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx' | Content-Type: text/xml;charset=UTF-8 | | -| THRESHOLDVALUE | Define the scope to which the numeric thresholds apply. Possible values for this option: 'value' to check numeric values, 'count' to check the number of values (default: count) | count | | -| FORMATOK | Customize the format of the output when the status is OK (default: '%{count} element(s) found'). You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | %{count} element(s) found | | -| DATAFILE | Set file with JSON request | | | -| LOOKUP | What to lookup in JSON response (JSON XPath string) (can be multiple) See: http://goessner.net/articles/JsonPath/ | | | -| FORMATWARNING | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | %{count} element(s) found | | -| FORMATCRITICAL | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | %{count} element(s) found | | -| WARNINGNUMERIC | Warning threshold (default: on total matching elements) | | | -| CRITICALNUMERIC | Critical threshold (default: on total matching elements) | | | -| WARNINGSTRING | Returns a WARNING status if the value matches the string | | | -| CRITICALSTRING | Returns a CRITICAL status if the value matches the string | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | +| Macro | Description | Default value | Mandatory | +|:----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|:-----------:| +| URLPATH | Set path to get Webpage | / | | +| HEADER | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx' | Content-Type: text/xml;charset=UTF-8 | | +| THRESHOLDVALUE | Define the scope to which the numeric thresholds apply. Possible values for this option: 'values' to check numeric values, 'count' to check the number of values | count | | +| FORMATOK | Customize the format of the output when the status is OK. You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | %{count} element(s) found | | +| DATAFILE | Set file with JSON request | | | +| LOOKUP | What to lookup in JSON response (JSON XPath string) (can be multiple) See: http://goessner.net/articles/JsonPath/ | | | +| FORMATWARNING | Customize the format of the output when the status is WARNING. You can use the variables described in --format-ok | %{count} element(s) found | | +| FORMATCRITICAL | Customize the format of the output when the status is CRITICAL. You can use the variables described in --format-ok | %{count} element(s) found | | +| WARNINGNUMERIC | Warning threshold (default: on total matching elements) | | | +| CRITICALNUMERIC | Critical threshold (default: on total matching elements) | | | +| WARNINGSTRING | Returns a WARNING status if the value matches the string | | | +| CRITICALSTRING | Returns a CRITICAL status if the value matches the string | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | -| Macro | Description | Default value | Mandatory | -|:-------------|:---------------------------------------------------------------------------------------------------|:------------------|:-----------:| -| URLPATH | Define the path of the web page to get (default: '/') | / | | -| CRITICAL | | | | -| WARNING | | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | +| Macro | Description | Default value | Mandatory | +|:-------------|:---------------------------------------------------------------------------------------------------------------------------------------|:--------------|:---------:| +| URLPATH | Define the path of the web page to get | / | | +| CRITICAL | Warning threshold | | | +| WARNING | Critical threshold | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | -| Macro | Description | Default value | Mandatory | -|:----------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|:-----------:| -| URLPATH | Set path to get the web page (default: '/') | / | | -| SERVICESOAP | Service Soap Action (required) | | | -| HEADER | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx' | Content-Type: text/xml;charset=UTF-8 | | -| DATAFILE | Set file with SOAP request (required) | | | -| LOOKUP | What to lookup in XML response (XPath string) (can be multiple) FORMAT OPTIONS: | | | -| THRESHOLDVALUE | Define the scope to which the numeric thresholds apply. Possible values for this option: 'value' to check numeric values, 'count' to check the number of values (default: count) | count | | -| FORMATOK | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | %{count} element(s) found | | -| FORMATWARNING | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | %{count} element(s) found | | -| FORMATCRITICAL | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | %{count} element(s) found | | -| WARNINGNUMERIC | Warning threshold (default: on total matching elements) | | | -| CRITICALNUMERIC | Critical threshold (default: on total matching elements) | | | -| WARNINGSTRING | Returns a WARNING status if the value matches the string | | | -| CRITICALSTRING | Returns a CRITICAL status if the value matches the string | | | -| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | +| Macro | Description | Default value | Mandatory | +|:----------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------|:---------:| +| URLPATH | Set path to get the web page | / | X | +| SERVICESOAP | Service Soap Action | | | +| HEADER | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx' | Content-Type: text/xml;charset=UTF-8 | | +| DATAFILE | Set file with SOAP request | | X | +| LOOKUP | What to lookup in XML response (XPath string) (can be multiple) FORMAT OPTIONS: | | | +| THRESHOLDVALUE | Define the scope to which the numeric thresholds apply. Possible values for this option: 'values' to check numeric values, 'count' to check the number of values | count | | +| FORMATOK | Customize the format of the output when the status is OK. You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | %{count} element(s) found | | +| FORMATWARNING | Customize the format of the output when the status is WARNING. You can use the variables described in --format-ok | %{count} element(s) found | | +| FORMATCRITICAL | Customize the format of the output when the status is CRITICAL. You can use the variables described in --format-ok | %{count} element(s) found | | +| WARNINGNUMERIC | Warning threshold (default: on total matching elements) | | | +| CRITICALNUMERIC | Critical threshold (default: on total matching elements) | | | +| WARNINGSTRING | Returns a WARNING status if the value matches the string | | | +| CRITICALSTRING | Returns a CRITICAL status if the value matches the string | | | +| EXTRAOPTIONS | Any extra option you may want to add to the command (a --verbose flag for example). All options are listed [here](#available-options). | | | @@ -303,7 +303,6 @@ The expected command output is shown below: ```bash OK: response time 0.078s | 'http.response.time.seconds'=0.078s;;;0; 'http.response.size.count'=49602B;;;0; 'http.response.resolve.time.milliseconds'=4.176ms;;;0; 'http.response.connect.time.milliseconds'=4.176ms;;;0; 'http.response.processing.time.milliseconds'=44.163ms;;;0; 'http.response.transfer.time.milliseconds'=4.176ms;;;0; - ``` ### Troubleshooting @@ -439,52 +438,52 @@ All available options for each service template are listed below: -| Option | Description | -|:--------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | -| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | -| --proxypac | Proxy pac file (can be a URL or a local file). | -| --insecure | Accept insecure SSL connections. | -| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | -| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | -| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | -| --data | Set file with JSON request | -| --lookup | What to lookup in JSON response (JSON XPath string) (can be multiple) See: http://goessner.net/articles/JsonPath/ | -| --lookup-perfdatas-nagios | Take perfdatas from the JSON response (JSON XPath string) Chain must be formated in Nagios format. Ex : "rta=10.752ms;50.000;100.000;0; pl=0%;20;40;; rtmax=10.802ms;;;;" FORMAT OPTIONS: | -| --format-lookup | Take the output message from the JSON response (JSON XPath string) Override all the format options but substitute are still applied. | -| --format-ok | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | -| --format-warning | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --format-critical | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --format-unknown | Customize the format of the output when the status is UNKNOWN (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --values-separator | Separator used for values in format option (default: ', ') THRESHOLD OPTIONS: | -| --warning-numeric | Warning threshold (default: on total matching elements) | -| --critical-numeric | Critical threshold (default: on total matching elements) | -| --threshold-value | Define the scope to which the numeric thresholds apply. Possible values for this option: 'value' to check numeric values, 'count' to check the number of values (default: count). | -| --warning-string | Returns a WARNING status if the value matches the string. | -| --critical-string | Returns a CRITICAL status if the value matches the string. | -| --unknown-string | Returns a UNKNOWN status if the value matches the string. | -| --warning-time | Warning threshold in seconds of webservice response time | -| --critical-time | Critical threshold in seconds of webservice response time HTTP OPTIONS: | -| --hostname | IP Addr/FQDN of the web server host. | -| --port | Port used by web server. | -| --proto | Specify https if needed. | -| --urlpath | Set path to get Webpage (default: '/'). | -| --credentials | Specify this option if you are accessing a web page using authentication. | -| --username | Specify the username for authentication (mandatory if --credentials is specified). | -| --password | Specify the password for authentication (mandatory if --credentials is specified). | -| --basic | Specify this option if you are accessing a web page using basicauthentication and don't want a '401 UNAUTHORIZED' error to be logged on your web server. Specify this option if you are accessing a web page using hidden basic authentication or you'll get a '404 NOT FOUND' error. (use with --credentials) | -| --ntlmv2 | Specify this option if you are accessing a web page using ntlmv2 authentication (use with --credentials and --port options). | -| --timeout | Define the timeout in seconds (default: 10). | -| --cert-file | Specify the path to the certificate to send to the web server. | -| --key-file | Specify the path to the key to send to the web server. | -| --cacert-file | Specify the root certificate to send to the web server. | -| --cert-pwd | Specify the certificate's password. | -| --cert-pkcs12 | Specify that the type of certificate is PKCS1. | -| --get-param | Set GET params (multiple option. Example: --get-param='key=value'). | -| --header | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx'. | -| --unknown-status | Unknown conditions for http response code (default: '%{http\_code} \< 200 or %{http\_code} \>= 300'). | -| --warning-status | Warning conditions for http response code. | -| --critical-status | Critical conditions for http response code. | +| Option | Description | +|:--------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | +| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | +| --proxypac | Proxy pac file (can be a URL or a local file). | +| --insecure | Accept insecure SSL connections. | +| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | +| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | +| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | +| --data | Set file with JSON request | +| --lookup | What to lookup in JSON response (JSON XPath string) (can be multiple) See: http://goessner.net/articles/JsonPath/ | +| --lookup-perfdatas-nagios | Take perfdatas from the JSON response (JSON XPath string) Chain must be formated in Nagios format. Ex : "rta=10.752ms;50.000;100.000;0; pl=0%;20;40;; rtmax=10.802ms;;;;" FORMAT OPTIONS: | +| --format-lookup | Take the output message from the JSON response (JSON XPath string) Override all the format options but substitute are still applied. | +| --format-ok | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | +| --format-warning | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --format-critical | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --format-unknown | Customize the format of the output when the status is UNKNOWN (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --values-separator | Separator used for values in format option (default: ', ') THRESHOLD OPTIONS: | +| --warning-numeric | Warning threshold (default: on total matching elements) | +| --critical-numeric | Critical threshold (default: on total matching elements) | +| --threshold-value | Define the scope to which the numeric thresholds apply. Possible values for this option: 'values' to check numeric values, 'count' to check the number of values (default: count). | +| --warning-string | Returns a WARNING status if the value matches the string. | +| --critical-string | Returns a CRITICAL status if the value matches the string. | +| --unknown-string | Returns a UNKNOWN status if the value matches the string. | +| --warning-time | Warning threshold in seconds of webservice response time | +| --critical-time | Critical threshold in seconds of webservice response time HTTP OPTIONS: | +| --hostname | IP Addr/FQDN of the web server host. | +| --port | Port used by web server. | +| --proto | Specify https if needed. | +| --urlpath | Set path to get Webpage (default: '/'). | +| --credentials | Specify this option if you are accessing a web page using authentication. | +| --username | Specify the username for authentication (mandatory if --credentials is specified). | +| --password | Specify the password for authentication (mandatory if --credentials is specified). | +| --basic | Specify this option if you are accessing a web page using basicauthentication and don't want a '401 UNAUTHORIZED' error to be logged on your web server. Specify this option if you are accessing a web page using hidden basic authentication or you'll get a '404 NOT FOUND' error. (use with --credentials) | +| --ntlmv2 | Specify this option if you are accessing a web page using ntlmv2 authentication (use with --credentials and --port options). | +| --timeout | Define the timeout in seconds (default: 10). | +| --cert-file | Specify the path to the certificate to send to the web server. | +| --key-file | Specify the path to the key to send to the web server. | +| --cacert-file | Specify the root certificate to send to the web server. | +| --cert-pwd | Specify the certificate's password. | +| --cert-pkcs12 | Specify that the type of certificate is PKCS1. | +| --get-param | Set GET params (multiple option. Example: --get-param='key=value'). | +| --header | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx'. | +| --unknown-status | Unknown conditions for http response code (default: '%{http\_code} \< 200 or %{http\_code} \>= 300'). | +| --warning-status | Warning conditions for http response code. | +| --critical-status | Critical conditions for http response code. | @@ -528,48 +527,48 @@ All available options for each service template are listed below: -| Option | Description | -|:-------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | -| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | -| --proxypac | Proxy pac file (can be a URL or a local file). | -| --insecure | Accept insecure SSL connections. | -| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | -| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | -| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | -| --service-soap | Service Soap Action (required) | -| --data | Set file with SOAP request (required) | -| --lookup | What to lookup in XML response (XPath string) (can be multiple) FORMAT OPTIONS: | -| --format-ok | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | -| --format-warning | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --format-critical | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | -| --values-separator | Separator used for values in format option (default: ', ') THRESHOLD OPTIONS: | -| --warning-numeric | Warning threshold (default: on total matching elements) | -| --critical-numeric | Critical threshold (default: on total matching elements) | -| --threshold-value | Define the scope to which the numeric thresholds apply. Possible values for this option: 'value' to check numeric values, 'count' to check the number of values (default: count). | -| --warning-string | Returns a WARNING status if the value matches the string. | -| --critical-string | Returns a CRITICAL status if the value matches the string. | -| --warning-time | Warning threshold in seconds of webservice response time | -| --critical-time | Critical threshold in seconds of webservice response time HTTP OPTIONS: | -| --hostname | IP Addr/FQDN of the web server host. | -| --port | Port used by web server. | -| --proto | Specify https if needed (default: 'http'). | -| --urlpath | Set path to get the web page (default: '/'). | -| --credentials | Specify this option if you are accessing a web page using authentication. | -| --username | Specify the username for authentication (mandatory if --credentials is specified). | -| --password | Specify the password for authentication (mandatory if --credentials is specified). | -| --basic | Specify this option if you are accessing a web page using basicauthentication and don't want a '401 UNAUTHORIZED' error to be logged on your web server. Specify this option if you are accessing a web page using hidden basic authentication or you'll get a '404 NOT FOUND' error (use with --credentials). | -| --ntlmv2 | Specify this option if you are accessing a web page using ntlmv2 authentication (use with --credentials and --port options). | -| --timeout | Define the timeout in seconds (default: 10). | -| --cert-file | Specify certificate to send to the web server. | -| --key-file | Specify key to send to the web server. | -| --cacert-file | Specify root certificate to send to the web server. | -| --cert-pwd | Specify certificate's password. | -| --cert-pkcs12 | Specify that the type of certificate is PKCS1. | -| --header | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx'. | -| --unknown-status | Unknown conditions for http response code (default: '%{http\_code} \< 200 or %{http\_code} \>= 300'). | -| --warning-status | Warning conditions for http response code. | -| --critical-status | Critical conditions for http response code. | +| Option | Description | +|:-------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| --http-peer-addr | Set the address you want to connect to. Useful if hostname is only a vhost, to avoid IP resolution. | +| --proxyurl | Proxy URL. Example: http://my.proxy:3128 | +| --proxypac | Proxy pac file (can be a URL or a local file). | +| --insecure | Accept insecure SSL connections. | +| --http-backend | Perl library to use for HTTP transactions. Possible values are: lwp (default) and curl. | +| --ssl-opt | Set SSL Options (--ssl-opt="SSL\_version =\> TLSv1" --ssl-opt="SSL\_verify\_mode =\> SSL\_VERIFY\_NONE"). | +| --curl-opt | Set CURL Options (--curl-opt="CURLOPT\_SSL\_VERIFYPEER =\> 0" --curl-opt="CURLOPT\_SSLVERSION =\> CURL\_SSLVERSION\_TLSv1\_1" ). | +| --service-soap | Service Soap Action (required) | +| --data | Set file with SOAP request (required) | +| --lookup | What to lookup in XML response (XPath string) (can be multiple) FORMAT OPTIONS: | +| --format-ok | Customize the format of the output when the status is OK (default: '%{count} element(s) found') You can use the following variables: '%{values}' = display all values (also text string) '%{values\_ok}' = values from attributes and text node only (separated by option values-separator) '%{values\_warning}' and '%{values\_critical}' | +| --format-warning | Customize the format of the output when the status is WARNING (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --format-critical | Customize the format of the output when the status is CRITICAL (default: '%{count} element(s) found') You can use the variables described in --format-ok | +| --values-separator | Separator used for values in format option (default: ', ') THRESHOLD OPTIONS: | +| --warning-numeric | Warning threshold (default: on total matching elements) | +| --critical-numeric | Critical threshold (default: on total matching elements) | +| --threshold-value | Define the scope to which the numeric thresholds apply. Possible values for this option: 'values' to check numeric values, 'count' to check the number of values (default: count). | +| --warning-string | Returns a WARNING status if the value matches the string. | +| --critical-string | Returns a CRITICAL status if the value matches the string. | +| --warning-time | Warning threshold in seconds of webservice response time | +| --critical-time | Critical threshold in seconds of webservice response time HTTP OPTIONS: | +| --hostname | IP Addr/FQDN of the web server host. | +| --port | Port used by web server. | +| --proto | Specify https if needed (default: 'http'). | +| --urlpath | Set path to get the web page (default: '/'). | +| --credentials | Specify this option if you are accessing a web page using authentication. | +| --username | Specify the username for authentication (mandatory if --credentials is specified). | +| --password | Specify the password for authentication (mandatory if --credentials is specified). | +| --basic | Specify this option if you are accessing a web page using basicauthentication and don't want a '401 UNAUTHORIZED' error to be logged on your web server. Specify this option if you are accessing a web page using hidden basic authentication or you'll get a '404 NOT FOUND' error (use with --credentials). | +| --ntlmv2 | Specify this option if you are accessing a web page using ntlmv2 authentication (use with --credentials and --port options). | +| --timeout | Define the timeout in seconds (default: 10). | +| --cert-file | Specify certificate to send to the web server. | +| --key-file | Specify key to send to the web server. | +| --cacert-file | Specify root certificate to send to the web server. | +| --cert-pwd | Specify certificate's password. | +| --cert-pkcs12 | Specify that the type of certificate is PKCS1. | +| --header | Set HTTP headers(multiple option). Example: --header='Content-Type: xxxxx'. | +| --unknown-status | Unknown conditions for http response code (default: '%{http\_code} \< 200 or %{http\_code} \>= 300'). | +| --warning-status | Warning conditions for http response code. | +| --critical-status | Critical conditions for http response code. |