Single report for reverse proxy proxying multiple backend applications

Avatar
  • updated
  • Answered
Hi,

We run an Apache reverse proxy which proxies several backend applications.

For each backend application, a set of proxy rules (all the url paths which belong to the application) is defined.

Our first approach was to define a profile with a filter containing the relevant url paths for every single application. However, this approach soon becomes messy with more than 20 applications.

Therefore we would now like to have one single overview report which contains the set of figures for each different backend application to be able to quickly compare which application generates how much load on the proxy.

What would be the best approach to fulfil this requirement?

Thanks and br,
Elmar
Avatar
Michael
As I understand, each application has a list of file names shown in the Access Statistics report, and you need to get report on activity for each list/application.

In such case you can create a custom table in Options > Report > Tables. Choose “File name” as main data on the second page when you create the table. Click the “Custom...” button to the right of the “Main data” field. Enable the “Use modification rules” option and enter rules for your file names, for example:

/dir/* $= Application 1
/dir2/file.txt $= Application 1
/dir2/* $= Application 2
/file2.html $= Application 2

You can find information on using the modification rules at http://www.weblogexpert.com/help/wlex...

You also need to enable the "Show file names instead of URLs" option in the same window so names like "Application 1" without the domain will be shown in the table.
Avatar
elster
Wow, that's cool, thanks a lot!
Avatar
elster
Hi,

Now I have an even more specialized use case. I have to different applications sharing the same url path, but accessible via different request params:

/dir?param=1 $= Application 1
/dir?param=2 $= Application 2

However, this approach does not work. Obviously, modification rules only consider the url path, not the query string. Or have I misconfigured sth?

If not, how else can I model this use case by appropriate modification rules?

Thanks and br,
Elmar
Avatar
Michael
You can choose "File name with query" instead of "File name" as main data in the table properties to match file name including query.
Avatar
elster
Ok, this seems to be the right approach. However, I still do not see the related traffic in my report file. It might have to do sth with the ? which is a reserved char in your RegEx syntax afaik. Do I maybe have to escape the ??

Thanks again,
Elmar
Avatar
Michael
The rules you use are wildcard rules as they contain $=. Such rules use just two special characters * (any number of any characters) and ? (any single character). So the only problem in your case is that the wildcard like /dir?param=1 will match both "/dir?param=1" and values like "/dirwparam=1" (with other characters instead of ?). However, such problem is unlikely and it's not the problem in this case as the report doesn't show any files that match the wildcard.

BTW you can also use the regular expression rules for more control, you can find more information on it at http://www.weblogexpert.com/help/wlex...

The problem in your case probably appears because file names with queries in your logs don't look like /dir?param=1 . To check it, you can disable the modification rules in your custom table so the program will simply show file names with queries. E.g. maybe the file names include other parameters, so it's necessary to use other rules.

You can also send to us at support@weblogexpert.com a sample log from your site as well as the rules you use (or even better the program settings saved using the File > Backup command), so we'll check what causes the issue.