Browse Source

Merge pull request #6306 from aparcar/fancy_release

prometheus-node-exporter-lua: handle fancy release
lilik-openwrt-22.03
champtar 7 years ago
committed by GitHub
parent
commit
c8c1841abf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      utils/prometheus-node-exporter-lua/Makefile
  2. +1
    -1
      utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/openwrt.lua

+ 1
- 1
utils/prometheus-node-exporter-lua/Makefile View File

@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=prometheus-node-exporter-lua
PKG_VERSION:=2017.12.08
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_MAINTAINER:=Christian Simon <simon@swine.de>
PKG_LICENSE:=Apache-2.0


+ 1
- 1
utils/prometheus-node-exporter-lua/files/usr/lib/lua/prometheus-collectors/openwrt.lua View File

@ -6,7 +6,7 @@ local labels = {
board_name = string.sub(get_contents("/tmp/sysinfo/board_name"), 1, -2)
}
for k, v in string.gmatch(get_contents("/etc/openwrt_release"), "(DISTRIB_%w+)='(%w+)'\n") do
for k, v in string.gmatch(get_contents("/etc/openwrt_release"), "(DISTRIB_%w+)='(.-)'\n") do
if k == "DISTRIB_ID" then
labels["id"] = v
elseif k == "DISTRIB_RELEASE" then


Loading…
Cancel
Save