Funtoo Telemetry Phase3 Activity

From Funtoo
< Funtoo:Telemetry‎ | Activities
Revision as of 05:37, March 18, 2022 by Siris (talk | contribs) (adding jira issue)
Jump to navigation Jump to search
   Activity Info
Parent ProjectFuntoo:Telemetry
Start Date15 March 2022
End DateNone
Jira IssueFL-9559
Activity KindDevelopment
StatusActive
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)