Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics not appearing on /metrics page #404

Open
yusi1 opened this issue Nov 12, 2024 · 0 comments
Open

Metrics not appearing on /metrics page #404

yusi1 opened this issue Nov 12, 2024 · 0 comments
Labels

Comments

@yusi1
Copy link

yusi1 commented Nov 12, 2024

Describe the bug
Metrics do not appear on the /metrics page in <server-ip>/metrics. Even when the regex for the log file is correct in both the configuration for the exporter and the NGINX log format.

To Reproduce

Expected Behaviour
More metrics appear in /metrics.

Metrics output (remove section, if not applicable):

# HELP nginx_parse_errors_total Total number of log file lines that could not be parsed
# TYPE nginx_parse_errors_total counter
nginx_parse_errors_total 0
# HELP prometheus_nginxlog_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which prometheus_nginxlog_exporter was built, and the goos and goarch for the build.
# TYPE prometheus_nginxlog_exporter_build_info gauge
prometheus_nginxlog_exporter_build_info{branch="v1.11.0",goarch="amd64",goos="linux",goversion="go1.18.10",revision="76552e7cadc1f76b4e28b5c872412db4a091aca0",tags="unknown",version="1.11.0"} 1

Exporter output (remove section, if not applicable):

From CLI:

2024-11-12T22:20:30.147Z	info	prometheus-nginxlog-exporter/main.go:162	loading configuration file /etc/prometheus-nginxlog-exporter.hcl
2024-11-12T22:20:30.147Z	warn	config/struct_namespace.go:98	No globs for /var/log/nginx/sitename-access.log
2024-11-12T22:20:30.147Z	info	prometheus-nginxlog-exporter/main.go:139	starting listener for namespace nginx
2024-11-12T22:20:30.147Z	info	prometheus-nginxlog-exporter/main.go:148	running HTTP server on address 0.0.0.0:4040, serving metrics at /metrics

From /metrics:

# HELP nginx_parse_errors_total Total number of log file lines that could not be parsed
# TYPE nginx_parse_errors_total counter
nginx_parse_errors_total 0
# HELP prometheus_nginxlog_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which prometheus_nginxlog_exporter was built, and the goos and goarch for the build.
# TYPE prometheus_nginxlog_exporter_build_info gauge
prometheus_nginxlog_exporter_build_info{branch="v1.11.0",goarch="amd64",goos="linux",goversion="go1.18.10",revision="76552e7cadc1f76b4e28b5c872412db4a091aca0",tags="unknown",version="1.11.0"} 1

Environment:

  • Exporter version: (branch: v1.11.0, revision: 76552e7cadc1f76b4e28b5c872412db4a091aca0)
  • OS (e.g. from /etc/os-release): openSUSE Tumbleweed
  • Deployment method (e.g. Docker image, deb/rpm package, self-compiled, ...): rpm package
@yusi1 yusi1 added the bug label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant