Page MenuHomeFreeBSD

NEW PORT: sysutils/snmp_exporter
ClosedPublic

Authored by fabian.freyer_physik.tu-berlin.de on Feb 26 2018, 7:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 8:15 AM
Unknown Object (File)
Thu, May 2, 2:54 AM
Unknown Object (File)
Fri, Apr 19, 2:46 PM
Unknown Object (File)
Thu, Apr 18, 3:55 PM
Unknown Object (File)
Apr 11 2024, 6:09 AM
Unknown Object (File)
Apr 9 2024, 9:12 AM
Unknown Object (File)
Feb 25 2024, 7:13 AM
Unknown Object (File)
Feb 25 2024, 12:56 AM

Details

Summary

snmp_exporter is a prometheus exporter for information
gathered from SNMP for use by the Prometheus monitoring
system.

WWW: https://github.com/prometheus/snmp_exporter

See bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226223

Test Plan

make install; snmp_exporter_generator generate; service snmp_exporter onestart; test with prometheus instance

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lwhsu added inline comments.
sysutils/snmp_exporter/files/patch-generator_generator.yml
7 ↗(On Diff #39767)

This patch deletes more than what left in the target file. How about just having a file with the content we need, and replace this file in post-patch?

sysutils/snmp_exporter/files/patch-generator_main.go
8 ↗(On Diff #39767)

I recommend respect ${PREFIX} instead of hard-coding /usr/local/

sysutils/snmp_exporter/Makefile
23 ↗(On Diff #39767)

Should probably be with the USE_* before. See Chapter 15. Order of Variables in Port Makefiles.

fabian.freyer_physik.tu-berlin.de added inline comments.
sysutils/snmp_exporter/files/patch-generator_main.go
8 ↗(On Diff #39767)

I'm replacing this in the post-patch target.

sysutils/snmp_exporter/files/patch-generator_main.go
8 ↗(On Diff #39767)

Oh, just saw that. One nit, from bsd.port.mk:

LOCALBASE             - Where ports install things.
PREFIX                - Where *this* port installs its files.

So it would be better to use ${PREFIX} in post-patch target.

Also, a very minor point, sometimes we use something like %%PREFIX%% as the keyword when patching, then doing real replacement later to prevent unwanted side-affect, but here it is just fine.

fabian.freyer_physik.tu-berlin.de marked 3 inline comments as done.

Fixed that, using ${PREFIX} now.

This revision is now accepted and ready to land.Feb 27 2018, 7:33 PM
This revision was automatically updated to reflect the committed changes.

@lwhsu while you're here, any chance you could take a look at D14537?