Date: Wed, 14 Aug 2019 16:32:22 +0000 (UTC) From: Ryan Steinmetz <zi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r508932 - in head/sysutils: . sensu-go sensu-go/files Message-ID: <201908141632.x7EGWMVb033693@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zi Date: Wed Aug 14 16:32:22 2019 New Revision: 508932 URL: https://svnweb.freebsd.org/changeset/ports/508932 Log: New port: sysutils/sensu-go: Sensu is an open source monitoring tool for ephemeral infrastructure and distributed applications. It is an agent based monitoring system with built-in auto-discovery, making it very well-suited for cloud environments. Sensu uses service checks to monitor service health and collect telemetry data. It also has a number of well defined APIs for configuration, external data input, and to provide access to Sensu's data. Sensu is extremely extensible and is commonly referred to as "the monitoring router". WWW: https://github.com/sensu/sensu-go/ PR: 239767 Submitted by: jayme <jp+ports@supplntr.io> Added: head/sysutils/sensu-go/ head/sysutils/sensu-go/Makefile (contents, props changed) head/sysutils/sensu-go/distinfo (contents, props changed) head/sysutils/sensu-go/files/ head/sysutils/sensu-go/files/sensu-agent.in (contents, props changed) head/sysutils/sensu-go/files/sensu-agent.yml.sample (contents, props changed) head/sysutils/sensu-go/files/sensu-backend.in (contents, props changed) head/sysutils/sensu-go/files/sensu-backend.yml.sample (contents, props changed) head/sysutils/sensu-go/pkg-descr (contents, props changed) head/sysutils/sensu-go/pkg-plist (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Wed Aug 14 16:30:11 2019 (r508931) +++ head/sysutils/Makefile Wed Aug 14 16:32:22 2019 (r508932) @@ -1236,6 +1236,7 @@ SUBDIR += sdparm SUBDIR += seatools SUBDIR += sec + SUBDIR += sensu-go SUBDIR += serf SUBDIR += setcdboot SUBDIR += setquota Added: head/sysutils/sensu-go/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sensu-go/Makefile Wed Aug 14 16:32:22 2019 (r508932) @@ -0,0 +1,62 @@ +# $FreeBSD$ + +PORTNAME= sensu-go +DISTVERSION= 5.11.1 +CATEGORIES= sysutils + +MAINTAINER= jp+ports@supplntr.io +COMMENT= Ephemeral infrastructure and distributed applications monitoring + +LICENSE= APACHE20 + +ONLY_FOR_ARCHS= amd64 i386 +BUILD_DEPENDS= bash:shells/bash + +USES= go +USE_GITHUB= yes +GH_PROJECT= sensu-go +GH_ACCOUNT= sensu + +GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT} + +OPTIONS_DEFINE= SENSU_AGENT SENSU_CLI SENSU_BE +OPTIONS_DEFAULT= SENSU_AGENT +OPTIONS_SUB= yes + +SENSU_AGENT_DESC= Install sensu-agent daemon +SENSU_AGENT_VARS= GO_TARGETS+=agent GO_BIN_TARGETS+=sensu-agent + +SENSU_CLI_DESC= Install sensuctl binary +SENSU_CLI_VARS= GO_TARGETS+=cli GO_BIN_TARGETS+=sensuctl \ + USE_RC_SUBR+=sensu-agent + +SENSU_BE_DESC= Install sensu-backend daemon (unsupported) +SENSU_BE_VARS= GO_TARGETS+=backend GO_BIN_TARGETS+=sensu-backend \ + USE_RC_SUBR+=sensu-backend +SENSU_BE_BROKEN= Currently not tested under FreeBSD + +.include <bsd.port.options.mk> + +post-patch: + @${REINPLACE_CMD} '/git rev/d' ${WRKSRC}/build.sh + @${REINPLACE_CMD} '/exec.Command("git"/d' ${WRKSRC}/version/cmd/version/version.go + +do-build: +.for GO_TARGET in ${GO_TARGETS} + @(cd ${GO_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GO_ENV} ./build.sh build_${GO_TARGET}) +.endfor + +do-install: +.for GO_BIN_TARGET in ${GO_BIN_TARGETS} + ${INSTALL_PROGRAM} ${GO_WRKSRC}/target/freebsd-${ARCH}/${GO_BIN_TARGET} ${STAGEDIR}${PREFIX}/bin +.endfor + +post-install-SENSU_AGENT-on: + ${INSTALL_DATA} ${PATCHDIR}/sensu-agent.yml.sample \ + ${STAGEDIR}${PREFIX}/etc/sensu-agent.yml.sample + +post-install-SENSU_BE-on: + ${INSTALL_DATA} ${PATCHDIR}/sensu-backend.yml.sample \ + ${STAGEDIR}${PREFIX}/etc/sensu-backend.yml.sample + +.include <bsd.port.mk> Added: head/sysutils/sensu-go/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sensu-go/distinfo Wed Aug 14 16:32:22 2019 (r508932) @@ -0,0 +1,3 @@ +TIMESTAMP = 1565378801 +SHA256 (sensu-sensu-go-5.11.1_GH0.tar.gz) = 62ca30e2b81903ba303fb4aa826b03d6c37347245e75a92be7014667dfb8d2da +SIZE (sensu-sensu-go-5.11.1_GH0.tar.gz) = 9351307 Added: head/sysutils/sensu-go/files/sensu-agent.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sensu-go/files/sensu-agent.in Wed Aug 14 16:32:22 2019 (r508932) @@ -0,0 +1,34 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: sensu-agent +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable sensu-agent: +# +# sensu_agent_enable (bool): Set to YES to enable sensu-agent +# Default: NO +# sensu_agent_config (str): sensu-agent configuration file +# Default: ${PREFIX}/etc/sensu-agent.yml + +. /etc/rc.subr + +name=sensu_agent +rcvar=sensu_agent_enable + +load_rc_config ${name} + +: ${sensu_agent_enable:="NO"} +: ${sensu_agent_config:="%%PREFIX%%/etc/sensu-agent.yml"} +: ${sensu_agent_restart_delay:="10"} + +pidfile="/var/run/sensu-agent.pid" +command=/usr/sbin/daemon +sensu_agent_command=%%PREFIX%%/bin/sensu-agent +command_args="-rP ${pidfile} -S -R ${sensu_agent_restart_delay} \ + -T ${name} ${sensu_agent_command} \ + start -c ${sensu_agent_config}" + +load_rc_config $name +run_rc_command "$1" Added: head/sysutils/sensu-go/files/sensu-agent.yml.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sensu-go/files/sensu-agent.yml.sample Wed Aug 14 16:32:22 2019 (r508932) @@ -0,0 +1,79 @@ +--- +# Sensu agent configuration + +## +# agent overview +## +#name: "hostname" +#namespace: "default" +#subscriptions: +# - example +#labels: +# example_key: "example value" +#annotations: +# example/key: "example value" + +## +# agent configuration +## +#backend-url: +# - "ws://127.0.0.1:8081" +#cache-dir: "/var/cache/sensu/sensu-agent" +#config-file: "/etc/sensu/agent.yml" +#log-level: "warn" # available log levels: panic, fatal, error, warn, info, debug + +## +# api configuration +## +#api-host: "127.0.0.1" +#api-port: 3031 +#disable-api: false +#events-burst-limit: 10 +#events-rate-limit: 10.0 + +## +# authentication configuration +## +#user: "agent" +#password: "P@ssw0rd!" + +## +# monitoring configuration +## +#deregister: false +#deregistration-handler: "example_handler" +#keepalive-timeout: 120 +#keepalive-interval: 20 + +## +# security configuration +## +#insecure-skip-tls-verify: false +#redact: +# - password +# - passwd +# - pass +# - api_key +# - api_token +# - access_key +# - secret_key +# - private_key +# - secret +#trusted-ca-file: "/path/to/trusted-certificate-authorities.pem" + +## +# socket configuration +## +#disable-sockets: false +#socket-host: "127.0.0.1" +#socket-port: 3030 + +## +# statsd configuration +## +#statsd-disable: false +#statsd-event-handlers: +# - example_handler +#statsd-flush-interval: 10 +#statsd-metrics-host: "127.0.0.1" +#statsd-metrics-port: 8125 Added: head/sysutils/sensu-go/files/sensu-backend.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sensu-go/files/sensu-backend.in Wed Aug 14 16:32:22 2019 (r508932) @@ -0,0 +1,34 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: sensu-backend +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable sensu-backend: +# +# sensu_backend_enable (bool): Set to YES to enable sensu-backend +# Default: NO +# sensu_backend_config (str): sensu-backend configuration file +# Default: ${PREFIX}/etc/sensu-backend.yml + +. /etc/rc.subr + +name=sensu_backend +rcvar=sensu_backend_enable + +load_rc_config ${name} + +: ${sensu_backend_enable:="NO"} +: ${sensu_backend_config:="%%PREFIX%%/etc/sensu-backend.yml"} +: ${sensu_backend_restart_delay:="10"} + +pidfile="/var/run/sensu-backend.pid" +command=/usr/sbin/daemon +sensu_backend_command=%%PREFIX%%/bin/sensu-backend +command_args="-rP ${pidfile} -S -R ${sensu_backend_restart_delay} \ + -T ${name} ${sensu_backend_command} \ + start -c ${sensu_backend_config}" + +load_rc_config $name +run_rc_command "$1" Added: head/sysutils/sensu-go/files/sensu-backend.yml.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sensu-go/files/sensu-backend.yml.sample Wed Aug 14 16:32:22 2019 (r508932) @@ -0,0 +1,63 @@ +--- +# Sensu backend configuration + +## +# backend configuration +## +state-dir: "/var/lib/sensu/sensu-backend" +#cache-dir: "/var/cache/sensu/sensu-backend" +#config-file: "/etc/sensu/backend.yml" +#debug: false +#deregistration-handler: "example_handler" +#log-level: "warn" # available log levels: panic, fatal, error, warn, info, debug + +## +# agent configuration +## +#agent-host: "[::]" # listen on all IPv4 and IPv6 addresses +#agent-port: 8081 + +## +# api configuration +## +#api-listen-address: "[::]:8080" # listen on all IPv4 and IPv6 addresses +#api-url: "http://localhost:8080" + +## +# dashboard configuration +## +#dashboard-cert-file: "/path/to/ssl/cert.pem" +#dashboard-key-file: "/path/to/ssl/key.pem" +#dashboard-host: "[::]" # listen on all IPv4 and IPv6 addresses +#dashboard-port: 3000 + +## +# ssl configuration +## +#cert-file: "/path/to/ssl/cert.pem" +#key-file: "/path/to/ssl/key.pem" +#trusted-ca-file: "/path/to/trusted-certificate-authorities.pem" +#insecure-skip-tls-verify: false + +## +# store configuration +## +#etcd-advertise-client-urls: "http://localhost:2379" +#etcd-cert-file: "/path/to/ssl/cert.pem" +#etcd-client-cert-auth: false +#etcd-initial-advertise-peer-urls: "http://127.0.0.1:2380" +#etcd-initial-cluster: "default=http://127.0.0.1:2380" +#etcd-initial-cluster-state: "new" # new or existing +#etcd-initial-cluster-token: "sensu" +#etcd-key-file: "/path/to/ssl/key.pem" +#etcd-listen-client-urls: "http://127.0.0.1:2379" +#etcd-listen-peer-urls: "http://127.0.0.1:2380" +#etcd-name: "default" +#etcd-peer-cert-file: "/path/to/ssl/cert.pem" +#etcd-peer-client-cert-auth: false +#etcd-peer-key-file: "/path/to/ssl/key.pem" +#etcd-peer-trusted-ca-file: "/path/to/ssl/key.pem" +#etcd-trusted-ca-file: "/path/to/ssl/key.pem" +#no-embed-etcd: false +#etcd-cipher-suites +# - TLS_EXAMPLE Added: head/sysutils/sensu-go/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sensu-go/pkg-descr Wed Aug 14 16:32:22 2019 (r508932) @@ -0,0 +1,10 @@ +Sensu is an open source monitoring tool for ephemeral infrastructure and +distributed applications. It is an agent based monitoring system with +built-in auto-discovery, making it very well-suited for cloud environments. + +Sensu uses service checks to monitor service health and collect telemetry +data. It also has a number of well defined APIs for configuration, external +data input, and to provide access to Sensu's data. Sensu is extremely +extensible and is commonly referred to as "the monitoring router". + +WWW: https://github.com/sensu/sensu-go/ Added: head/sysutils/sensu-go/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sensu-go/pkg-plist Wed Aug 14 16:32:22 2019 (r508932) @@ -0,0 +1,5 @@ +%%SENSU_AGENT%%bin/sensu-agent +%%SENSU_AGENT%%@sample etc/sensu-agent.yml.sample +%%SENSU_CLI%%bin/sensuctl +%%SENSU_BE%%bin/sensu-backend +%%SENSU_BE%%@sample etc/sensu-backend.yml.sample
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908141632.x7EGWMVb033693>