diff -Nru goaccess-1.3.0+git2942-7465bbb/debian/changelog goaccess-1.3.0+git2952-f62848c/debian/changelog --- goaccess-1.3.0+git2942-7465bbb/debian/changelog 2019-12-01 19:38:14.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/debian/changelog 2020-02-09 17:42:30.000000000 +0000 @@ -1,8 +1,29 @@ -goaccess (1:1.3.0+git2942-7465bbb-1ppa1~trusty1) trusty; urgency=medium +goaccess (1:1.3.0+git2952-f62848c-1ppa1~trusty1) trusty; urgency=medium * Automated backport upload; no source changes. - -- Alexander Pozdnyakov Sun, 01 Dec 2019 22:38:14 +0300 + -- Alexander Pozdnyakov Sun, 09 Feb 2020 20:42:30 +0300 + +goaccess (1:1.3.0+git2952-f62848c-1) unstable; urgency=medium + + * Compile + * URL: https://github.com/allinurl/goaccess.git + * Branch: master + * Commit: f62848c17a80443cf8dbed9d9c5604120ea11146 + * Date: 1580577024 + * git changelog: + * f62848c - Ensure proper escaping on default AWSELB log format. + * b1547e5 - Updated default AWSELB log format. + * cc49495 - Update README.md + * 9e42d22 - Add missing gettext build requirement + * 658a6bf - Reverted back how the percentage is calculated to be more + intuitive. + * 20bb8ad - Added a better description to requests section under the + man page. + * a0f019c - Create FUNDING.yml + * 9dbd3a9 - Add git package + + -- Alexander Pozdnyakov Thu, 06 Feb 2020 00:05:34 +0300 goaccess (1:1.3.0+git2942-7465bbb-1) unstable; urgency=medium diff -Nru goaccess-1.3.0+git2942-7465bbb/Dockerfile goaccess-1.3.0+git2952-f62848c/Dockerfile --- goaccess-1.3.0+git2942-7465bbb/Dockerfile 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/Dockerfile 2020-02-05 21:05:33.000000000 +0000 @@ -22,6 +22,7 @@ clang-static \ gettext-dev \ gettext-static \ + git \ libmaxminddb-dev \ libressl-dev \ linux-headers \ diff -Nru goaccess-1.3.0+git2942-7465bbb/.github/FUNDING.yml goaccess-1.3.0+git2952-f62848c/.github/FUNDING.yml --- goaccess-1.3.0+git2942-7465bbb/.github/FUNDING.yml 1970-01-01 00:00:00.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/.github/FUNDING.yml 2020-02-05 21:05:33.000000000 +0000 @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: allinurl +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff -Nru goaccess-1.3.0+git2942-7465bbb/goaccess.1 goaccess-1.3.0+git2952-f62848c/goaccess.1 --- goaccess-1.3.0+git2942-7465bbb/goaccess.1 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/goaccess.1 2020-02-05 21:05:33.000000000 +0000 @@ -34,9 +34,9 @@ which will display dates such as 05/Jun/2016:16. This is great if you want to track your daily traffic at the hour level. .IP "Requested files" -This panel displays the most requested files on your web server. It shows hits, -unique visitors, and percentage, along with the cumulative bandwidth, protocol, -and the request method used. +This panel displays the most requested (non-static) files on your web server. +It shows hits, unique visitors, and percentage, along with the cumulative +bandwidth, protocol, and the request method used. .IP "Requested static files" Lists the most frequently static files such as: JPG, CSS, SWF, JS, GIF, and PNG file types, along with the same metrics as the last panel. Additional static diff -Nru goaccess-1.3.0+git2942-7465bbb/README.md goaccess-1.3.0+git2952-f62848c/README.md --- goaccess-1.3.0+git2942-7465bbb/README.md 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/README.md 2020-02-05 21:05:33.000000000 +0000 @@ -187,13 +187,13 @@ However, below is a table of some optional dependencies in some distros to build GoAccess from source. -Distro | NCurses | GeoIP (opt) | Tokyo Cabinet (opt) | OpenSSL (opt) ----------------------- | -----------------|------------------| -------------------------| ------------------- -**Ubuntu/Debian** | libncursesw5-dev | libgeoip-dev | libtokyocabinet-dev | libssl-dev -**Fedora/RHEL/CentOS** | ncurses-devel | geoip-devel | tokyocabinet-devel | openssl-devel -**Arch Linux** | ncurses | geoip | [compile from source](https://goaccess.io/faq#installation) | openssl -**Gentoo** | sys-libs/ncurses | dev-libs/geoip | dev-db/tokyocabinet | dev-libs/openssl -**Slackware** | ncurses | GeoIP | tokyocabinet | openssl +Distro | NCurses | GeoIP (opt) | Tokyo Cabinet (opt) | OpenSSL (opt) | gettext +---------------------- | -----------------|------------------| -------------------------| -------------------| ------------------- +**Ubuntu/Debian** | libncursesw5-dev | libgeoip-dev | libtokyocabinet-dev | libssl-dev | gettext +**RHEL/CentOS** | ncurses-devel | geoip-devel | tokyocabinet-devel | openssl-devel | gettext-devel +**Arch Linux** | ncurses | geoip | [compile from source](https://goaccess.io/faq#installation) | openssl | gettext +**Gentoo** | sys-libs/ncurses | dev-libs/geoip | dev-db/tokyocabinet | dev-libs/openssl | +**Slackware** | ncurses | GeoIP | tokyocabinet | openssl | #### Docker #### diff -Nru goaccess-1.3.0+git2942-7465bbb/src/csv.c goaccess-1.3.0+git2952-f62848c/src/csv.c --- goaccess-1.3.0+git2942-7465bbb/src/csv.c 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/src/csv.c 2020-02-05 21:05:33.000000000 +0000 @@ -314,13 +314,14 @@ if (!conf.no_csv_summary) print_csv_summary (fp, glog); + set_module_totals (glog, &totals); + FOREACH_MODULE (idx, module_list) { module = module_list[idx]; if (!(panel = panel_lookup (module))) continue; - set_module_totals (module, &totals); panel->render (fp, holder + module, totals); } diff -Nru goaccess-1.3.0+git2942-7465bbb/src/gdashboard.c goaccess-1.3.0+git2952-f62848c/src/gdashboard.c --- goaccess-1.3.0+git2942-7465bbb/src/gdashboard.c 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/src/gdashboard.c 2020-02-05 21:05:33.000000000 +0000 @@ -282,6 +282,19 @@ return char_repeat (len, '|'); } +/* Get largest hits metric. + * + * On error, 0 is returned. + * On success, largest hits metric is returned. */ +static void +set_max_metrics (GDashMeta * meta, GDashData * idata) +{ + if (meta->max_hits < idata->metrics->hits) + meta->max_hits = idata->metrics->hits; + if (meta->max_visitors < idata->metrics->visitors) + meta->max_visitors = idata->metrics->visitors; +} + /* Set largest hits metric (length of the integer). */ static void set_max_hit_len (GDashMeta * meta, GDashData * idata) @@ -486,15 +499,6 @@ } static void -set_max_values (GDashMeta * meta, GMetrics * metrics) -{ - if (metrics->hits > meta->max_hits) - meta->max_hits = metrics->hits; - if (metrics->visitors > meta->max_visitors) - meta->max_visitors = metrics->visitors; -} - -static void set_metrics_len (GDashMeta * meta, GDashData * idata) { /* integer-based length */ @@ -1187,6 +1191,7 @@ } /* used module */ dash->module[module].module = module; + //dash->module[module].meta.max_hits = get_max_hit (dash->module[module].data, n); render_content (win, &dash->module[module], &y, &offset, &total, gscroll); } @@ -1404,7 +1409,7 @@ static void set_dash_metrics (GDash ** dash, GMetrics * metrics, GModule module, - int is_subitem) + GPercTotals totals, int is_subitem) { GDashData *idata = NULL; GDashMeta *meta = NULL; @@ -1423,14 +1428,11 @@ data = is_subitem ? render_child_node (metrics->data) : metrics->data; - /* set maximum values so far for hits/visitors */ - set_max_values (meta, metrics); - idata->metrics->hits = metrics->hits; - idata->metrics->hits_perc = get_percentage (meta->max_hits, metrics->hits); + idata->metrics->hits_perc = get_percentage (totals.hits, metrics->hits); idata->metrics->visitors = metrics->visitors; idata->metrics->visitors_perc = - get_percentage (meta->max_visitors, metrics->visitors); + get_percentage (totals.visitors, metrics->visitors); idata->metrics->bw.sbw = filesize_str (metrics->bw.nbw); idata->metrics->data = xstrdup (data); @@ -1451,6 +1453,7 @@ free (data); set_metrics_len (meta, idata); + set_max_metrics (meta, idata); (*idx)++; } @@ -1460,7 +1463,8 @@ * If no items on the sub list, the function returns. * On success, sub list data is set into the dashboard structure. */ static void -add_sub_item_to_dash (GDash ** dash, GHolderItem item, GModule module, int *i) +add_sub_item_to_dash (GDash ** dash, GHolderItem item, GModule module, + GPercTotals totals, int *i) { GSubList *sub_list = item.sub_list; GSubItem *iter; @@ -1469,7 +1473,7 @@ return; for (iter = sub_list->head; iter; iter = iter->next, (*i)++) { - set_dash_metrics (dash, iter->metrics, module, 1); + set_dash_metrics (dash, iter->metrics, module, totals, 1); } } @@ -1477,17 +1481,20 @@ * * On success, data is set into the dashboard structure. */ static void -add_item_to_dash (GDash ** dash, GHolderItem item, GModule module) +add_item_to_dash (GDash ** dash, GHolderItem item, GModule module, + GPercTotals totals) { - set_dash_metrics (dash, item.metrics, module, 0); + set_dash_metrics (dash, item.metrics, module, totals, 0); } /* Load holder's data into the dashboard structure. */ void -load_data_to_dash (GHolder * h, GDash * dash, GModule module, GScroll * gscroll) +load_data_to_dash (GLog * glog, GHolder * h, GDash * dash, GModule module, + GScroll * gscroll) { int alloc_size = 0; int i, j; + GPercTotals totals; alloc_size = dash->module[module].alloc_data; if (gscroll->expanded && module == gscroll->current) @@ -1498,13 +1505,15 @@ dash->module[module].holder_size = h->holder_size; memset (&dash->module[module].meta, 0, sizeof (GDashData)); + set_module_totals (glog, &totals); + for (i = 0, j = 0; i < alloc_size; i++) { if (h->items[j].metrics->data == NULL) continue; - add_item_to_dash (&dash, h->items[j], module); + add_item_to_dash (&dash, h->items[j], module, totals); if (gscroll->expanded && module == gscroll->current && h->sub_items_size) - add_sub_item_to_dash (&dash, h->items[j], module, &i); + add_sub_item_to_dash (&dash, h->items[j], module, totals, &i); j++; } } diff -Nru goaccess-1.3.0+git2942-7465bbb/src/gdashboard.h goaccess-1.3.0+git2952-f62848c/src/gdashboard.h --- goaccess-1.3.0+git2942-7465bbb/src/gdashboard.h 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/src/gdashboard.h 2020-02-05 21:05:33.000000000 +0000 @@ -133,7 +133,7 @@ uint32_t get_ht_size_by_module (GModule module); void display_content (WINDOW * win, GDash * dash, GScroll * scroll); void free_dashboard (GDash * dash); -void load_data_to_dash (GHolder * h, GDash * dash, GModule module, GScroll * scroll); +void load_data_to_dash (GLog *glog, GHolder * h, GDash * dash, GModule module, GScroll * scroll); void reset_find (void); void reset_scroll_offsets (GScroll * scroll); diff -Nru goaccess-1.3.0+git2942-7465bbb/src/goaccess.c goaccess-1.3.0+git2952-f62848c/src/goaccess.c --- goaccess-1.3.0+git2942-7465bbb/src/goaccess.c 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/src/goaccess.c 2020-02-05 21:05:33.000000000 +0000 @@ -345,7 +345,7 @@ dash->total_alloc += dash->module[module].dash_size; pthread_mutex_lock (&gdns_thread.mutex); - load_data_to_dash (&holder[module], dash, module, &gscroll); + load_data_to_dash (glog, &holder[module], dash, module, &gscroll); pthread_mutex_unlock (&gdns_thread.mutex); } diff -Nru goaccess-1.3.0+git2942-7465bbb/src/gstorage.c goaccess-1.3.0+git2952-f62848c/src/gstorage.c --- goaccess-1.3.0+git2942-7465bbb/src/gstorage.c 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/src/gstorage.c 2020-02-05 21:05:33.000000000 +0000 @@ -83,11 +83,11 @@ /* Set the module totals to calculate percentages. */ void -set_module_totals (GModule module, GPercTotals * totals) +set_module_totals (GLog * glog, GPercTotals * totals) { - totals->bw = ht_get_meta_data (module, "bytes"); - totals->hits = ht_get_meta_data (module, "hits"); - totals->visitors = ht_get_meta_data (module, "visitors"); + totals->bw = glog->resp_size; + totals->hits = glog->valid; + totals->visitors = ht_get_size_uniqmap (VISITORS); } /* Set numeric metrics for each request given raw data. diff -Nru goaccess-1.3.0+git2942-7465bbb/src/gstorage.h goaccess-1.3.0+git2952-f62848c/src/gstorage.h --- goaccess-1.3.0+git2942-7465bbb/src/gstorage.h 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/src/gstorage.h 2020-02-05 21:05:33.000000000 +0000 @@ -31,6 +31,7 @@ #define GSTORAGE_H_INCLUDED #include "commons.h" +#include "parser.h" /* Total number of storage metrics (GSMetric) */ #define GSMTRC_TOTAL 14 @@ -61,8 +62,8 @@ void *get_storage_metric_by_module (GModule module, GSMetric metric); void *get_storage_metric (GModule module, GSMetric metric); +void set_module_totals (GLog * glog, GPercTotals * totals); void set_data_metrics (GMetrics * ometrics, GMetrics ** nmetrics, GPercTotals totals); -void set_module_totals (GModule module, GPercTotals * totals); #endif // for #ifndef GSTORAGE_H diff -Nru goaccess-1.3.0+git2942-7465bbb/src/json.c goaccess-1.3.0+git2952-f62848c/src/json.c --- goaccess-1.3.0+git2942-7465bbb/src/json.c 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/src/json.c 2020-02-05 21:05:33.000000000 +0000 @@ -1186,13 +1186,14 @@ popen_obj (json, 0); print_json_summary (json, glog, holder); + set_module_totals (glog, &totals); + FOREACH_MODULE (idx, module_list) { module = module_list[idx]; if (!(panel = panel_lookup (module))) continue; - set_module_totals (module, &totals); panel->render (json, holder + module, totals, panel); pjson (json, (cnt++ != npanels - 1) ? ",%.*s" : "%.*s", nlines, NL); } diff -Nru goaccess-1.3.0+git2942-7465bbb/src/settings.c goaccess-1.3.0+git2952-f62848c/src/settings.c --- goaccess-1.3.0+git2942-7465bbb/src/settings.c 2019-12-01 09:40:34.000000000 +0000 +++ goaccess-1.3.0+git2952-f62848c/src/settings.c 2020-02-05 21:05:33.000000000 +0000 @@ -69,7 +69,7 @@ "%d %t %^ %m %U %q %^ %^ %h %u %R %s %^ %^ %L", /* W3C */ "%d\\t%t\\t%^\\t%b\\t%h\\t%m\\t%^\\t%r\\t%s\\t%R\\t%u\\t%^", /* CloudFront */ "\"%x\",\"%h\",%^,%^,\"%m\",\"%U\",\"%s\",%^,\"%b\",\"%D\",%^,\"%R\",\"%u\"", /* Cloud Storage */ - "%dT%t.%^ %^ %h:%^ %^ %T %^ %^ %^ %s %^ %b \"%r\" \"%u\"", /* AWS Elastic Load Balancing */ + "%^ %dT%t.%^ %v %h:%^ %^ %T %^ %^ %s %^ %b %^ \"%r\" \"%u\" %^", /* AWS Elastic Load Balancing */ "%^ %^ %^ %v %^: %x.%^ %~%L %h %^/%s %b %m %U", /* Squid Native */ "%^ %v [%d:%t %^] %h %^\"%r\" %s %^ %b %^ %L %^ \"%R\" \"%u\"", /* Amazon S3 */ };