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 NameUnit
lighttpd_uptime

Checks the uptime lighttpd service
Uptimeminutes
lighttpd_bytes_rate

Number of bytes transferred per second
Bytes Ratebytes / second
lighttpd_bytes_per_request

Number of bytes transferred per request
Bytes per requestbytes / request
lighttpd_requests_rate

Number of requests made per second
Requests RateRequests / second
lighttpd_total_accesses

Total number of accesses made
Total Accesses
lighttpd_total_kbytes

Number of total KBs
Total kByteskilobytes
lighttpd_open_slots

Number of open slots
Open Slots
lighttpd_busy_servers

Number of busy servers
Busy Servers
lighttpd_idle_servers

Number of idle servers
Idle Servers
lighttpd_connections_state_start

Number of active connections in the state of initializing the read-idle timer
Connection State Startconnection
lighttpd_connections_state_read_header

Number of active connections in the state of reading the http request header
Connection State Read Headerconnection
lighttpd_connections_state_handle_request

Number of active connections in the state of handling the request internally
Connection State Handle Requestconnection
lighttpd_connections_state_write_response

Number of active connections in the state of writing the response to the network
Connection State Write Responseconnection
lighttpd_connections_state_keep_alive

Number of idle connections
Connection State Keep Aliveconnection
lighttpd_requests_avg

Average number of requests since server started
Requests Average Since StartRequests
lighttpd_traffic_out_avg

Average traffic out since server start
Traffic Out Average Since Start
lighttpd_traffic_in_avg

Average traffic in since server start
Traffic In Average Since Start
lighttpd_connections_avg

Average number of connections since server start
Connections Average Since StartConnection
lighttpd_requests_avg_5sec

Average number of requests since last 5 seconds
Requests Average Since Last 5 SecRequests
lighttpd_traffic_out_avg_5sec

Average traffic out since last 5 seconds
Traffic Out Average Since Last 5 Sec
lighttpd_traffic_in_avg_5sec

Average traffic in since last 5 seconds
Traffic In Average Since Last 5 Sec
lighttpd_connections_avg_5sec

Average Number of connections since last 5 seconds
Connections Average Since Last 5 Secconnection
lighttpd_memory_usage

Size of memory used by Lighttpd
Memory Usedbytes
lighttpd_requests_abs

Number of requests made per second
Requests RateRequests / second
lighttpd_traffic_out_abs

Rate of Traffic Out
Traffic Out Rate
lighttpd_traffic_in_abs

Rate of Traffic In
Traffic In Rate
lighttpd_connections_abs

Connections rate
Connections Rate
lighttpd_status_1xx

Number of 1xx status codes generated per second
Status Code 1XX
lighttpd_status_2xx

Number of 2xx status codes generated per second
Status Code 2XX
lighttpd_status_3xx

Number of 3xx status codes generated per second
Status Code 3XX
lighttpd_status_4xx

Number of 4xx status codes generated per second
Status Code 4XX
lighttpd_status_5xx

Number of 5xx status codes generated per second
Status Code 5XX