Index: head/net-mgmt/Makefile =================================================================== --- head/net-mgmt/Makefile (revision 494055) +++ head/net-mgmt/Makefile (revision 494056) @@ -1,417 +1,418 @@ # $FreeBSD$ # COMMENT = Network management tools SUBDIR += 2ping SUBDIR += TkTopNetFlows SUBDIR += adcli SUBDIR += aggregate SUBDIR += aircrack-ng SUBDIR += alertmanager SUBDIR += ap-utils SUBDIR += argus3 SUBDIR += argus3-clients SUBDIR += arpalert SUBDIR += arpscan SUBDIR += arpwatch SUBDIR += arts++ SUBDIR += bandwidthd SUBDIR += bgpq SUBDIR += bgpq3 SUBDIR += bgpuma SUBDIR += blackbox_exporter SUBDIR += bpft SUBDIR += braa SUBDIR += bsnmp-jails SUBDIR += bsnmp-regex SUBDIR += bsnmp-ucd SUBDIR += bwm-ng SUBDIR += cacti SUBDIR += cacti-spine SUBDIR += cacti88-spine SUBDIR += carbon-relay-ng SUBDIR += carbonzipper SUBDIR += ccnet-client SUBDIR += ccnet-server SUBDIR += cdpd SUBDIR += cdpr SUBDIR += cdpsnarf SUBDIR += centreon-clib SUBDIR += check_ipmi_sensor SUBDIR += check_logfiles SUBDIR += check_mk_agent SUBDIR += check_multi SUBDIR += check_mysql_health SUBDIR += check_ssl_cert SUBDIR += chillispot SUBDIR += choparp SUBDIR += cidr SUBDIR += ciscoconf SUBDIR += clog SUBDIR += cnagios SUBDIR += collectd5 SUBDIR += confregdecode SUBDIR += coovachilli SUBDIR += cowpatty SUBDIR += cricket SUBDIR += crmsh SUBDIR += darkstat SUBDIR += devmon SUBDIR += devmon-templates SUBDIR += dhcdrop SUBDIR += dhcp_probe SUBDIR += disco SUBDIR += dnsmap SUBDIR += docsis SUBDIR += driftnet SUBDIR += ehnt SUBDIR += etherape SUBDIR += ettercap SUBDIR += fastnetmon SUBDIR += fetchconfig SUBDIR += flow-extract SUBDIR += flow-tools SUBDIR += flowd SUBDIR += flowviewer SUBDIR += fprobe SUBDIR += glpi-plugins-fusioninventory-server SUBDIR += gnu-ipcalc SUBDIR += grepcidr SUBDIR += grepip SUBDIR += grok_exporter SUBDIR += gsnmp SUBDIR += guifi-snpservices SUBDIR += hastmon SUBDIR += icinga2 SUBDIR += icingaweb2 SUBDIR += icingaweb2-module-businessprocess SUBDIR += icingaweb2-module-cube SUBDIR += icingaweb2-module-director SUBDIR += icingaweb2-module-elasticsearch SUBDIR += icingaweb2-module-fileshipper SUBDIR += icingaweb2-module-generictts SUBDIR += icingaweb2-module-grafana SUBDIR += icingaweb2-module-graphite SUBDIR += icingaweb2-module-map SUBDIR += icingaweb2-module-vsphere SUBDIR += icmpmonitor SUBDIR += icmpquery SUBDIR += iftop SUBDIR += intel-snap SUBDIR += iog SUBDIR += ipacctd SUBDIR += ipaudit SUBDIR += ipcad SUBDIR += ipcalc SUBDIR += iprange SUBDIR += ipv6calc SUBDIR += ipv6gen SUBDIR += ipv6mon SUBDIR += irrtoolset SUBDIR += isic SUBDIR += jnettop SUBDIR += kapacitor SUBDIR += kismet SUBDIR += klg SUBDIR += lanmap SUBDIR += lg SUBDIR += librenms SUBDIR += librenms-agent SUBDIR += libsmi SUBDIR += lldpd SUBDIR += mbrowse SUBDIR += mdata-client SUBDIR += metronome SUBDIR += midpoint SUBDIR += mk-livestatus SUBDIR += monitoring-plugins SUBDIR += mrtg SUBDIR += mrtg-ping-probe SUBDIR += mtrace SUBDIR += mysqld_exporter SUBDIR += nagcon SUBDIR += nagios SUBDIR += nagios-certexp-plugin SUBDIR += nagios-check_bacula SUBDIR += nagios-check_bacula9 SUBDIR += nagios-check_clamav SUBDIR += nagios-check_cpu_usage SUBDIR += nagios-check_dhcp.pl SUBDIR += nagios-check_email_delivery SUBDIR += nagios-check_hdd_health SUBDIR += nagios-check_hp_bladechassis SUBDIR += nagios-check_memcached_paranoid SUBDIR += nagios-check_mysql_slave SUBDIR += nagios-check_netsnmp SUBDIR += nagios-check_ports SUBDIR += nagios-check_postgres SUBDIR += nagios-check_puppet SUBDIR += nagios-check_relayd_status SUBDIR += nagios-check_smartmon SUBDIR += nagios-check_tftp SUBDIR += nagios-check_zpools SUBDIR += nagios-geom SUBDIR += nagios-openldap-plugins SUBDIR += nagios-pf-plugin SUBDIR += nagios-plugins SUBDIR += nagios-snmp-plugins SUBDIR += nagios-snmp-plugins-extras SUBDIR += nagios-spamd-plugin SUBDIR += nagios4 SUBDIR += nagiosagent SUBDIR += nagiosgraph SUBDIR += nagiosql SUBDIR += nagircbot SUBDIR += nagnu SUBDIR += nagstamon SUBDIR += nagtail SUBDIR += nagvis SUBDIR += nbtscan SUBDIR += ndoutils SUBDIR += ndpmon SUBDIR += nefu SUBDIR += net-snmp SUBDIR += netbox SUBDIR += netdata SUBDIR += netdisco SUBDIR += netdisco-mibs SUBDIR += netdot SUBDIR += netleak SUBDIR += netmagis-common SUBDIR += netmagis-database SUBDIR += netmagis-detecteq SUBDIR += netmagis-metro SUBDIR += netmagis-servers SUBDIR += netmagis-topo SUBDIR += netmagis-utils SUBDIR += netmagis-www SUBDIR += netmask SUBDIR += netspoc SUBDIR += netustad SUBDIR += networkmgr SUBDIR += netwox SUBDIR += netxms SUBDIR += nfdump SUBDIR += nfsen SUBDIR += ng_ipacct SUBDIR += nitpicker SUBDIR += nrpe3 SUBDIR += nsca SUBDIR += nsca-client SUBDIR += nsca-ng SUBDIR += nsca-ng-client SUBDIR += nsca27 SUBDIR += nsca27-client SUBDIR += nstat + SUBDIR += nsd_exporter SUBDIR += nstreams SUBDIR += nvidia_gpu_prometheus_exporter SUBDIR += observium SUBDIR += ocsinventory-agent SUBDIR += ocsinventory-ocsreports SUBDIR += ocsinventory-server SUBDIR += omping SUBDIR += onionlauncher SUBDIR += openbmp SUBDIR += openlldp SUBDIR += openvmps SUBDIR += p0f SUBDIR += p0f2 SUBDIR += p5-AnyEvent-SNMP SUBDIR += p5-BigIP-iControl SUBDIR += p5-Cflow SUBDIR += p5-Cisco-CopyConfig SUBDIR += p5-Cisco-Reconfig SUBDIR += p5-Data-Validate-IP SUBDIR += p5-FusionInventory-Agent SUBDIR += p5-GRNOC-Config SUBDIR += p5-GRNOC-TL1 SUBDIR += p5-MRTG-Parse SUBDIR += p5-Mon SUBDIR += p5-Monitoring-Livestatus SUBDIR += p5-Monitoring-Plugin SUBDIR += p5-NSNMP SUBDIR += p5-Nagios-Object SUBDIR += p5-Nagios-Plugin SUBDIR += p5-Nagios-Plugin-Beanstalk SUBDIR += p5-Nagios-Plugin-LDAP SUBDIR += p5-Nagios-Plugins-Memcached SUBDIR += p5-Net-ACL SUBDIR += p5-Net-Abuse-Utils SUBDIR += p5-Net-Abuse-Utils-Spamhaus SUBDIR += p5-Net-CIDR SUBDIR += p5-Net-ILO SUBDIR += p5-Net-IP SUBDIR += p5-Net-IP-Match-Regexp SUBDIR += p5-Net-IP-Match-XS SUBDIR += p5-Net-IP-Resolver SUBDIR += p5-Net-IP-XS SUBDIR += p5-Net-IPAddress SUBDIR += p5-Net-IPv4Addr SUBDIR += p5-Net-IPv6Addr SUBDIR += p5-Net-NSCA-Client SUBDIR += p5-Net-Netmask SUBDIR += p5-Net-OpenVPN-Manage SUBDIR += p5-Net-SNMP SUBDIR += p5-Net-SNMP-Util SUBDIR += p5-Net-SNMPTrapd SUBDIR += p5-Net-Telnet-Cisco-IOS SUBDIR += p5-NetAddr-IP SUBDIR += p5-NetAddr-IP-Lite SUBDIR += p5-NetApp SUBDIR += p5-POE-Component-SNMP SUBDIR += p5-RDR-Collector SUBDIR += p5-SNMP-Info SUBDIR += p5-SNMP-MIB-Compiler SUBDIR += p5-SNMP-Simple SUBDIR += p5-SNMP-Trapinfo SUBDIR += p5-SNMP-Util SUBDIR += p5-SNMP_Session SUBDIR += p5-Telnet-Cisco SUBDIR += p5-Tie-NetAddr-IP SUBDIR += p5-Xymon SUBDIR += p5-Xymon-Client SUBDIR += p5-Xymon-Server SUBDIR += p5-Zenoss SUBDIR += p5-jmx4perl SUBDIR += packit SUBDIR += pads SUBDIR += pancho SUBDIR += pandorafms_agent SUBDIR += pandorafms_console SUBDIR += pandorafms_server SUBDIR += pdagent-integrations SUBDIR += percona-monitoring-plugins SUBDIR += pftabled SUBDIR += php71-snmp SUBDIR += php72-snmp SUBDIR += php73-snmp SUBDIR += phpipam SUBDIR += phpweathermap SUBDIR += pixilate SUBDIR += pktstat SUBDIR += pmacct SUBDIR += pnp SUBDIR += pnp-icinga2 SUBDIR += portmon SUBDIR += prometheus-collectd-exporter SUBDIR += prometheus1 SUBDIR += prometheus2 SUBDIR += pushgateway SUBDIR += py-adal SUBDIR += py-ciscoconfparse SUBDIR += py-dnsdiag SUBDIR += py-ipcalc SUBDIR += py-ipy SUBDIR += py-junos-eznc SUBDIR += py-msrest SUBDIR += py-msrestazure SUBDIR += py-napalm SUBDIR += py-napalm-logs SUBDIR += py-ncclient SUBDIR += py-pdagent SUBDIR += py-prometheus-client SUBDIR += py-pyIOSXR SUBDIR += py-pyang SUBDIR += py-pyeapi SUBDIR += py-pynsca SUBDIR += py-pynxos SUBDIR += py-pysmi SUBDIR += py-pysnmp SUBDIR += py-pysnmp-apps SUBDIR += py-pysnmp-mibs SUBDIR += py-pyzabbix SUBDIR += py-snmp_passpersist SUBDIR += py-yapsnmp SUBDIR += qkismet SUBDIR += rackmonkey SUBDIR += rancid3 SUBDIR += rate SUBDIR += rcpd SUBDIR += remarp SUBDIR += resource-agents SUBDIR += riemann SUBDIR += riemann-c-client SUBDIR += rotorouter SUBDIR += routers2 SUBDIR += routers2-extensions SUBDIR += routers2-extras SUBDIR += rrdbot SUBDIR += rtrlib SUBDIR += rubygem-blimpy SUBDIR += rubygem-oxidized SUBDIR += rubygem-oxidized-script SUBDIR += rubygem-oxidized-web SUBDIR += rubygem-snmp SUBDIR += rubygem-visage-app SUBDIR += sblim-wbemcli SUBDIR += scli SUBDIR += sdig SUBDIR += seafile-client SUBDIR += seafile-gui SUBDIR += seafile-server SUBDIR += semaphore SUBDIR += send SUBDIR += sendip SUBDIR += sipcalc SUBDIR += sjitter SUBDIR += slate SUBDIR += smokeping SUBDIR += snmp++ SUBDIR += snmp4nagios SUBDIR += snmptt SUBDIR += softflowd SUBDIR += spectools SUBDIR += ssgless SUBDIR += statsd SUBDIR += statsite SUBDIR += subcalc SUBDIR += super_mediator SUBDIR += sysmon SUBDIR += tcpreplay SUBDIR += tcptrack SUBDIR += telegraf SUBDIR += tornova SUBDIR += torrus SUBDIR += triton-guesttools SUBDIR += unbound_exporter SUBDIR += unifi-devel SUBDIR += unifi-lts SUBDIR += unifi5 SUBDIR += victorops-nagios SUBDIR += virt-viewer SUBDIR += wdiag SUBDIR += weplab SUBDIR += whatmask SUBDIR += wifimgr SUBDIR += wmi-client SUBDIR += xymon-client SUBDIR += xymon-server SUBDIR += yaf SUBDIR += zabbix22-agent SUBDIR += zabbix22-frontend SUBDIR += zabbix22-java SUBDIR += zabbix22-proxy SUBDIR += zabbix22-server SUBDIR += zabbix3-agent SUBDIR += zabbix3-frontend SUBDIR += zabbix3-java SUBDIR += zabbix3-proxy SUBDIR += zabbix3-server SUBDIR += zabbix32-agent SUBDIR += zabbix32-frontend SUBDIR += zabbix32-java SUBDIR += zabbix32-proxy SUBDIR += zabbix32-server SUBDIR += zabbix34-agent SUBDIR += zabbix34-frontend SUBDIR += zabbix34-java SUBDIR += zabbix34-proxy SUBDIR += zabbix34-server SUBDIR += zabbix4-agent SUBDIR += zabbix4-frontend SUBDIR += zabbix4-java SUBDIR += zabbix4-proxy SUBDIR += zabbix4-server .include Index: head/net-mgmt/nsd_exporter/Makefile =================================================================== --- head/net-mgmt/nsd_exporter/Makefile (nonexistent) +++ head/net-mgmt/nsd_exporter/Makefile (revision 494056) @@ -0,0 +1,54 @@ +# Created by: Ryan Steinmetz +# $FreeBSD$ + +PORTNAME= nsd_exporter +PORTVERSION= 0.1.0 +CATEGORIES= net-mgmt + +MAINTAINER= zi@FreeBSD.org +COMMENT= Prometheus exporter for nsd metrics + +LICENSE= BSD3CLAUSE + +USES= go +USE_GITHUB= yes + +GH_ACCOUNT= optix2000 +GH_TUPLE= prometheus:client_golang:v0.8.0:client_golang \ + prometheus:client_model:5c3871d:client_model \ + prometheus:procfs:ae68e2d:procfs \ + prometheus:common:7600349:common \ + beorn7:perks:3a771d9:perks \ + golang:protobuf:70b3af3:protobuf \ + matttproud:golang_protobuf_extensions:c12348c:golang_protobuf_extensions \ + optix2000:go-nsdctl:ce14b32:go_nsdctl \ + go-yaml:yaml:7f97868:go_yaml + +GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME} +GO_TARGET= github.com/${GH_ACCOUNT}/${PORTNAME} + +PLIST_FILES= bin/nsd_exporter + +USE_RC_SUBR= nsd_exporter + +post-patch: + ${REINPLACE_CMD} -e 's|"/etc|"${LOCALBASE}/etc|g' ${WRKSRC_go_nsdctl}/nsdctl.go + +pre-build: + ${MKDIR} ${GO_WRKDIR_SRC}/github.com/prometheus ${GO_WRKDIR_SRC}/gopkg.in \ + ${GO_WRKDIR_SRC}/github.com/beorn7 ${GO_WRKDIR_SRC}/github.com/golang \ + ${GO_WRKDIR_SRC}/github.com/matttproud ${GO_WRKDIR_SRC}/github.com/optix2000 + ${MV} ${WRKSRC_golang_protobuf_extensions} ${GO_WRKDIR_SRC}/github.com/matttproud/golang_protobuf_extensions + ${MV} ${WRKSRC_go_nsdctl} ${GO_WRKDIR_SRC}/github.com/optix2000/go-nsdctl + ${MV} ${WRKSRC_client_golang} ${GO_WRKDIR_SRC}/github.com/prometheus/client_golang + ${MV} ${WRKSRC_client_model} ${GO_WRKDIR_SRC}/github.com/prometheus/client_model + ${MV} ${WRKSRC_procfs} ${GO_WRKDIR_SRC}/github.com/prometheus/procfs + ${MV} ${WRKSRC_common} ${GO_WRKDIR_SRC}/github.com/prometheus/common + ${MV} ${WRKSRC_protobuf} ${GO_WRKDIR_SRC}/github.com/golang/protobuf + ${MV} ${WRKSRC_go_yaml} ${GO_WRKDIR_SRC}/gopkg.in/yaml.v2 + ${MV} ${WRKSRC_perks} ${GO_WRKDIR_SRC}/github.com/beorn7/perks + +do-install: + ${INSTALL_PROGRAM} ${WRKDIR}/bin/nsd_exporter ${STAGEDIR}${PREFIX}/bin + +.include Property changes on: head/net-mgmt/nsd_exporter/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/nsd_exporter/distinfo =================================================================== --- head/net-mgmt/nsd_exporter/distinfo (nonexistent) +++ head/net-mgmt/nsd_exporter/distinfo (revision 494056) @@ -0,0 +1,21 @@ +TIMESTAMP = 1551277938 +SHA256 (optix2000-nsd_exporter-0.1.0_GH0.tar.gz) = 7fb9fae9f434e904e79eceaef9e5640e8be66d57384f87a9a6a85ab663dcf51c +SIZE (optix2000-nsd_exporter-0.1.0_GH0.tar.gz) = 8144 +SHA256 (prometheus-client_golang-v0.8.0_GH0.tar.gz) = 88b0040393276116f848de5bdd636717d339667273cfc45a4edda40b5e5682bd +SIZE (prometheus-client_golang-v0.8.0_GH0.tar.gz) = 75593 +SHA256 (prometheus-client_model-5c3871d_GH0.tar.gz) = 5decfffcc4a7cfbce4214e42aaf0e3af9acdadf5d3f3ef6733868314171fd2f0 +SIZE (prometheus-client_model-5c3871d_GH0.tar.gz) = 57126 +SHA256 (prometheus-procfs-ae68e2d_GH0.tar.gz) = d2ef0107607a9e0fcfccbe7d0a364ea04de741d464b244994fb579f2610dfb4f +SIZE (prometheus-procfs-ae68e2d_GH0.tar.gz) = 57790 +SHA256 (prometheus-common-7600349_GH0.tar.gz) = 428d2301007b765ae36a64114b2f4806556c602dba34c011a10caaae76cbb433 +SIZE (prometheus-common-7600349_GH0.tar.gz) = 77805 +SHA256 (beorn7-perks-3a771d9_GH0.tar.gz) = b7a0faebca98ebd5e7546403b4cdea9dc77f865f0623d04efbad33e984297cc9 +SIZE (beorn7-perks-3a771d9_GH0.tar.gz) = 10800 +SHA256 (golang-protobuf-70b3af3_GH0.tar.gz) = fd81970d30eba8f3d49c5b27eb80728060f022bb391515e8d79724d5b39dc1f9 +SIZE (golang-protobuf-70b3af3_GH0.tar.gz) = 329777 +SHA256 (matttproud-golang_protobuf_extensions-c12348c_GH0.tar.gz) = da165c9275b77a0994b815bc7d761dcb2e4799a90fe49eec08d8bdff3a683f48 +SIZE (matttproud-golang_protobuf_extensions-c12348c_GH0.tar.gz) = 37200 +SHA256 (optix2000-go-nsdctl-ce14b32_GH0.tar.gz) = 4474f6e9f18d08035f36ef60dc25b97c7c5528ab99f59cf7f94854613d73b239 +SIZE (optix2000-go-nsdctl-ce14b32_GH0.tar.gz) = 4038 +SHA256 (go-yaml-yaml-7f97868_GH0.tar.gz) = b0215657c82db81fa1e10f73fb1df3db12715ec68a14ab555e7f40d1d174132d +SIZE (go-yaml-yaml-7f97868_GH0.tar.gz) = 69163 Property changes on: head/net-mgmt/nsd_exporter/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/nsd_exporter/files/nsd_exporter.in =================================================================== --- head/net-mgmt/nsd_exporter/files/nsd_exporter.in (nonexistent) +++ head/net-mgmt/nsd_exporter/files/nsd_exporter.in (revision 494056) @@ -0,0 +1,63 @@ +#!/bin/sh + +# PROVIDE: nsd_exporter +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# nsd_exporter_enable (bool): Set to NO by default. +# Set it to YES to enable nsd_exporter. +# nsd_exporter_user (string): Set user that nsd_exporter will run under +# Default is "nobody". +# nsd_exporter_group (string): Set group that nsd_exporter will run under +# Default is "nobody". +# nsd_exporter_args (string): Set extra arguments to pass to nsd_exporter +# Default is "". +# nsd_exporter_listen_address (string):Set ip:port that nsd_exporter will listen on +# Default is ":9132". + +. /etc/rc.subr + +name=nsd_exporter +rcvar=nsd_exporter_enable + +load_rc_config $name + +: ${nsd_exporter_enable:="NO"} +: ${nsd_exporter_user:="nobody"} +: ${nsd_exporter_group:="nobody"} +: ${nsd_exporter_args:=""} +: ${nsd_exporter_listen_address:=":9132"} +: ${nsd_exporter_control_cert:="%%LOCALBASE%%/etc/nsd/nsd_control.pem"} +: ${nsd_exporter_control_ca:="%%LOCALBASE%%/etc/nsd/nsd_server.pem"} +: ${nsd_exporter_control_key:="%%LOCALBASE%%/etc/nsd/nsd_control.key"} +: ${nsd_exporter_nsd_address:="127.0.0.1:8952"} +: ${nsd_exporter_restart_delay:="10"} + + +pidfile=/var/run/nsd_exporter.pid +command="/usr/sbin/daemon" +procname="%%PREFIX%%/bin/nsd_exporter" +command_args="-rp ${pidfile} -S -R ${nsd_exporter_restart_delay} \ + -T ${name} ${procname} \ + -cert ${nsd_exporter_control_cert} \ + -ca ${nsd_exporter_control_ca} \ + -key ${nsd_exporter_control_key} \ + -nsd-address ${nsd_exporter_nsd_address} \ + -listen-address ${nsd_exporter_listen_address} \ + ${nsd_exporter_args}" +required_files="${nsd_exporter_control_cert} ${nsd_exporter_control_ca} ${nsd_exporter_control_key}" + +start_precmd=nsd_exporter_startprecmd + +nsd_exporter_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${nsd_exporter_user} -g ${nsd_exporter_group} /dev/null ${pidfile}; + fi +} + +load_rc_config $name +run_rc_command "$1" Property changes on: head/net-mgmt/nsd_exporter/files/nsd_exporter.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/nsd_exporter/files/patch-nsd__exporter.go =================================================================== --- head/net-mgmt/nsd_exporter/files/patch-nsd__exporter.go (nonexistent) +++ head/net-mgmt/nsd_exporter/files/patch-nsd__exporter.go (revision 494056) @@ -0,0 +1,20 @@ +--- nsd_exporter.go.orig 2018-02-08 23:45:14 UTC ++++ nsd_exporter.go +@@ -19,7 +19,7 @@ import ( + var listenAddr = flag.String("listen-address", ":8080", "The address to listen on for HTTP requests.") + var metricPath = flag.String("metric-path", "/metrics", "The path to export Prometheus metrocs to.") + var metricConfigPath = flag.String("metric-config", "", "Mapping file for metrics. Defaults to built in file for NSD 4.1.x. This allows you to add or change any metrics that this scrapes") +-var nsdConfig = flag.String("config-file", "/etc/nsd/nsd.conf", "Configuration file for nsd/unbound to autodetect configuration from. Defaults to /etc/nsd/nsd.conf. Mutually exclusive with -nsd-address, -cert, -key and -ca") ++var nsdConfig = flag.String("config-file", "/usr/local/etc/nsd/nsd.conf", "Configuration file for nsd/unbound to autodetect configuration from. Defaults to /usr/local/etc/nsd/nsd.conf. Mutually exclusive with -nsd-address, -cert, -key and -ca") + var nsdType = flag.String("type", "nsd", "What nsd-like daemon to scrape (nsd or unbound). Defaults to nsd") + var cert = flag.String("cert", "", "Client cert file location. Mutually exclusive with -config-file.") + var key = flag.String("key", "", "Client key file location. Mutually exclusive with -config-file.") +@@ -58,7 +58,7 @@ func (c *NSDCollector) Collect(ch chan<- + s := bufio.NewScanner(r) + for s.Scan() { + line := strings.Split(s.Text(), "=") +- metricName := line[0] ++ metricName := strings.TrimSpace(line[0]) + m, ok := c.metrics[metricName] + if !ok { + log.Println("Unknown Metric ", metricName, ". Skipping.") Property changes on: head/net-mgmt/nsd_exporter/files/patch-nsd__exporter.go ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/nsd_exporter/pkg-descr =================================================================== --- head/net-mgmt/nsd_exporter/pkg-descr (nonexistent) +++ head/net-mgmt/nsd_exporter/pkg-descr (revision 494056) @@ -0,0 +1,3 @@ +nsd_exporter is a prometheus exporter for nsd metrics + +WWW: https://github.com/optix2000/nsd_exporter Property changes on: head/net-mgmt/nsd_exporter/pkg-descr ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/net-mgmt/nsd_exporter/pkg-message =================================================================== --- head/net-mgmt/nsd_exporter/pkg-message (nonexistent) +++ head/net-mgmt/nsd_exporter/pkg-message (revision 494056) @@ -0,0 +1,11 @@ +========================================================================= +Don't forget to run nsd-control-setup to generate the required +certificates and then ensure the user this process runs as can read them. + +The default user is nobody. You can change the user (or group) by running: +% sysrc nsd_exporter_user="user" +% sysrc nsd_exporter_group="group" + +Be aware that any user with access to the certificates can run all of the +nsd-control commands. +========================================================================= Property changes on: head/net-mgmt/nsd_exporter/pkg-message ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property