229 lines
9.9 KiB
YAML
229 lines
9.9 KiB
YAML
# ==============================================================================
|
|
# vmagent Scrape Configuration
|
|
# ==============================================================================
|
|
#
|
|
# HOW TO ADD A NEW ENDPOINT:
|
|
# 1. Scroll to the TEMPLATES section at the bottom of this file
|
|
# 2. Find the template matching your endpoint type
|
|
# 3. Copy the entire block (everything between the dashes)
|
|
# 4. Paste it into the ACTIVE JOBS section below
|
|
# 5. Fill in the IP addresses, hostnames, and site label
|
|
# 6. Restart vmagent: podman-compose restart vmagent
|
|
#
|
|
# LABEL CONVENTIONS:
|
|
# site: Short name for the physical/logical site (e.g., "HQ", "Branch1")
|
|
# host_name: Friendly hostname of the monitored machine
|
|
# dc_name: Domain controller name
|
|
#
|
|
# ==============================================================================
|
|
|
|
global:
|
|
scrape_interval: 15s
|
|
scrape_timeout: 30s
|
|
|
|
scrape_configs:
|
|
|
|
# ==============================================================================
|
|
# ACTIVE JOBS — your configured endpoints live here
|
|
# ==============================================================================
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# vmagent self-monitoring — always keep this, do not remove
|
|
# ----------------------------------------------------------------------------
|
|
- job_name: vmagent
|
|
scrape_interval: 30s
|
|
static_configs:
|
|
- targets: ["vmagent:8429"]
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Linux host — the machine running this container stack (node_exporter)
|
|
# node_exporter runs as part of the compose stack, no additional setup needed.
|
|
# ----------------------------------------------------------------------------
|
|
- job_name: linux-host
|
|
scrape_interval: 30s
|
|
static_configs:
|
|
- targets: ["node-exporter:9100"]
|
|
labels:
|
|
host_name: "HOSTNAME" # REPLACE: short hostname of this machine
|
|
site: "SITE" # REPLACE: site name (e.g., "HQ")
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Uptime Kuma — availability monitoring metrics
|
|
# Set credentials in .env (KUMA_SCRAPE_USER / KUMA_SCRAPE_PASSWORD)
|
|
# then uncomment this job after completing initial Uptime Kuma setup.
|
|
# ----------------------------------------------------------------------------
|
|
# - job_name: uptime_kuma
|
|
# scrape_interval: 30s
|
|
# static_configs:
|
|
# - targets: ["uptime-kuma:3001"]
|
|
# basic_auth:
|
|
# username: "KUMA_SCRAPE_USER" # REPLACE with your Kuma username
|
|
# password: "KUMA_SCRAPE_PASSWORD" # REPLACE with your Kuma password
|
|
# relabel_configs:
|
|
# - target_label: job
|
|
# replacement: uptime_kuma
|
|
|
|
# ==============================================================================
|
|
# TEMPLATES — copy a block into ACTIVE JOBS above and fill in your values
|
|
# ==============================================================================
|
|
#
|
|
# Each template includes:
|
|
# - What exporter is required on the target machine
|
|
# - Default port
|
|
# - Labels to fill in
|
|
# - Any special configuration notes
|
|
#
|
|
# ==============================================================================
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# TEMPLATE: Windows Domain Controller
|
|
# ------------------------------------------------------------------------------
|
|
# Exporter: windows_exporter (formerly wmi_exporter)
|
|
# Install: https://github.com/prometheus-community/windows_exporter/releases
|
|
# Port: 9182 (default)
|
|
# Notes: Default collectors are sufficient for DC monitoring.
|
|
# For additional collectors, see the windows_exporter README.
|
|
# ------------------------------------------------------------------------------
|
|
#
|
|
# - job_name: domain-controllers
|
|
# scrape_interval: 30s
|
|
# scrape_timeout: 10s
|
|
# static_configs:
|
|
# - targets: ["192.168.X.X:9182"]
|
|
# labels:
|
|
# dc_name: "DC-NAME" # REPLACE: domain controller hostname (e.g., "DC01")
|
|
# site: "SITE" # REPLACE: site name (e.g., "HQ")
|
|
# # Add additional DCs below — copy the block above for each one
|
|
# # - targets: ["192.168.X.Y:9182"]
|
|
# # labels:
|
|
# # dc_name: "DC-NAME2"
|
|
# # site: "SITE"
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# TEMPLATE: Hyper-V Host
|
|
# ------------------------------------------------------------------------------
|
|
# Exporter: windows_exporter
|
|
# Install: https://github.com/prometheus-community/windows_exporter/releases
|
|
# Port: 9182 (default)
|
|
# Notes: Requires the hyperv collector enabled on the windows_exporter.
|
|
# Install with: windows_exporter.exe --collectors.enabled defaults,hyperv
|
|
# Or set via the windows_exporter service config.
|
|
# scrape_timeout is set high (25s) because hyperv metrics can be slow.
|
|
# ------------------------------------------------------------------------------
|
|
#
|
|
# - job_name: hyperv-hosts
|
|
# scrape_interval: 30s
|
|
# scrape_timeout: 25s
|
|
# static_configs:
|
|
# - targets: ["192.168.X.X:9182"]
|
|
# labels:
|
|
# host_name: "HOST-NAME" # REPLACE: Hyper-V host hostname (e.g., "HV01")
|
|
# site: "SITE" # REPLACE: site name
|
|
# # Add additional Hyper-V hosts below
|
|
# # - targets: ["192.168.X.Y:9182"]
|
|
# # labels:
|
|
# # host_name: "HOST-NAME2"
|
|
# # site: "SITE"
|
|
# params:
|
|
# collect[]:
|
|
# - defaults
|
|
# - hyperv
|
|
# - cpu_info
|
|
# - physical_disk
|
|
# - process
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# TEMPLATE: Windows General Purpose Server
|
|
# ------------------------------------------------------------------------------
|
|
# Exporter: windows_exporter
|
|
# Install: https://github.com/prometheus-community/windows_exporter/releases
|
|
# Port: 9182 (default)
|
|
# Notes: Uses default collectors. Suitable for file servers, app servers,
|
|
# print servers, or any Windows server not classified as DC or Hyper-V.
|
|
# Add specific collectors to the params block if needed.
|
|
# ------------------------------------------------------------------------------
|
|
#
|
|
# - job_name: windows-servers
|
|
# scrape_interval: 30s
|
|
# scrape_timeout: 15s
|
|
# static_configs:
|
|
# - targets: ["192.168.X.X:9182"]
|
|
# labels:
|
|
# host_name: "SERVER-NAME" # REPLACE: hostname (e.g., "FS01")
|
|
# site: "SITE" # REPLACE: site name
|
|
# role: "file-server" # OPTIONAL: add a role label to distinguish server types
|
|
# # Add additional servers below
|
|
# # - targets: ["192.168.X.Y:9182"]
|
|
# # labels:
|
|
# # host_name: "SERVER-NAME2"
|
|
# # site: "SITE"
|
|
# # role: "app-server"
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# TEMPLATE: Linux Server
|
|
# ------------------------------------------------------------------------------
|
|
# Exporter: node_exporter
|
|
# Install: https://github.com/prometheus/node_exporter/releases
|
|
# Or via package manager: apt install prometheus-node-exporter
|
|
# Or run as a container: docker run -d --net="host" --pid="host"
|
|
# -v "/:/host:ro,rslave"
|
|
# prom/node-exporter --path.rootfs=/host
|
|
# Port: 9100 (default)
|
|
# Notes: The node_exporter already running in this compose stack covers THIS
|
|
# host. Use this template for OTHER Linux machines on the network.
|
|
# ------------------------------------------------------------------------------
|
|
#
|
|
# - job_name: linux-servers
|
|
# scrape_interval: 30s
|
|
# scrape_timeout: 10s
|
|
# static_configs:
|
|
# - targets: ["192.168.X.X:9100"]
|
|
# labels:
|
|
# host_name: "LINUX-HOST-NAME" # REPLACE: hostname
|
|
# site: "SITE" # REPLACE: site name
|
|
# # Add additional Linux servers below
|
|
# # - targets: ["192.168.X.Y:9100"]
|
|
# # labels:
|
|
# # host_name: "LINUX-HOST-NAME2"
|
|
# # site: "SITE"
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# TEMPLATE: SNMP Device (switches, routers, APs, UPS, etc.)
|
|
# ------------------------------------------------------------------------------
|
|
# Exporter: snmp_exporter (must be enabled in podman-compose.yml)
|
|
# Config: snmp_exporter/snmp.yml — download a pre-built config from:
|
|
# https://github.com/prometheus/snmp_exporter/releases
|
|
# The "snmp.yml" in that release covers most common network gear.
|
|
# Port: 9116 (snmp_exporter listens here; SNMP itself uses UDP 161 on targets)
|
|
# Modules: "if_mib" = interface stats (works on almost any device)
|
|
# Other modules depend on vendor — check the snmp.yml for available ones.
|
|
# Steps:
|
|
# 1. Uncomment snmp-exporter in podman-compose.yml
|
|
# 2. Place your snmp.yml in snmp_exporter/snmp.yml
|
|
# 3. Uncomment and fill in this job block
|
|
# 4. Restart the stack: podman-compose up -d
|
|
# Notes: Each target is passed as a URL parameter to snmp_exporter.
|
|
# The exporter itself must be reachable from vmagent (it's on the
|
|
# monitoring network), and it must reach the SNMP device via the host.
|
|
# ------------------------------------------------------------------------------
|
|
#
|
|
# - job_name: snmp-devices
|
|
# scrape_interval: 60s
|
|
# scrape_timeout: 30s
|
|
# static_configs:
|
|
# - targets:
|
|
# - "192.168.X.X" # REPLACE: IP of SNMP device (switch, router, AP, etc.)
|
|
# # Add more SNMP device IPs here
|
|
# # - "192.168.X.Y"
|
|
# labels:
|
|
# site: "SITE" # REPLACE: site name
|
|
# params:
|
|
# module: [if_mib] # REPLACE: SNMP module to use (see snmp_exporter/snmp.yml)
|
|
# # Common: if_mib, cisco_wlc, apc_ups, pdu, printer_mib
|
|
# relabel_configs:
|
|
# - source_labels: [__address__]
|
|
# target_label: __param_target
|
|
# - source_labels: [__param_target]
|
|
# target_label: instance
|
|
# - target_label: __address__
|
|
# replacement: snmp-exporter:9116 # points vmagent at the snmp_exporter container
|