Bug 218197 - [NEW PORT] net-mgmt/unbound_exporter: Prometheus metrics exporter for the Unbound DNS resolver
Summary: [NEW PORT] net-mgmt/unbound_exporter: Prometheus metrics exporter for the Unb...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Boris Samorodov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-28 21:53 UTC by Athanasios Douitsis
Modified: 2017-07-17 22:32 UTC (History)
2 users (show)

See Also:
bsam: maintainer-feedback+


Attachments
Shar archive of the port (4.93 KB, text/plain)
2017-03-28 21:53 UTC, Athanasios Douitsis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Athanasios Douitsis 2017-03-28 21:53:01 UTC
Created attachment 181282 [details]
Shar archive of the port

Unbound_exporter connects to Unbounds TLS control socket and sends the
stats_noreset command, causing Unbound to return metrics as key-value
pairs. The metrics exporter converts Unbound metric names to Prometheus
metric names and labels by using a set of regular expressions.
Comment 1 Athanasios Douitsis 2017-03-30 21:07:41 UTC
If anyone reviewing this code can suggest a better way of handling the output of the process, I'd be obliged for any suggestions. I think that right now, redirecting stdout and stderr should suffice.
Comment 2 Boris Samorodov freebsd_committer 2017-07-17 20:48:32 UTC
Take.
Comment 3 Boris Samorodov freebsd_committer 2017-07-17 21:55:32 UTC
Hi Athanasios,

I get an error while building the port with poudriere:
=======================<phase: build          >============================
===>  Building for unbound_exporter-0.1
go: missing Git command. See https://golang.org/s/gogetcmd
package github.com/prometheus/client_golang/prometheus: exec: "git": executable file not found in $PATH
*** Error code 1

The approach you've taken (to fetch something by "go get" command) seems to be not the best/acceptable. For more help please use freebsd-ports@ mail list.
Comment 4 Athanasios Douitsis 2017-07-17 22:15:01 UTC
(In reply to Boris Samorodov from comment #3)

I have a new version that only accesses the network when fetching. This is the correct behaviour and will build correctly when trying to test using poudriere.

For the time being, I have it here: https://github.com/aduitsis/unbound_exporter_freebsd_port

Give me some time and I'll submit a new shar.
Comment 5 Boris Samorodov freebsd_committer 2017-07-17 22:16:49 UTC
(In reply to Athanasios Douitsis from comment #4)
OK, no need in shar. I'll take it from github.
Comment 6 Athanasios Douitsis 2017-07-17 22:18:49 UTC
Wow! Thanks!
Comment 7 commit-hook freebsd_committer 2017-07-17 22:27:32 UTC
A commit references this bug:

Author: bsam
Date: Mon Jul 17 22:26:34 UTC 2017
New revision: 446121
URL: https://svnweb.freebsd.org/changeset/ports/446121

Log:
  Unbound_exporter connects to Unbounds TLS control socket and sends the
  stats_noreset command, causing Unbound to return metrics as key-value
  pairs. The metrics exporter converts Unbound metric names to Prometheus
  metric names and labels by using a set of regular expressions.

  WWW: https://github.com/kumina/unbound_exporter

  PR:		218197
  Submitted by:	Athanasios Douitsis <aduitsis@cpan.org>

Changes:
  head/net-mgmt/Makefile
  head/net-mgmt/unbound_exporter/
  head/net-mgmt/unbound_exporter/Makefile
  head/net-mgmt/unbound_exporter/distinfo
  head/net-mgmt/unbound_exporter/files/
  head/net-mgmt/unbound_exporter/files/unbound_exporter.in
  head/net-mgmt/unbound_exporter/pkg-descr
Comment 8 Boris Samorodov freebsd_committer 2017-07-17 22:31:41 UTC
Committed, thanks!

As a side note: seems that there is an extra tab at each line at Makefile. I've changed it at your other port, but this port slipped my eye. I'll leave it for you whether to fix it or not.
Comment 9 Boris Samorodov freebsd_committer 2017-07-17 22:32:21 UTC
Close.