Skip to content

Commit

Permalink
Merge pull request #2591 from Sea-n/master
Browse files Browse the repository at this point in the history
Depreacte --output-format, only allow --output option
  • Loading branch information
allinurl authored Dec 13, 2023
2 parents 5138abb + 96e64c5 commit 52bd094
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

* This image supports building on the ARM architecture (e.g. Raspberry Pi)

* Do you want to change the timezone? Use the `-e` option to pass the time-zone setting to Docker. (e.g. `-e TZ="America/New_York"`)
* Do you want to change the timezone? Use the `-e` option to pass the time-zone setting to Docker. (e.g. `-e TZ="America/New_York"`)

* The container is built with geo-location support (see [the manual](https://goaccess.io/man#options)). To enable the respective panel, mount the geolocation database using `-v /path/to/GeoLite2-City.mmdb:/GeoLite2-City.mmdb` and specify `--geoip-database /GeoLite2-City.mmdb` when running GoAccess.

* If you made changes to the config file after building the image, you don't have to rebuild from scratch. Simply restart the container:

```
docker restart goaccess
```
```

* If you had already run the container, you may have to stop and remove it first:

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ build GoAccess from source.

A Docker image has been updated, capable of directing output from an access log. If you only want to output a report, you can pipe a log from the external environment to a Docker-based process:

cat access.log | docker run --rm -i -e LANG=$LANG allinurl/goaccess -a -o html --log-format COMBINED - > report.html
cat access.log | docker run --rm -i -e LANG=$LANG allinurl/goaccess -a -o report.html --log-format COMBINED -

OR real-time

tail -F access.log | docker run -p 7890:7890 --rm -i -e LANG=$LANG allinurl/goaccess -a -o html --log-format COMBINED --real-time-html - > report.html
tail -F access.log | docker run -p 7890:7890 --rm -i -e LANG=$LANG allinurl/goaccess -a -o report.html --log-format COMBINED --real-time-html -

You can read more about using the docker image in [DOCKER.md](https://github.com/allinurl/goaccess/blob/master/DOCKER.md).

Expand Down Expand Up @@ -264,14 +264,14 @@ To output to a terminal and generate an interactive report:
To generate an HTML report:

# goaccess access.log -a > report.html

To generate a JSON report:

# goaccess access.log -a -d -o json > report.json

To generate a CSV file:
To generate a JSON report file:

# goaccess access.log --no-csv-summary -o csv > report.csv
# goaccess access.log -a -d -o report.json

To generate a CSV report to stdout:

# goaccess access.log --no-csv-summary -o csv

GoAccess also allows great flexibility for real-time filtering and parsing. For
instance, to quickly diagnose issues by monitoring logs since goaccess was
Expand Down Expand Up @@ -381,7 +381,7 @@ And you would like to append the virtual host to the request in order to see
which virtual host the top urls belong to:

awk '$8=$1$8' access.log | goaccess -a -

To do the same, but also use real-time filtering and parsing:

tail -f access.log | unbuffer -p awk '$8=$1$8' | goaccess -a -
Expand Down Expand Up @@ -429,7 +429,7 @@ your local machine!
# ssh -n root@server 'tail -f /var/log/apache2/access.log' | goaccess -

**Note:** SSH requires `-n` so GoAccess can read from stdin. Also, make sure to
use SSH keys for authentication as it won't work if a passphrase is required.
use SSH keys for authentication as it won't work if a passphrase is required.

#### Troubleshooting ####

Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Security Policy

Found a security issue in [GoAccess](https://github.com/allinurl/goaccess)?
Read on.
Read on.

## Reporting a Vulnerability

Expand All @@ -10,7 +10,7 @@ security of `goaccess`. I appreciate your efforts and responsible disclosure
and will make every effort to acknowledge your contributions.

Vulnerabilities should be reported to [[email protected]](mailto:[email protected]) which is a private,
maintainer-only email address.
maintainer-only email address.


When I receive a security bug report, I will work on the fix and prepare a
Expand All @@ -34,4 +34,4 @@ possible):

> Note: Please do not open public issues for security issues, as GitHub does
> not provide facility for private issues, and deleting the issue makes it hard
> to triage/respond back to the reporter.
> to triage/respond back to the reporter.
4 changes: 2 additions & 2 deletions goaccess.1
Original file line number Diff line number Diff line change
Expand Up @@ -1296,8 +1296,8 @@ requests with the same IP, date, and user agent are considered a unique visit.
.P

If you want to enable dual-stack support, please use
.I --addr=::
instead of the default
.I --addr=::
instead of the default
.I --addr=0.0.0.0.
.P
The generated report will attempt to reconnect to the WebSocket server after 1
Expand Down
2 changes: 1 addition & 1 deletion po/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ top_builddir = ..
AM_CPPFLAGS = -I. -I$(srcdir)

# These options get passed to xgettext.
XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_
XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_

# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
Expand Down
11 changes: 6 additions & 5 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct option long_opts[] = {
{"log-size" , required_argument , 0 , 'S' } ,
{"no-query-string" , no_argument , 0 , 'q' } ,
{"no-term-resolver" , no_argument , 0 , 'r' } ,
{"output-format" , required_argument , 0 , 'o' } ,
{"output" , required_argument , 0 , 'o' } ,
{"storage" , no_argument , 0 , 's' } ,
{"version" , no_argument , 0 , 'V' } ,
{"with-mouse" , no_argument , 0 , 'm' } ,
Expand Down Expand Up @@ -132,7 +132,7 @@ struct option long_opts[] = {
{"no-tab-scroll" , no_argument , 0 , 0 } ,
{"num-tests" , required_argument , 0 , 0 } ,
{"origin" , required_argument , 0 , 0 } ,
{"output" , required_argument , 0 , 0 } ,
{"output-format" , required_argument , 0 , 0 } ,
{"persist" , no_argument , 0 , 0 } ,
{"pid-file" , required_argument , 0 , 0 } ,
{"port" , required_argument , 0 , 0 } ,
Expand Down Expand Up @@ -263,7 +263,8 @@ cmd_help (void)
" ranges. e.g., 192.168.0.1-192.168.0.10\n"
" -H --http-protocol=<yes|no> - Set/unset HTTP request protocol if found.\n"
" -M --http-method=<yes|no> - Set/unset HTTP request method if found.\n"
" -o --output=file.html|json|csv - Output either an HTML, JSON or a CSV file.\n"
" -o --output=<format|filename> - Output to stdout or the specified file.\n"
" e.g., -o csv, -o out.json, --output=report.html\n"
" -q --no-query-string - Strip request's query string. This can\n"
" decrease memory consumption.\n"
" -r --no-term-resolver - Disable IP resolver on terminal output.\n"
Expand Down Expand Up @@ -552,8 +553,8 @@ parse_long_opt (const char *name, const char *oarg) {
}

/* output file */
if (!strcmp ("output", name))
set_array_opt (oarg, conf.output_formats, &conf.output_format_idx, MAX_OUTFORMATS);
if (!strcmp ("output-format", name))
FATAL ("The option --output-format is deprecated, please use --output instead.");

/* PARSE OPTIONS
* ========================= */
Expand Down

0 comments on commit 52bd094

Please sign in to comment.