Introduction

The configuration data are in the subdir ./config/. Here are several JSON files.

  • All files named internal-*.json contain defaults and are shipped with the application. Every update will overwrite them.
  • config_servers.json - contains your server groups and servers
  • config_user.json - contain custom settings that overwrite all settings of "internal-config_default.json"

To protect the JSON files and that they are not readable in a browser there is a .htaccess file. If you disabled parsing .htaccess you should to add the DENY rules in your apache vhost config.

Custom Configuration

Introduction

All defaults are defined in the file ./config/internal-config_default.json.
To override any of the defaults you need to take the key and define it in the ./config/config_user.json
OR
use configuration -> settings to enter them.

Pimped Apache Status :: configuration
Program settings

Available settings

The table shows all available keys of the json default config file that you can override in the user config file.

key description defaults
auth Internal authentication to protect access to the Apache status data.
Set a username and the md5 hash of its password.
Value(s):
(A) Hash with 2 keys
"user": [Name of login user (string)],
"password": [md5 hash of your password(string)]
OR
(B) false to disable the login (and use a restriction in httpd config)
{
    "user": "admin",
    "password": false
}
autoreload Time to auto reload page. The array contains values in seconds that will be visible as a dropdown.
Value(s):
(Array) with integer values is seconds
[
    false,
    10,
    30,
    60,
    300
]
checkupdate How often to check for an update. The value is in [s].
Value(s):
(integer) value; The value 0 turns off the check. Default is 1 day.
86400
datatableOptions Javascript object for datatable. Do not override this.
Value(s):
(object); see docs on datatables.net
{
    "bPaginate": false,
    "bLengthChange": false,
    "bFilter": true,
    "bSort": true,
    "bAutoWidth": false,
    "bStateSave": true,
    "sPaginationType": "full_numbers",
    "oLanguage": "__LANG__"
}
defaultTemplate Do not override this.
Value(s):
(string)
"out_html.php"
defaultView Default view is Server info page.
Value(s):
(string)
false
debug Enable client debugging infos. Default is false.
Value(s):
(bool); set to true for developing or tuning
false
tmpdir Temp directory. This directory needs write permissions.
Value(s):
(string) Default is tmp (= [Appdir]/tmp]).
"tmp"
execTimeRequest An array to define values in [ms] for long requests: one for warning and one for critical long requests.
Value(s):
(integer)
{
    "warning": "1000",
    "critical": "5000"
}
hideCols Array of columns to hide. You can save some space not to display all colums. Warning: do not hide important rows!
Value(s):
(array) with names of columns.
[]
hideRows Array of rows to hide.
The first level is the name of the view.
It is one of requests_running|requests_mostrequested|requests_hostlist|requests_methods|requests_clients or * for all views

Below that key is a list of arrays with 4 values.
  • keyword: add|remove
  • column name (the same like in the visible table header columns)
  • operator: one of lt|le|eq|ne|ge|gt|regex
  • value: value to compare or regex
