containerpope / nifi-prometheus-reporter

A reporting task in Nifi which is capable of sending monitoring statistics as prometheus metrics to a prometheus pushgateway.
Apache License 2.0
52 stars 32 forks source link

How to set Prometheus PushGateway URL #7

Closed MadDataScience closed 6 years ago

MadDataScience commented 6 years ago

METRICS_COLLECTOR_URL defaults to http://localhost:9091

How do I change that? It seems like something that should be set in nifi.properties or bootstrap.conf or some other conf file, but I can't figure out which one or where.

Thanks in advance!

MadDataScience commented 6 years ago

Actually, it looks like I may have gotten a bit ahead of myself. I can't even seem to get it to work locally.

I've run docker-compose up within docker/prometheus/ so I've got prometheus_grafana_1, prometheus_pushgateway_1, prometheus_server_1 all running (and can see so at http://localhost:3000/?orgId=1, http://localhost:9090/ and http://localhost:9091/metrics). I ran mvn install to build nifi-prometheus-nar-1.6.0.nar and copied it into nifi-1.6.0/lib/. I ran bin/nifi.sh restart. I have a simple test flow that includes a GenerateFlowFile processor running. The basic metrics from the pushgateway (like go_gc_duration_seconds) seem to be there but nothing that I can see from NiFi, no FlowFilesSentLast5Minutes or BytesQueued, for instance. I think I must be missing a step, though I can't see anything in Readme.md aside from what I've already done. Any advice?

Thank you.

MadDataScience commented 6 years ago

Aha! I missed the part about setting up the Reporting Task. Very easy once you know what to look for: https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.1.1/bk_user-guide/content/Reporting_Tasks.html (for posterity)

MadDataScience commented 6 years ago

...and that's where you set the pushgateway url.