How-tos, tips and tricks

I initiated this page to show a view tricks that can be done with the Pimped Apache Server status.
I hope you explore some useful hints here :-)


Backup my data

Q: I want to save my own settings. What do I need to backup?

A: The footprint of the tool is quite small ... just the whole application directory.
But to answer the question: the real custom data are:

  • [appdir]/config/config_servers.json
  • [appdir]/config/config_user.json
  • [appdir]/vendor/* (optional: contains locally downloaded vendor libs)

Remove unwanted columns

Q: I want to remove a few unneeded columns. Because I don't need them and get a bit more space.

A: Use the hideCols value in the config. As array elements add the column names like written in the table header.

Pimped Apache Status :: remove columns
Remove unwanted columns

Config snippet:

{
    "hideCols": [
        "Srv",
        "Acc",
        "SS",
        "Req",
        "Conn",
        "Child",
        "Slot"
    ]
}

Remove rows in a view

Q: I want to remove lines. I wanna hide the /server-status requests of the monitoring tool.

A: In the settings you need to set a value for hideRows.
To do so go to the "Settings" in the configuration area.

Remove all requests coming from a given IP address

You can define an exclude rule for the column "Client" that exactly matches ("eq" is equal) a given ip address (here: "192.168.100.107")

Config snippet:

{
    "hideRows": {
        "*": [
            [
                "remove",
                "Client",
                "eq",
                "192.168.100.107"
            ]
        ]
    }
}	

Remove GET server-status in the view of active requests

You can define an exclude rule for the column "Request" that matches the "regex" for a GET request to /server-status.
The character # is part of the regex. Additionally you need to quote special chars.

Config snippet:

{
    "hideRows": {
        "requests_running": [
            [
                "remove",
                "Request",
                "regex",
                "#GET\\ \/server-status#"
            ]
        ]
    }
}	

Find location of an ip address

Q: I want find where an ip address is located that makes (a lot or strange) requests to my server.

A: By default each click to a value will put it into filter field of the table. You can change the link target. Use the tdlink value in the config. The first key is the column name. As subkeys add the html attributes of a link tag (<a [attributes]>..</a>). The string %s will be replaced by the original value.

The ip address is in the column "Client".
To override the link target set href attribute. Here we put a url that must handle %s as ip address.
Just to beautify the link I add a title and let open the link in a new tab.

The result is:

Pimped Apache Status :: tdlink config
Changed tdlink settings in action

Config snippet:

{
    "tdlink": {
        "Client": {
            "href": "https:\/\/whatismyipaddress.com\/ip\/%s",
            "target": "_blank",
            "title": "show at whatismyipaddress.com"
        }
    }
}

Bookmarklet: beautify ANY server status page

You can beautify any server-status page without configuring it. It requires that it is reachable by your monitoring server, i.e. it is public in the internet (what is a bad idea) or in you LAN.

Just once: Prepare a bookmark:
Go to the help page and create a bookmark by drag and drop the bookmarklet.

Pimped Apache Status :: create a bookmark with drag and drop
Step 1: create a bookmark with drag and drop

As often you want:
If you see a /server-status page in default mode in your webbrowser then click on the bookmarklet to let the magic happen.

Pimped Apache Status :: activate
Step 2: Beautify any server-status page







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