Check: HttpContent

To get this help: amcli --explain=HttpContent.

To add a section in your ini:

  • Execute: amcli --nocolor --explain=HttpContent >> example.ini.
  • edit the example.ini in a text editor and update the needed values.

Syntax of an ini section


; -----------------------------------------------------------------------------
;
; Plugin HttpContent
; This check verifies if a given url can be requested. Optionally you can test if it follows wanted rules.
;
[<Your check name>]
description="A short description what will be tested"
function="HttpContent"


; key 'url' {string} 🔸(required)
; Url to fetch
; example: https://www.example.com/
; default: (not provided)
params[url]=<Your value here>

; key 'userpwd' {string} 🔹(optional)
; User and password; syntax: “[username]:[password]”
; example: myuser:aVerySecretPassword
; default: (not provided)
params[userpwd]=<Your value here>

; key 'timeout' {int} 🔹(optional)
; Timeout in sec
; example: 10
; default: 5
params[timeout]=<Your value here>

; key 'headeronly' {bool} 🔹(optional)
; flag to fetch http response herader only (HEAD request); default: false = returns header and body;
; example: true
; default: (not provided)
params[headeronly]=<Your value here>

; key 'follow' {bool} 🔹(optional)
; flag to follow a location; default: false = do not follow; If you set it to true it ries to follow (but this is not a safe method)
; example: true
; default: (not provided)
params[follow]=<Your value here>

; key 'sslverify' {bool} 🔹(optional)
; Enable/ disable verification of ssl certificate; default: true (verification is on)
; example: false
; default: 1
params[sslverify]=<Your value here>

; key 'status' {int} 🔹(optional)
; Test for an expected http status code; if none is given then test fails on status 400 and greater.
; example: 401
; default: (not provided)
params[status]=<Your value here>

; key 'headercontains' {string} 🔹(optional)
; Test for a string in the http response header; it returns OK if the text was found
; example: Content-Type: text/css
; default: (not provided)
params[headercontains]=<Your value here>

; key 'headernotcontains' {string} 🔹(optional)
; Test for a string in the http response header; it returns OK if the text was not found
; example: Server:
; default: (not provided)
params[headernotcontains]=<Your value here>

; key 'headerregex' {string} 🔹(optional)
; Test for a regex in the http response header; it returns OK if the regex matches
; example: (not provided)
; default: (not provided)
params[headerregex]=<Your value here>

; key 'bodycontains' {string} 🔹(optional)
; Test for a string in the http response body; it returns OK if the text was found
; example: Content-Type: text/css
; default: (not provided)
params[bodycontains]=<Your value here>

; key 'bodynotcontains' {string} 🔹(optional)
; Test for a string in the http response body; it returns OK if the text was not found
; example: Server:
; default: (not provided)
params[bodynotcontains]=<Your value here>

; key 'bodyregex' {string} 🔹(optional)
; Test for a regex in the http response body; it returns OK if the regex matches
; example: (not provided)
; default: (not provided)
params[bodyregex]=<Your value here>

; key 'content' {bool} 🔹(optional)
; Show http response body; WARNING: set true for really small output only
; example: false
; default: (not provided)
params[content]=<Your value here>