diff --git a/utils/prometheus/Makefile b/utils/prometheus/Makefile deleted file mode 100644 index 131ce4b7ae..0000000000 --- a/utils/prometheus/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=prometheus -PKG_VERSION:=2.25.2 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/prometheus/prometheus/tar.gz/v${PKG_VERSION}? -PKG_HASH:=85f50c0cfb4db206a59d2c3301e02d685c3fe4b451b41ca943a4eb94935cf4d4 - -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE -PKG_MAINTAINER:=Paul Spooren - -PKG_BUILD_DEPENDS:=golang/host -PKG_BUILD_PARALLEL:=1 -PKG_BUILD_FLAGS:=no-mips16 - -GO_PKG:=github.com/prometheus/prometheus/ -GO_PKG_BUILD_PKG:=github.com/prometheus/prometheus/cmd/prometheus/ - -GO_PKG_LDFLAGS_X:=\ - github.com/prometheus/common/version.Version=v$(PKG_VERSION) \ - github.com/prometheus/common/version.Revision=$(PKG_VERSION) \ - github.com/prometheus/common/version.Branch="release" \ - github.com/prometheus/common/version.BuildUser=openwrt \ - github.com/prometheus/common/version.BuildDate=$(SOURCE_DATE_EPOCH) - -include $(INCLUDE_DIR)/package.mk -include ../../lang/golang/golang-package.mk - -define Package/prometheus/Default - TITLE:=Monitoring system & time series database - USERID:=prometheus=112:prometheus=112 - URL:=http://prometheus.io - DEPENDS:=$(GO_ARCH_DEPENDS) -endef - -define Package/prometheus -$(call Package/prometheus/Default) - SECTION:=utils - CATEGORY:=Utilities -endef - -define Package/prometheus/description -Prometheus, a Cloud Native Computing Foundation project, is a systems and -service monitoring system. It collects metrics from configured targets at given -intervals, evaluates rule expressions, displays the results, and can trigger -alerts if some condition is observed to be true. - -Default tsdb path is /srv/prometheus, you might want to edit /etc/config/prometheus -in order to place it on USB storage or external SD card. -endef - -define Package/prometheus/install - $(call GoPackage/Package/Install/Bin,$(1)) - - $(CP) ./files/* $(1)/ -endef - -define Package/prometheus/conffiles -/etc/prometheus.yml -endef - -$(eval $(call GoBinPackage,prometheus)) -$(eval $(call BuildPackage,prometheus)) diff --git a/utils/prometheus/files/etc/init.d/prometheus b/utils/prometheus/files/etc/init.d/prometheus deleted file mode 100755 index 99b4640b23..0000000000 --- a/utils/prometheus/files/etc/init.d/prometheus +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=70 - -USE_PROCD=1 -PROG=/usr/bin/prometheus -CONFFILE=/etc/prometheus.yml - -start_service() { - local config_file - local storage_tsdb_path - local web_listen_address - config_load "prometheus" - config_get config_file prometheus config_file "$CONFFILE" - config_get storage_tsdb_path prometheus storage_tsdb_path "/srv/prometheus" - config_get web_listen_address prometheus web_listen_address "127.0.0.1:9090" - - # Create tsdb dir & permissions if needed - if [ ! -d "$storage_tsdb_path" ]; then - mkdir "$storage_tsdb_path" - chown prometheus:prometheus "$storage_tsdb_path" - fi; - - procd_open_instance - procd_set_param command "$PROG" - procd_append_param command --config.file="$config_file" - procd_append_param command --storage.tsdb.path="$storage_tsdb_path" - procd_append_param command --web.listen-address="$web_listen_address" - procd_append_param user "prometheus" - procd_set_param file "$config_file" - procd_set_param respawn - procd_close_instance -} diff --git a/utils/prometheus/files/etc/prometheus.yml b/utils/prometheus/files/etc/prometheus.yml deleted file mode 100644 index af33d8704f..0000000000 --- a/utils/prometheus/files/etc/prometheus.yml +++ /dev/null @@ -1,29 +0,0 @@ -# my global config -global: - scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. - evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. - # scrape_timeout is set to the global default (10s). - -# Alertmanager configuration -alerting: - alertmanagers: - - static_configs: - - targets: - # - alertmanager:9093 - -# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. -rule_files: - # - "first_rules.yml" - # - "second_rules.yml" - -# A scrape configuration containing exactly one endpoint to scrape: -# Here it's Prometheus itself. -scrape_configs: - # The job name is added as a label `job=` to any timeseries scraped from this config. - - job_name: 'prometheus' - - # metrics_path defaults to '/metrics' - # scheme defaults to 'http'. - - static_configs: - - targets: ['localhost:9090'] diff --git a/utils/prometheus/files/etc/uci-defaults/prometheus-defaults b/utils/prometheus/files/etc/uci-defaults/prometheus-defaults deleted file mode 100755 index 9c537d2e82..0000000000 --- a/utils/prometheus/files/etc/uci-defaults/prometheus-defaults +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -[ -e /etc/config/prometheus ] || touch /etc/config/prometheus - -uci -q get prometheus.prometheus || { - uci -q batch <` to any timeseries scraped from this config. - - job_name: 'prometheus' - - # metrics_path defaults to '/metrics' - # scheme defaults to 'http'. - - static_configs: - - targets: ['localhost:9090'] diff --git a/utils/prometheus/test.sh b/utils/prometheus/test.sh deleted file mode 100644 index 2089454626..0000000000 --- a/utils/prometheus/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -prometheus --version 2>&1 | grep "$2"