HTTP status codes are useful diagnostic tools for a website to help determine if all content on a website is being delivered properly. Enabling the HTTP code collector for your preferred website will log every status code returned by the website. The first time a status code is returned, our Linux agent will create a metric for that code in Netuitive; each subsequent time the status code is returned, another metric will begin to count how many times the code has been returned. Thanks to this unique collector and its metrics, you can create a policy to monitor the status codes that are returned from your website, which can act as a basic check for website status.
- Navigate to the collectors folder.Note The default location is /opt/netuitive-agent/conf/collectors.
- Open the HttpCodeCollector.conf file.Note This configuration file will only be available in agent versions 0.3.1 or later. Otherwise, you will have to create a configuration file with the same name.
- Change the enabled setting to True.
- Change the req_url setting to contain the web page you want to collect statistics on.
- Save the file, and restart the Linux Agent.
Additional Configuration Options
|enabled||False||Enable collecting HTTP metrics.|
|req_url||http://example.com/||Comma-separated array of the full URLs to collect statistics on.|
|byte_unit||Default numeric output(s).|
|measure_collector_time||Measure the collector's run time in milliseconds.|
|metrics_blacklist||Regex list to match metrics to block. Mutually exclusive with metrics_whitelist option.|
|metrics_whitelist||Regex list to match metrics to transmit. Mutually exclusive with metrics_blacklist option.|
|req_port||Port for the web page you're collecting statistics on.|
|req_vhost||A host header variable (if necessary) that will be added to each request.|
This collector tracks per URL which response codes are received as well as the number of times each code was received as two separate metrics. The Response Code List metric's value is the literal response code number at the time it was received. The Response Code count increments each time a response code is received; this means that you won't have a metric for every response code until your web site serves up that response code.
|Friendly Name||Fully Qualified Name (FQN)||Description||Statistic||Units||Min||Max||Sparse Data Strategy (SDS)||BASE||CORR||UTIL|
|Response Code List||http.*.response_code||The response code sent to the user.||average||0||none||none|
|Response Code Count||http.*.response_code.#||For each response code metric (as illustrated by the #), the number of times a response code was served.||average||0||none||none|