Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ix-dev/community/node-exporter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Node Exporter

Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors.

https://github.com/prometheus/node_exporter
40 changes: 40 additions & 0 deletions ix-dev/community/node-exporter/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
app_version: 1.10.2
capabilities: []
categories:
- monitoring
changelog_url: https://github.com/prometheus/node_exporter/releases
date_added: '2025-12-30'
description: Prometheus exporter for hardware and OS metrics exposed by *NIX kernels,
written in Go with pluggable metric collectors.
home: https://github.com/prometheus/node_exporter
host_mounts:
- description: Required to read the processes information.
host_path: /proc
- description: Required to read the system information.
host_path: /sys
- description: Required to read the root filesystem information.
host_path: /
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/prometheus/icon/color/prometheus-icon-color.png
keywords:
- prometheus
- exporter
- metrics
- monitoring
lib_version: 2.1.74
lib_version_hash: 7ee6d601c170a17717109c91dde4297ae669728a57405cef7f49b8ef931a07d1
maintainers:
- email: dev@truenas.com
name: truenas
url: https://www.truenas.com/
name: node-exporter
run_as_context:
- description: Node Exporter runs as non-root user.
gid: 568
group_name: apps
uid: 568
user_name: apps
sources:
- https://github.com/prometheus/node_exporter
title: Node Exporter
train: community
version: 1.0.0
9 changes: 9 additions & 0 deletions ix-dev/community/node-exporter/item.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
categories:
- monitoring
icon_url: https://raw.githubusercontent.com/cncf/artwork/master/projects/prometheus/icon/color/prometheus-icon-color.png
screenshots: []
tags:
- prometheus
- exporter
- metrics
- monitoring
8 changes: 8 additions & 0 deletions ix-dev/community/node-exporter/ix_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
images:
image:
repository: quay.io/prometheus/node-exporter
tag: "v1.10.2"
pull_policy: IfNotPresent

consts:
container_name: node-exporter
196 changes: 196 additions & 0 deletions ix-dev/community/node-exporter/questions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
groups:
- name: Node Exporter Configuration
description: Configure Node Exporter
- name: User and Group Configuration
description: Configure User and Group for Node Exporter
- name: Network Configuration
description: Configure Network for Node Exporter
- name: Storage Configuration
description: Configure Storage for Node Exporter
- name: Resources Configuration
description: Configure Resources for Node Exporter

questions:
- variable: TZ
group: Node Exporter Configuration
label: Timezone
schema:
type: string
default: Etc/UTC
required: true
$ref:
- definitions/timezone

- variable: node_exporter
group: Node Exporter Configuration
label: Node Exporter Settings
schema:
type: dict
attrs:
- variable: collector_mount_points_exclude
label: Exclude Mount Points
description: Regex of mount points to exclude from the filesystem collector.
schema:
type: string
default: "^/(sys|proc|dev|host|etc)($|/)"
- variable: additional_args
label: Additional Arguments
schema:
type: list
default: []
items:
- variable: arg
label: Argument
schema:
type: string
required: true

- variable: run_as
group: User and Group Configuration
label: User and Group Configuration
schema:
type: dict
attrs:
- variable: user
label: UserID
schema:
type: int
default: 568
required: true
- variable: group
label: GroupID
schema:
type: int
default: 568
required: true

- variable: network
group: Network Configuration
label: Network Configuration
schema:
type: dict
attrs:
- variable: host_network
label: Host Network
description: |
Use the host network stack.</br>
Note: This will disable the port configuration below and the application will bind directly to the host port.
schema:
type: boolean
default: true
- variable: web_port
label: Web Port
schema:
type: dict
show_if: [["host_network", "=", false]]
attrs:
- variable: bind_mode
label: Port Bind Mode
description: |
The port bind mode.</br>
- Publish: The port will be published on the host for external access.</br>
- Expose: The port will be exposed for inter-container communication.</br>
- None: The port will not be exposed or published.</br>
Note: If the Dockerfile defines an EXPOSE directive,
the port will still be exposed for inter-container communication regardless of this setting.
schema:
type: string
default: "published"
enum:
- value: "published"
description: Publish port on the host for external access
- value: "exposed"
description: Expose port for inter-container communication
- value: ""
description: None
- variable: port_number
label: Port Number
schema:
type: int
default: 9100
min: 1
max: 65535
required: true
- variable: host_ips
label: Host IPs
description: IPs on the host to bind this port
schema:
type: list
show_if: [["bind_mode", "=", "published"]]
default: []
items:
- variable: ip
label: IP
schema:
type: string
required: true

- variable: storage
group: Storage Configuration
label: Storage Configuration
schema:
type: dict
attrs:
- variable: additional_storage
label: Additional Storage
schema:
type: list
default: []
items:
- variable: storage
label: Storage
schema:
type: dict
attrs:
- variable: mount_path
label: Mount Path
schema:
type: string
required: true
- variable: type
label: Type
schema:
type: string
default: host_path
enum:
- value: host_path
description: Host Path
- variable: host_path_config
label: Host Path Configuration
schema:
type: dict
attrs:
- variable: path
label: Host Path
schema:
type: string
required: true
- variable: read_only
label: Read Only
schema:
type: boolean
default: false

- variable: resources
group: Resources Configuration
label: Resources Configuration
schema:
type: dict
attrs:
- variable: limits
label: Limits
schema:
type: dict
attrs:
- variable: cpus
label: CPUs
schema:
type: float
default: 1.0
required: true
- variable: memory
label: Memory (MB)
schema:
type: int
default: 512
required: true
36 changes: 36 additions & 0 deletions ix-dev/community/node-exporter/templates/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% set tpl = ix_lib.base.render.Render(values) %}

{% set container = tpl.add_container(values.consts.container_name, "image") %}
{% do container.set_user(values.run_as.user, values.run_as.group) %}
{% do container.clear_caps() %}

{# Mounts for node-exporter to see the host #}
{% do container.add_storage("/host/proc", {"type": "host_path", "read_only": true, "host_path_config": {"path": "/proc"}}) %}
{% do container.add_storage("/host/sys", {"type": "host_path", "read_only": true, "host_path_config": {"path": "/sys"}}) %}

{% if values.network.host_network %}
{% do container.set_network_mode("host") %}
{% else %}
{% do container.add_port(values.network.web_port) %}
{% endif %}

{% set args = ["--path.procfs=/host/proc", "--path.sysfs=/host/sys"] %}
{% if values.node_exporter.collector_mount_points_exclude %}
{% do args.append("--collector.filesystem.mount-points-exclude=" + values.node_exporter.collector_mount_points_exclude) %}
{% endif %}
{% if values.node_exporter.additional_args %}
{% do args.extend(values.node_exporter.additional_args) %}
{% endif %}
{% do container.set_command(args) %}

{% do container.healthcheck.set_test("wget", {"port": values.network.web_port.port_number, "path": "/"}) %}

{% for store in values.storage.additional_storage %}
{% do container.add_storage(store.mount_path, store) %}
{% endfor %}

{% if not values.network.host_network %}
{% do tpl.portals.add(values.network.web_port) %}
{% endif %}

{{ tpl.render() | tojson }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
TZ: Etc/UTC
node_exporter:
collector_mount_points_exclude: "^/(sys|proc|dev|host|etc)($|/)"
additional_args: []
run_as:
user: 568
group: 568
network:
host_network: true
web_port:
bind_mode: published
port_number: 9100
storage:
additional_storage: []
resources:
limits:
cpus: 1.0
memory: 512