Value(s):
(array)
[]
icons Do not override this.
Value(s):
(array)
{
    "adminservers": "<i class=\"fa-solid fa-cubes\"><\/i> ",
    "adminsettings": "<i class=\"fa-solid fa-cogs\"><\/i> ",
    "adminupdate": "<i class=\"fa-solid fa-cloud-download-alt\"><\/i> ",
    "adminvendor": "<i class=\"fa-solid fa-puzzle-piece\"><\/i> ",
    "adminlang": "<i class=\"fa-solid fa-comment\"><\/i> ",
    "actionAdd": "<i class=\"fa-solid fa-plus\"><\/i> ",
    "actionDelete": "<i class=\"fa-solid fa-trash\"><\/i> ",
    "actionDownload": "<i class=\"fa-solid fa-cloud-download-alt\"><\/i> ",
    "actionEdit": "<i class=\"fa-solid fa-edit\"><\/i> ",
    "actionOK": "<i class=\"fa-solid fa-check\"><\/i> ",
    "actionReset": "<i class=\"fa-solid fa-times\"><\/i> ",
    "tab_config_user": "<i class=\"fa-solid fa-user\"><\/i> ",
    "tab_internal-config_default": "<i class=\"fa-solid fa-cog\"><\/i> ",
    "tab_Compare": "<i class=\"fa-solid fa-flag\"><\/i> ",
    "title": "<i class=\"fa-solid fa-square\"><\/i> ",
    "gotop": "<i class=\"fa-solid fa-arrow-up\"><\/i> ",
    "group": "<i class=\"fa-solid fa-cubes\"><\/i> ",
    "time": "<i class=\"fa-regular fa-clock\"><\/i> ",
    "refresh": "<i class=\"fa-solid fa-sync\"><\/i> ",
    "skin": "<i class=\"fa-solid fa-tint\"><\/i> ",
    "lang": "<i class=\"fa-solid fa-comment\"><\/i> ",
    "logout": "<i class=\"fa-solid fa-power-off\"><\/i> ",
    "export": "<i class=\"fa-solid fa-download\"><\/i> ",
    "serverinfos.php": "<i class=\"fa-solid fa-tasks\"><\/i>",
    "performance-check.php": "<i class=\"fa-solid fa-chart-line\"><\/i>",
    "allrequests.php": "<i class=\"fa-solid fa-bars\"><\/i>",
    "original.php": "<i class=\"fa-regular fa-file\"><\/i>",
    "utilization.php": "<i class=\"fa-solid fa-tachometer-alt\"><\/i>",
    "help.php": "<i class=\"fa-solid fa-question-circle\"><\/i>",
    "help-doc": "<i class=\"fa-solid fa-book\"><\/i>",
    "help-draganddrop": "<i class=\"fa-solid fa-arrows-alt\"><\/i>",
    "help-color": "<i class=\"fa-solid fa-tint\"><\/i>",
    "help-thanks": "<i class=\"fa-regular fa-comment\"><\/i>",
    "update.php": "<i class=\"fa-solid fa-rocket\"><\/i>",
    "server": "<i class=\"fa-regular fa-hdd\"><\/i>",
    "server_responsetime": "<i class=\"fa-regular fa-clock\"><\/i>",
    "requests_all": "<i class=\"fa-solid fa-exchange-alt\"><\/i>",
    "requests_running": "<i class=\"fa-solid fa-ticket-alt\"><\/i>",
    "requests_clients": "<i class=\"fa-solid fa-laptop\"><\/i>",
    "requests_mostrequested": "<i class=\"fa-regular fa-file\"><\/i>",
    "requests_longest": "<i class=\"fa-solid fa-hourglass-end\"><\/i>"
}
lang Currently active default language
Value(s):
(string); name of the language file in ./lang/ directory
"en"
selectLang Selectable languages
Value(s):
(Array) of strings for selectable languages in the language dropdown
[
    "en",
    "de"
]
selectSkin Selectable skins
Value(s):
(array) of strings with skins for the skin dropdown
[
    "skin-blue",
    "skin-black",
    "skin-red",
    "skin-yellow",
    "skin-purple",
    "skin-green",
    "skin-blue-light",
    "skin-black-light",
    "skin-red-light",
    "skin-yellow-light",
    "skin-purple-light",
    "skin-green-light"
]
showHint show box with hints for a section
Value(s):
(boolean); default is true
true
skin Currently active default skin.
Value(s):
(string)
"skin-purple"
skin-color2 CSS class of the tiles and title bars in a graph
Value(s):
(array) one of bg-aqua|bg-red|bg-green|bg-yellow
"bg-aqua"
tdbars Table rows that show a bar; The max value has a full bar and all other values have a relative width
Value(s):
(array) with strings of table rows
[
    "thCount"
]
tdlink special links for table rows.
Value(s):
(array) with table row as key and a value
[]
views list of the visible menu items
Value(s):
(array) with strings
[
    "serverinfos.php",
    "performance-check.php",
    "allrequests.php",
    "original.php",
    "utilization.php",
    "help.php"
]
viewsadmin list of the visible admin menu items
Value(s):
(array) with strings
[
    "servers",
    "settings",
    "vendor",
    "update"
]

Examples

All defaults are defined in the file ./config/config_user.json. The following examples show you, how to override a default by using the user config.
You can write the values into the json file or enter it in the web interface in Configuration -> Settings. The advantage of the webinterface is its check after saving: it checks the JSON syntax and tests the given keys.

enable / change password

{
    "auth": {
            "user": "admin",
            "password": [md5 hash]
    },
    (...)
}

disable password

{
    "auth": false,
    (...)
}

set values for auto reload the page

{
    "autoreload": [
        false,
        10,
        30,
        60,
        300
    ],
    (...)
}

Language

Select an existing language

The directory lang contains the language files. You can add the filename (without extension) in in your config_user.json the following variables:

{
    "selectLang": [
        "en",
        "de",
        "[your language]"
    ],
    (...)
}

to add your language at the end of the dropdown list of available languages
and then

{
    "lang": "[your language]",
    (...)
}

to use it as default language.


Make a translation

Each language consists of 2 files: 1 php file and 1 javascript file which are in the directory lang. Both must have the same name but different extensions.

  1. The php file conatains translated texts for my application. Make a copy of an existing php lang file. The target filename should be [2-letter-language-code].php
  2. The javascript file contains the translation for the jQuery plugin "datatables".
    Several translations you can find here. https://www.datatables.net/plug-ins/i18n/
    Create a [2-letter-language-code].js
  3. Enable your new language in the user configuration config/config_user.json to see it in your browser (see above).
  4. Hint:
    You can see internal variables with the view "dump.php". You can open it with the url parameter view=dump.php, i.e.
    http://localhost/apachestatus/?&view=dump.php
    Go to the tab $aLang to see an comparison of all translations. You see here all languages of the 'selectLang' value.

Remember to use html entities for special chars!


Enable skin

The skins are part of AdminLTE.
Have a look to the valid values of "selectSkin" - you can set another default skin with one of these values:

{
    "skin": "[your language]",
    (...)
}

example

{
    "skin": "skin-yellow",
    (...)
}






Copyright © 2011-2024 Axel Hahn
project page: GitHub (en)
Axels Webseite (de)

Wanna make me happy??
Send a tip on Tipeee

or use Paypal:
results will be here