Lighttpd

Lighttpd is a secure, fast, compliant, and very flexible web server that has been optimized for high-performance environments. It has a very low memory footprint compared to other web servers and takes care of CPU load. Its advanced feature set (FastCGI, CGI, Auth, Output Compression, URL Rewriting, and many more) make Lighttpd the perfect web server software for every server that suffers load problems. If Lighttpd is installed on your environment, the Sysdig agent will automatically connect. See the Default Configuration section, below. The Sysdig agent automatically collects the default metrics.

This page describes the default configuration settings, how to edit the configuration to collect additional information, the metrics available for integration, and a sample result in the Sysdig Monitor UI.

At this time, the Sysdig app check for Lighttpd supports Lighttpd version 1.x.x only.

Lighttpd Setup

For Lighttpd, the status page must be enabled. Add mod_status in the /etc/lighttpd/lighttpd.conf config file:

server.modules = ( ..., "mod_status", ... )

Then configure an endpoint for it. If (for security purposes) you want to open the status page only to users from the local network, it can be done by adding the following lines in the /etc/lighttpd/lighttpd.conf file :

$HTTP["remoteip"] == "127.0.0.1/8" {
    status.status-url = "/server-status"
  }

If you want an endpoint to be open for remote users based on authentication, then the mod_auth module should be enabled in the /etc/lighttpd/lighttpd.conf config file:

server.modules = ( ..., "mod_auth", ... )

Then you can add the auth.require parameter in the /etc/lighttpd/lighttpd.conf config file:

auth.require = ( "/server-status" => ( "method"  => ... , "realm"   => ... , "require" => ... ) )

For more information on the auth.require parameter, see the Lighttpd documentation..

Sysdig Agent Configuration

Review how to Edit dragent.yaml to Integrate or Modify Application Checks.

Default Configuration

By default, Sysdig’s dragent.default.yaml uses the following code to connect with Lighttpd and collect basic metrics.

app_checks:
  - name: lighttpd
    pattern:
      comm: lighttpd
    conf:
      lighttpd_status_url: "http://localhost:{port}/server-status?auto"
    log_errors: false

Metrics Available

These metrics are supported for Lighttpd version 1.x.x only. Lighttpd version 2.x.x is being built and is NOT ready for use as of this publication.

See Lighttpd Metrics.

Result in the Monitor UI