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

How do I pass a dynamic URL parameter to unpoller from Prometheus #704

Open
brendanbank opened this issue Apr 20, 2024 · 1 comment
Open
Labels
stale This issue/PR was marked as stale for inactivity automatically.

Comments

@brendanbank
Copy link

I have configured unpoller to accept dynamic controller:

[unifi]
  # This must be enabled to do dynamic polls against unconfigured urls.
  dynamic = true
[unifi.defaults]
  user       = "unifipoller"
  pass       = "unifipoller"
  sites      = ["all"]
  save_ids   = false
  save_dpi   = false
  save_sites = true
  verify_ssl = false

And it starts up correctly:

[INFO] Loading Configuration File: /etc/unpoller/up.conf
[INFO] UniFi Poller v2.11.2 Starting Up! PID: 84668
[INFO] No controllers configured. Polling dynamic controllers only! Defaults:
[INFO]    => URL: https://127.0.0.1:8443 (verify SSL: false)
[INFO]    => Username: unifipoller (has password: true)
[INFO]    => Hash PII false / Drop PII false / Poll Sites: all
[INFO]    => Save Sites true / Save DPI false (metrics)
[INFO]    => Save Events false / Save IDS false (logs)
[INFO]    => Save Alarms false / Anomalies false (logs)
[INFO]    => Save Rogue APs: false
[INFO] Prometheus is enabled
[INFO] Prometheus exported at http://0.0.0.0:9130/ - namespace: unpoller

But when I request a the unpller through the prometheus exporter the controller I requested is not called:

curl 'http://localhost:9130/metrics?url=https://xxx.yyy.zzz:8443'
With the log entry:

[INFO] UniFi Measurements Exported. Site: 0, Client: 0, UAP: 0, USG/UDM: 0, USW: 0, DPI Site/Client: 0/0, Desc: 0, Metric: 0, Err: 0, 0s: 0, Req/Total: 0s / 0s
What parameter should I call to get the unpoller to poll the desired controller?
I tried URL, target, targets, urls

Thanks,

Brendan

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale This issue/PR was marked as stale for inactivity automatically. label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue/PR was marked as stale for inactivity automatically.
Projects
None yet
Development

No branches or pull requests

1 participant