Starting with VoipNow 4.0, you can access web server performance statistics. There are two sets of performance indicators:

Simply put, this is how the web server and PHP work:

Step-by-step guide

Enabling access from your IP address

By default, the web server statistics are only accessible from the VoipNow server itself (the only IP allowed is 127.0.0.1).

To change this, follow these steps:

  1. Edit the file /usr/local/voipnow/admin/conf/voipnow-status.conf which looks like this.

    # This file contains directives for monitoring.
    # You have to replace with your IP. Do not open this to the world!
    location ^~ /status-fpm {
        if ($my_https = "off") {
            return 301 https://$host$request_uri;
        }
        access_log off;
        allow 127.0.0.1;
        #allow #REPLACE.YOUR.IP;
        deny all;
        fastcgi_param SCRIPT_FILENAME /status-fpm;
        fastcgi_param SCRIPT_NAME /status-fpm;
        include /usr/local/voipnow/admin/conf/fastcgi-web*.conf;
    }
    location ^~ /status-fpm-worker {
        if ($my_https = "off") {
            return 301 https://$host$request_uri;
        }
        access_log off;
        allow 127.0.0.1;
        #allow #REPLACE.YOUR.IP;
        deny all;
        fastcgi_param SCRIPT_FILENAME /status-fpm-worker;
        fastcgi_param SCRIPT_NAME /status-fpm-worker;
        include /usr/local/voipnow/admin/conf/fastcgi-web*.conf;
    }
    location ^~ /status-httpsa {
        if ($my_https = "off") {
            return 301 https://$host$request_uri;
        }
        vhost_traffic_status_display;
        vhost_traffic_status_display_format html;
        access_log off;
        allow 127.0.0.1;
        #allow #REPLACE.YOUR.IP;
        deny all;
    }


  2. Remove the # character at the beginning of the two #allow lines and replace the #REPLACE.YOUR.IP block with your own IP address. For example, if your IP address is 10.10.10.25, the file needs to look like this:

    # This file contains directives for monitoring.
    # You have to replace with your IP. Do not open this to the world!
    location ^~ /status-fpm {
        if ($my_https = "off") {
            return 301 https://$host$request_uri;
        }
        access_log off;
        allow 127.0.0.1;
        allow 10.10.10.25;
        deny all;
        fastcgi_param SCRIPT_FILENAME /status-fpm;
        fastcgi_param SCRIPT_NAME /status-fpm;
        include /usr/local/voipnow/admin/conf/fastcgi-web*.conf;
    }
    location ^~ /status-fpm-worker {
        if ($my_https = "off") {
            return 301 https://$host$request_uri;
        }
        access_log off;
        allow 127.0.0.1;
        allow 10.10.10.25;
        deny all;
        fastcgi_param SCRIPT_FILENAME /status-fpm-worker;
        fastcgi_param SCRIPT_NAME /status-fpm-worker;
        include /usr/local/voipnow/admin/conf/fastcgi-web*.conf;
    }
    location ^~ /status-httpsa {
        if ($my_https = "off") {
            return 301 https://$host$request_uri;
        }
        vhost_traffic_status_display;
        vhost_traffic_status_display_format html;
        access_log off;
        allow 127.0.0.1;
        allow 10.10.10.25;
        deny all;
    }


  3. Save the file and restart the VoipNow web interface:

    # /etc/init.d/voipnow restart
    Stopping VoipNow Web Management Interface:                 [  OK  ]
    Starting VoipNow Web Management Interface:                 [  OK  ]


Access web server statistics

The web server statistics can now be accessed at the following web address: https://VOIPNOW_IP/status-httpsa (replace VOIPNOW_IP with your VoipNow server IP address).

On this page you will find generic performance indicators for the Nginx web server:

 

Access PHP statistics

The PHP statistics page can be accessed at https://VOIPNOW_IP/status-fpm (replace VOIPNOW_IP with your VoipNow server IP address). The output displayed will be similar to this:

pool:                 voipnow
process manager:      dynamic
start time:           11/Dec/2015:10:07:17 +0000
start since:          54
accepted conn:        3
listen queue:         0
max listen queue:     0
listen queue len:     0
idle processes:       4
active processes:     1
total processes:      5
max active processes: 1
max children reached: 0
slow requests:        0
stats[1449828437]:["10":"1", "20":"0", "30":"0", "40":"1", "50":"0", "60":"0", "70":"0", "80":"0", "90":"0", "100":"0", "over":"0"]

While most of the values are self-explanatory, you should know that the stats array indicates the percentile distribution compared to the request_slowlog_timeout parameter, which has a default value of 1 second. For example:

Possible reasons for concern

Nginx

The following indicators should be monitored:

PHP

The following should be monitored:

Related articles