Monitoring Lighttpd

This article will help you get the Lighttpd plugin for sd-agent configured and returning metrics

Installing the lighttpd plugin package

Install the lighttpd plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-lighttpd

Install the lighttpd plugin on RHEL/CentOS:

sudo yum install sd-agent-lighttpd

Read more about agent plugins.

Configuring the agent to monitor Lighttpd

1. To allow monitoring of lighttpd, ensure you have mod_status enabled in /etc/lighttpd/lighttpd.conf and have configured a status URL. See the lighttpd docs for more info. Restart lighttpd after any changes.

2. Configure /etc/sd-agent/conf.d/lighttpd.yaml

init_config:

instances:

(for lighttpd1)
- lighttpd_status_url: http://localhost/server-status?auto

(for lighttpd2)
- lighttpd_status_url: http://localhost/server-status?format=plain

3. Restart the agent

sudo /etc/init.d/sd-agent restart

or

sudo systemctl restart sd-agent

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

or

/usr/share/python/sd-agent/agent.py info

If the agent has been configured correctly you'll see an output such as:

lighttpd
-----
  - instance #0 [OK]
  - Collected * metrics

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/agent.py check lighttpd

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the lighttpd metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Screen_Shot_2018-01-18_at_11.46.12.png

Monitored metrics

MetricValues
lighttpd.connections.state_handle_request

The number of active connections in the state of handling the request internally.
connection / None
Type: float
lighttpd.connections.state_keep_alive

The number of idle connections.
connection / None
Type: float
lighttpd.connections.state_read_header

The number of active connections in the state of reading the http request header.
connection / None
Type: float
lighttpd.connections.state_start

The number of active connections in the state of initializing the read-idle timer.
connection / None
Type: float
lighttpd.connections.state_write_response

The number of active connections in the state of writing the response to the network.
connection / None
Type: float
lighttpd.net.bytes

The number of bytes sent and received since start.
byte / None
Type: float
lighttpd.net.bytes_in

The number of bytes received per second.
byte / second
Type: float
lighttpd.net.bytes_in_avg

The average number of bytes received per second since start.
byte / second
Type: float
lighttpd.net.bytes_in_avg_5sec

The average number of bytes received per second in the past 5 seconds.
byte / second
Type: float
lighttpd.net.bytes_out

The number of bytes sent per second.
byte / second
Type: float
lighttpd.net.bytes_out_avg

The average number of bytes sent per second since start.
byte / second
Type: float
lighttpd.net.bytes_out_avg_5sec

The average number of bytes sent per second in the past 5 seconds.
byte / second
Type: float
lighttpd.net.bytes_per_s

The number of bytes sent and received per second.
byte / second
Type: float
lighttpd.net.connections_avg

The average number of connections per second since start.
connection / second
Type: float
lighttpd.net.connections_avg_5sec

The average number of connections per second in the past 5 seconds.
connection / second
Type: float
lighttpd.net.connections_total

The total number of connections per second.
connection / second
Type: float
lighttpd.net.hits

The number of hits since start.
hit / None
Type: float
lighttpd.net.request_per_s

The number of requests per second.
request / second
Type: float
lighttpd.net.requests_avg

The average number of requests per second since start.
request / second
Type: float
lighttpd.net.requests_avg_5sec

The average number of requests per second in the past 5 seconds.
request / second
Type: float
lighttpd.net.requests_total

The number of requests per second.
request / second
Type: float
lighttpd.performance.busy_servers

The number of active connections.
connection / None
Type: float
lighttpd.performance.idle_server

The number of idle connections.
connection / None
Type: float
lighttpd.performance.memory_usage

The amount of memory used by the server.
byte / None
Type: float
lighttpd.performance.uptime

The amount of time the server has been up and running.
second / None
Type: float
lighttpd.response.status_1xx

The number of 1xx status codes generated per second.
response / second
Type: float
lighttpd.response.status_2xx

The number of 2xx status codes generated per second.
response / second
Type: float
lighttpd.response.status_3xx

The number of 3xx status codes generated per second.
response / second
Type: float
lighttpd.response.status_4xx

The number of 4xx status codes generated per second.
response / second
Type: float
lighttpd.response.status_5xx

The number of 5xx status codes generated per second.
response / second
Type: float
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.