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.



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"
}
hideRows Array of rows to hide. You can save some space not to display all colums. Warning: do not hide important rows!
Value(s):
(array) with names of rows.
[]
icons Do not override this.
Value(s):
(array)
{
    "adminservers": "<i class=\"fa fa-cubes\"><\/i> ",
    "adminsettings": "<i class=\"fa fa-cogs\"><\/i> ",
    "adminupdate": "<i class=\"fa fa-flash\"><\/i> ",
    "adminvendor": "<i class=\"fa fa-puzzle-piece\"><\/i> ",
    "adminlang": "<i class=\"fa fa-comment\"><\/i> ",
    "actionAdd": "<i class=\"fa fa-plus\"><\/i> ",
    "actionDelete": "<i class=\"fa fa-close\"><\/i> ",
    "actionDownload": "<i class=\"fa fa-cloud-download\"><\/i> ",
    "actionEdit": "<i class=\"fa fa-pencil\"><\/i> ",
    "actionOK": "<i class=\"fa fa-check\"><\/i> ",
    "actionReset": "<i class=\"fa fa-close\"><\/i> ",
    "tab_config_user": "<i class=\"fa fa-user\"><\/i> ",
    "tab_internal-config_default": "<i class=\"fa fa-cog\"><\/i> ",
    "tab_Compare": "<i class=\"fa fa-flag\"><\/i> ",
    "title": "<i class=\"fa fa-square\"><\/i> ",
    "gotop": "<i class=\"fa fa-arrow-up\"><\/i> ",
    "group": "<i class=\"fa fa-folder-o\"><\/i> ",
    "time": "<i class=\"fa fa-clock-o\"><\/i> ",
    "refresh": "<i class=\"fa fa-refresh\"><\/i> ",
    "skin": "<i class=\"fa fa-tint\"><\/i> ",
    "lang": "<i class=\"fa fa-comment\"><\/i> ",
    "export": "<i class=\"fa fa-download\"><\/i> ",
    "serverinfos.php": "<i class=\"fa fa-tasks\"><\/i>",
    "performance-check.php": "<i class=\"fa fa-line-chart\"><\/i>",
    "allrequests.php": "<i class=\"fa fa-navicon\"><\/i>",
    "original.php": "<i class=\"fa fa-file-text-o\"><\/i>",
    "utilization.php": "<i class=\"fa fa-dashboard\"><\/i>",
    "help.php": "<i class=\"fa fa-question-circle\"><\/i>",
    "help-doc": "<i class=\"fa fa-book\"><\/i>",
    "help-color": "<i class=\"fa fa-tint\"><\/i>",
    "help-thanks": "<i class=\"fa fa-comment-o\"><\/i>",
    "update.php": "<i class=\"fa fa-rocket\"><\/i>",
    "server": "<i class=\"fa fa-hdd-o\"><\/i>",
    "server_responsetime": "<i class=\"fa fa-clock-o\"><\/i>",
    "requests_all": "<i class=\"fa fa-ticket\"><\/i>",
    "requests_running": "<i class=\"fa fa-ticket\"><\/i>",
    "requests_clients": "<i class=\"fa fa-laptop\"><\/i>",
    "requests_mostrequested": "<i class=\"fa fa-file-o\"><\/i>",
    "requests_longest": "<i class=\"fa 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"
]
selfurl set a custom base url (required if you use an alias in apache httpd config)
Value(s):
(string) name of your alias starting with a slash and no trailung slash i.e. /apachestatus; default is false (=auto detection of the relative url below webroot)
false
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. http://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-2018 Axel Hahn
project page: GitHub (en)
Axels Webseite (de)
Share on Facebook | Google +
results will be here