# llamafilm/qsys-plugin-prometheus-exporter architecture

> Architecture diagram of the GitHub repository llamafilm/qsys-plugin-prometheus-exporter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/llamafilm/qsys-plugin-prometheus-exporter
- Repository: https://github.com/llamafilm/qsys-plugin-prometheus-exporter

## Overview

This Q-SYS plugin exposes Core metrics over HTTP for Prometheus scraping. The documented workflow is that the plugin obtains metrics from an enabled Core Status component and serves them on port 10006; optional configuration adds custom pin values and packet counters. The tree suggests separate plugin, runtime, and property modules, but no source excerpts were provided, so internal calls and module responsibilities beyond those names cannot be verified. Edges below reflect README-documented relationships only.

Main entry points: [`runtime.lua`](https://github.com/llamafilm/qsys-plugin-prometheus-exporter/blob/main/runtime.lua) (Plugin HTTP exporter), [`properties.lua`](https://github.com/llamafilm/qsys-plugin-prometheus-exporter/blob/main/properties.lua) (Custom metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_plugin["Plugin runtime"]
  node_plugin_runtime["Plugin HTTP exporter<br/>[runtime.lua]"]
  node_plugin_entry["Plugin integration<br/>[plugin.lua]"]
end

subgraph group_configuration["Metric configuration"]
  node_custom_config["Custom metrics<br/>[properties.lua]"]
end

node_qsys["Q-SYS Core"]
node_status["Core Status"]
node_aes67_atmos["AES67 / Atmos receivers"]
node_scraper(("Prometheus scraper"))

node_qsys -->|"hosts"| node_status
node_plugin_runtime -->|"reads metrics"| node_status
node_plugin_runtime -->|"serves HTTP metrics"| node_scraper
node_plugin_runtime -.->|"reads optional counters"| node_aes67_atmos
node_custom_config -->|"configures pin metrics"| node_plugin_runtime

click node_plugin_runtime "https://github.com/llamafilm/qsys-plugin-prometheus-exporter/blob/main/runtime.lua"
click node_plugin_entry "https://github.com/llamafilm/qsys-plugin-prometheus-exporter/blob/main/plugin.lua"
click node_custom_config "https://github.com/llamafilm/qsys-plugin-prometheus-exporter/blob/main/properties.lua"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin_runtime,node_plugin_entry toneBlue
class node_custom_config toneAmber
class node_qsys,node_status,node_aes67_atmos,node_scraper toneIndigo
```

## Components

### Plugin runtime

- [Plugin HTTP exporter](https://github.com/llamafilm/qsys-plugin-prometheus-exporter/blob/main/runtime.lua): `runtime.lua`
- [Plugin integration](https://github.com/llamafilm/qsys-plugin-prometheus-exporter/blob/main/plugin.lua): `plugin.lua`

### Metric configuration

- [Custom metrics](https://github.com/llamafilm/qsys-plugin-prometheus-exporter/blob/main/properties.lua): `properties.lua`

### Other components

- **Q-SYS Core**
- **Core Status**
- **AES67 / Atmos receivers**
- **Prometheus scraper**

## Connections

- Q-SYS Core → Core Status: hosts (evidence: `README.md`)
- Plugin HTTP exporter → Core Status: reads metrics (evidence: `README.md`)
- Plugin HTTP exporter → Prometheus scraper: serves HTTP metrics (evidence: `README.md`)
- Plugin HTTP exporter → AES67 / Atmos receivers: reads optional counters (evidence: `README.md`)
- Custom metrics → Plugin HTTP exporter: configures pin metrics (evidence: `README.md`)
