Skip to main content

HTTP Server

Pack Assets​

Templates​

The Centreon Monitoring Connector HTTP Server brings a host template:

  • App-Protocol-HTTP-custom

It brings the following service templates:

Service AliasService TemplateService DescriptionDefault
HTTP-Expected-ContentApp-Protocol-HTTP-Expected-ContentCheck the presence of a string in a Webpage
HTTP-Json-ContentApp-Protocol-HTTP-Json-ContentCheck json content
HTTP-Response-TimeApp-Protocol-HTTP-Response-TimeCheck response time of a WabpageX
HTTP-Soap-ContentApp-Protocol-HTTP-Soap-ContentCheck soap content

Collected metrics & status​

Metric NameUnit
content
http.extracted.value.countcount
http.content.size.bytesB
http.response.time.secondss

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.

Setup​

  1. Install the package on every Centreon poller expected to monitor HTTP Server resources:
yum install centreon-plugin-Applications-Protocol-Http
  1. On the Centreon web interface, on page Configuration > Monitoring Connectors Manager, install the HTTP Server Centreon Monitoring Connector.

Configuration​

Host​

  • Log into Centreon and add a new host through Configuration > Hosts.
  • Fill the Name, Alias & IP Address/DNS fields according to your HTTP Server server settings.
  • Apply the App-Protocol-HTTP-custom template to the host.
  • Once the template is applied, fill in the corresponding macros. Some macros are mandatory.
MandatoryMacroDescription
EXTRAOPTIONSAny extra option you may want to add to every command line (eg. a --verbose flag)
PORT(Default: '80')
PROTOCOL(Default: 'http')

How to check in the CLI that the configuration is OK and what are the main options for?​

Once the plugin is installed, log into your Centreon poller's CLI using the centreon-engine user account (su - centreon-engine) and test the plugin by running the following command:

/usr/lib/centreon/plugins/centreon_protocol_http.pl \
--plugin=apps::protocols::http::plugin \
--mode=response \
--hostname=google.com \
--http-backend=curl \
--extra-stats \
--use-new-perfdata

The expected command output is shown below:

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;

All available options for a given mode can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins//centreon_protocol_http.pl \
--plugin=apps::protocols::http::plugin \
--mode=soap-content \
--help

All available modes can be displayed by adding the --list-mode parameter to the command:

/usr/lib/centreon/plugins//centreon_protocol_http.pl \
--plugin=apps::protocols::http::plugin \
--list-mode

Troubleshooting​

Please find the troubleshooting documentation for Centreon Plugins typical issues.