Apache License 2.0

项目介绍

lest/prometheus-rpm 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Apache License 2.0 许可证,目前获得 249 个 Star、103 次 Fork。

仓库全名
lest/prometheus-rpm
开源许可证
Apache License 2.0
Star 数
249
Fork 数
103
未关闭 Issue
10

README 摘要

Prometheus RPM Packages The repository contains the files needed to build [Prometheus][1] RPM packages for CentOS 7 & 8 and CentOS Stream 9. Installing The packages are available in [the packagecloud repository][2] and can be used by adding the following /etc/yum.repos.d/prometheus.repo: CentOS Adding a new exporter Auto generation 1. Add a new section under packages in templating.yaml with the required information…

完整内容见 GitHub 原始 README 或本页 。

常见问题

prometheus-rpm 用什么语言开发?

主要使用 Python 编写,采用 Apache License 2.0 许可证,目前有 249 个 Star。

prometheus-rpm 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 prometheus-rpm 的源码?

可以直接克隆仓库:git clone https://github.com/lest/prometheus-rpm.git,默认分支为 master;安装与运行步骤见仓库 README。

prometheus-rpm 最近还在维护吗?

仓库最近一次更新为 18 小时前,当前有 10 个未关闭 Issue;Star 数为 249,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Prometheus RPM Packages

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
464
价值分
180
活跃状态
活跃

语言占比

Go Template
Makefile
Python
Shell

README

Prometheus RPM Packages

Build Status Lint Status Update Status

The repository contains the files needed to build Prometheus RPM packages for CentOS 7 & 8 and CentOS Stream 9.

Installing

The packages are available in the packagecloud repository and can be used by adding the following /etc/yum.repos.d/prometheus.repo:

CentOS

[prometheus]
name=prometheus
baseurl=https://packagecloud.io/prometheus-rpm/release/el/$releasever/$basearch
repo_gpgcheck=1
enabled=1
gpgkey=https://packagecloud.io/prometheus-rpm/release/gpgkey
       https://raw.githubusercontent.com/lest/prometheus-rpm/master/RPM-GPG-KEY-prometheus-rpm
gpgcheck=1
metadata_expire=300

Adding a new exporter

Auto generation

  1. Add a new section under packages in templating.yaml with the required information (overriding any defaults if required).
  2. Create a new directory with the name of the exporter and populate it with a file named <exporter_name>.default which will contain the default environment variables passed to the init and unit files.
  3. Once this is done add this exporter to the list of AUTO_GENERATED exporters in Makefile.
  4. Test that you can build this RPM using the command make <exporter_name>.

Custom

  1. Add the exporter to the list of MANUAL in the file Makefile.
  2. Make a new directory with the same name as the exporter.
  3. Populate this directory with all the required files to build the RPM.
  4. Test that you can build this RPM using the command make <exporter_name>.

Build RPMs manually

Build all packages with:

make all

or build a single package only, e.g.:

make node_exporter

The resulting RPMs will be created in the _dist7 or _dist8 directories depending on the version of CentOS that they were built for.

Ansible role

An Ansible role which installs Prometheus packages from these RPMs is available in Github or in Galaxy.

评论

暂无评论