Skip to main content

phpDaemon collector

phpDaemon is an asynchronous server-side framework for Web and network applications implemented in PHP using libevent.

This module collects phpdaemon workers statistics via http.


  • phpdaemon with enabled http server.
  • statistics should be reported in json format.


All metrics have "phpdaemon." prefix.

workersglobalalive, shutdownworkers
alive_workersglobalidle, busy, reloadingworkers
idle_workersglobalpreinit, init, initializedworkers


It produces the following charts:

  • Workers in workers
  • Alive Workers State in workers
  • Idle Workers State in workers
  • Uptime in seconds


Edit the go.d/phpdaemon.conf configuration file using edit-config from the Netdata config directory, which is typically at /etc/netdata.

cd /etc/netdata # Replace this path with your Netdata config directory
sudo ./edit-config go.d/phpdaemon.conf

Here is an example for 2 instances:

- name: local

- name: remote

For all available options please see module configuration file.

phpdaemon configuration

Instruction from @METAJIJI

For enable phpd statistics on http, you must enable the http server and write an application.

Application is important, because standalone application ServerStatus.php provides statistics in html format and unusable for netdata.


path /opt/phpdaemon/conf/AppResolver.php;
Pool:HTTPServer {
listen '';
port 8509;



class MyAppResolver extends \PHPDaemon\Core\AppResolver {
public function getRequestRoute($req, $upstream) {
if (preg_match('~^/(ServerStatus|FullStatus)/~', $req->attrs->server['DOCUMENT_URI'], $m)) {
return $m[1];

return new MyAppResolver;


namespace PHPDaemon\Applications;

class FullStatus extends \PHPDaemon\Core\AppInstance {
public function beginRequest($req, $upstream) {
return new FullStatusRequest($this, $upstream, $req);


namespace PHPDaemon\Applications;

use PHPDaemon\Core\Daemon;
use PHPDaemon\HTTPRequest\Generic;

class FullStatusRequest extends Generic {
public function run() {
$stime = microtime(true);
$this->header('Content-Type: application/javascript; charset=utf-8');

$stat = Daemon::getStateOfWorkers();
$stat['uptime'] = time() - Daemon::$startTime;
echo json_encode($stat);


To troubleshoot issues with the phpdaemon collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

First, navigate to your plugins' directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the setting plugins directory. Once you're in the plugin's directory, switch to the netdata user.

cd /usr/libexec/netdata/plugins.d/
sudo -u netdata -s

You can now run the go.d.plugin to debug the collector:

./go.d.plugin -d -m phpdaemon

Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.