lighttpd is an open-source web server optimized for speed-critical environments while remaining standards-compliant, secure and flexible. The low memory footprint (compared to other web servers), small CPU load and speed optimizations make lighttpd suitable for servers that are suffering load problems, or for serving static media separately from the dynamic content. lighttpd is free and open-source software and is distributed under the BSD license. It runs natively on Unix-like operating systems, as well as Microsoft Windows. lighttpd supports the FastCGI, SCGI and CGI interfaces to external programs, allowing web applications written in any programming language to be used with the server.

Prerequisites

  1. Modify the file /etc/lighttpd/lighttpd.conf or /etc/lighttpd2/lighttpd.conf, depending on the version, with the following:
server.modules = (
    "mod_access",
    "mod_alias",
    "mod_compress",
    "mod_redirect",
    "mod_status", ## This needs to be added
)
  1. For Virtual Machines, install the Linux Agent.

Configuring the credentials

Configure the credentials in the directory /opt/opsramp/agent/conf/app.d/creds.yaml

lighttpd:
- name: lighttpd
  user: <username>
  pwd: <Password>
  encoding-type: plain
  labels:
    key1: val1
    key2: val2

Configuring the application

Virtual machine

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-detection.yaml

- name: lighttpd
  instance-checks:
    service-check:
      - lighttpd
    process-check:
      - lighttpd
    port-check:
      - 80
    uri-check:
      - "server-status?auto"

Docker environment

Configure the application in the directory /opt/opsramp/agent/conf/app/discovery/auto-container-detection.yaml

- name: lighttpd
  container-checks:
    image-check:
      - lighttpd
    port-check:
      - 80

Kubernetes environment

Configure the application in config.yaml

- name: lighttpd
  container-checks:
    image-check:
      - lighttpd
    port-check:
      - 80

Validate

Go to Resources under the Infrastructure tab to check if your resources are onboarded and the metrics are collected.

Metrics

OpsRamp MetricMetric Display NameUnitDescription
lighttpd_uptimeUptimeminutesChecks the uptime lighttpd service
lighttpd_bytes_rateBytes Ratebytes / secondNumber of bytes transferred per second
lighttpd_bytes_per_requestBytes per requestbytes / requestNumber of bytes transferred per request
lighttpd_requests_rateRequests RateRequests / secondNumber of requests made per second
lighttpd_total_accessesTotal AccessesTotal number of accesses made
lighttpd_total_kbytesTotal kByteskilobytesNumber of total KBs
lighttpd_open_slotsOpen SlotsNumber of open slots
lighttpd_busy_serversBusy ServersNumber of busy servers
lighttpd_idle_serversIdle ServersNumber of idle servers
lighttpd_connections_state_startConnection State StartconnectionNumber of active connections in the state of initializing the read-idle timer
lighttpd_connections_state_read_headerConnection State Read HeaderconnectionNumber of active connections in the state of reading the http request header
lighttpd_connections_state_handle_requestConnection State Handle RequestconnectionNumber of active connections in the state of handling the request internally
lighttpd_connections_state_write_responseConnection State Write ResponseconnectionNumber of active connections in the state of writing the response to the network
lighttpd_connections_state_keep_aliveConnection State Keep AliveconnectionNumber of idle connections
lighttpd_requests_avgRequests Average Since StartRequestsAverage number of requests since server started
lighttpd_traffic_out_avgTraffic Out Average Since StartAverage traffic out since server start
lighttpd_traffic_in_avgTraffic In Average Since StartAverage traffic in since server start
lighttpd_connections_avgConnections Average Since StartConnectionAverage number of connections since server start
lighttpd_requests_avg_5secRequests Average Since Last 5 SecRequestsAverage number of requests since last 5 seconds
lighttpd_traffic_out_avg_5secTraffic Out Average Since Last 5 SecAverage traffic out since last 5 seconds
lighttpd_traffic_in_avg_5secTraffic In Average Since Last 5 SecAverage traffic in since last 5 seconds
lighttpd_connections_avg_5secConnections Average Since Last 5 SecconnectionAverage Number of connections since last 5 seconds
lighttpd_memory_usageMemory UsedbytesSize of memory used by Lighttpd
lighttpd_requests_absRequests RateRequests / secondNumber of requests made per second
lighttpd_traffic_out_absTraffic Out RateRate of Traffic Out
lighttpd_traffic_in_absTraffic In RateRate of Traffic In
lighttpd_connections_absConnections RateConnections rate
lighttpd_status_1xxStatus Code 1XXNumber of 1xx status codes generated per second
lighttpd_status_2xxStatus Code 2XXNumber of 2xx status codes generated per second
lighttpd_status_3xxStatus Code 3XXNumber of 3xx status codes generated per second
lighttpd_status_4xxStatus Code 4XXNumber of 4xx status codes generated per second
lighttpd_status_5xxStatus Code 5XXNumber of 5xx status codes generated per second