kube-no-trouble icon indicating copy to clipboard operation
kube-no-trouble copied to clipboard

feat: Add prometheus printer

Open atzawada opened this issue 2 years ago • 3 comments
trafficstars

Adding a new "printer" (reporter, exporter?) to push Kubent output to Prometheus via Pushgateway. Any feedback is appreciated.

Relates to #302 and the discussion in #218

New Configuration

Flags

  • -o prometheus is now an allowed option

Environment Variables

  • PUSHGATEWAY_URL: The URL of the Prometheus Pushgateway.
  • PUSHGATEWAY_JOB: The job to collect metrics under.

If -o prometheus is set, then both of these variables are required to be set.

Remaining Questions

  • Maybe need to expand on the configuration abilities for printers...Is environment variables the right approach or should printers be able to accept custom config/define their own flags?

Remaining Work

  • [ ] Add Pushgateway auth options
  • [ ] Add unit testing

atzawada avatar Sep 26 '23 19:09 atzawada

Not to tell you that you shouldn't do this, but you might consider https://github.com/isugimpy/kubent_exporter/ as an alternative to this. Having a publisher built in would be pretty cool though.

isugimpy avatar Oct 09 '23 13:10 isugimpy

This PR has not seen any activity in last 60 days and has been marked as stale

github-actions[bot] avatar Dec 09 '23 01:12 github-actions[bot]

Hi @atzawada , I think we can support this. Not sure about adding all those env variables, we handle those in config.go. Happy to add the printer, but pushing the messages should probably be handled by another tool.

If you rebase this and add some tests I'll happily merge it.

dark0dave avatar Dec 22 '23 18:12 dark0dave

This PR has not seen any activity in last 60 days and has been marked as stale

github-actions[bot] avatar Feb 21 '24 01:02 github-actions[bot]

This PR was closed because it has been stalled for 90 days with no activity.

github-actions[bot] avatar Mar 23 '24 01:03 github-actions[bot]