Is there a simple method to count certain logfiles.
For instance:
The response codes in a standard apache log
or
The number of ERROR messages in a log file
or
The number of times FooBar is in the log
If i try to follow the standard documentation my promtail will not start anymore.
Here is part of my config:
Promtail Server Config
server:
http_listen_port: 9080
grpc_listen_port: 0
Positions
positions:
filename: /tmp/positions.yaml
Loki Server URL
clients:
scrape_configs:
- job_name: access_log
static_configs:- targets:
- localhost
labels:
job: access_log
host: lsrv2289
path: /var/log/httpd/access_log
- localhost
- targets:
- job_name: ssl_request_log
static_configs:- targets:
- localhost
labels:
job: ssl_request_log
host: lsrv2289
path: /var/log/httpd/ssl_request_log
- localhost
- targets: