Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Funtoo:Telemetry/Activities/Phase3"

From Funtoo
Jump to navigation Jump to search
(adding jira issue)
(change status to ongoing)
Line 2: Line 2:
|summary=Engineer a Prometheus Exporter for Funtoo Linux
|summary=Engineer a Prometheus Exporter for Funtoo Linux
|kind=development
|kind=development
|status=active
|status=ongoing
|project=Funtoo:Telemetry
|project=Funtoo:Telemetry
|start_date=2022-03-15
|start_date=2022-03-15

Revision as of 08:41, June 21, 2022

   Activity Info
Parent ProjectFuntoo:Telemetry
Start Date15 March 2022
End DateNone
Jira IssueFL-9559
Activity KindDevelopment
StatusOngoing
PreviousPhase1

Overview

Engineer a Prometheus Exporter for Funtoo Linux

Objectives

Here are the general objectives of Phase 1 of the Telemetry Project:

  • Engineer a custom Golang Funtoo Prometheus exporter on [code.funtoo.org code.funtoo.org] that can expose all types of fun and useful Prometheus metrics about a Funtoo Linux system.
  • Create a Funtoo Linux Grafana dashboard template that Funtoo Users in a local Grafana instance to visualize a Funtoo Linux system using time series Prometheus metrics.

Research and Development

To accomplish the first objective this Project, build a Prometheus Exporter for Funtoo Linux, the research below is on how to derive system specific information about Funtoo Linux so that that this information can be quickly transcribed into meaningful Prometheus metrics.

External Tools

There are various external tools that help solve this problem including pre-existing Prometheus based ones like node_exporter. Node exporter should definitely be referenced for direct Golang implementation inspiration of various metric collection functions.

Some other tools that give different perspective on system information collection that possibly can be reversed engineered into Golang:

Metrics

Here is a working list of possible metrics to expose via the Funtoo Linux Prometheus Exporter, they associated metric type, and metric value:

  • Metric name: funtoo_kits_packages_install_count
    • Type: Counter
    • Value: Integer
    • About: The number of CatPkgs installed on a Funtoo Linux system
  • Metric name: funtoo_kits_last_sync
    • Type: Counter
    • Value: Unix Epoch Time (seconds)
    • About: The last time a ego sync was ran to sync the Funtoo Linux kits
  • Metric name: funtoo_kits_info
    • Type: gauge
    • Value: 1
    • About: Includes various labels that map to kit name and kit version, see output from the ego kit command
  • Metric name: funtoo_profiles_info
    • Type: gauge
    • Value: 1
    • About: Includes various labels with metadata specifically about the enable Funtoo Linux profiles, see output from the ego profile
  • Metric name: funtoo_os_info
    • Type: gauge
    • Value: 1
    • About: Includes various labels with metadata specifically about the Funtoo Linux OS version, possibly including OS version itself, version of ego installed, etc.
  • Metric name: funtoo_build_info
    • Type: gauge
    • Value: 1
    • About: Includes various labels with metadata specifically about the Funtoo Linux Prometheus Exporter, a perfect example is the prometheus_build_info metric that Prometheus exports about itself, which includes goversion (version of Golang binary is built with), revision (git commit hash version was built off of), and version (semantic release version of the exporter, usually maps to a git tag)