Skip to content
Prompt

unpoller — Cursor Rules

by unpoller

AI Summary

UnPoller is a Go application that collects metrics from UniFi network controllers and exports them to various backends (InfluxDB, Prometheus, Loki, DataDog). The architecture is plugin-based with input and output plugins. 1. Create new package in (e.g., ) 2. Implement interface from

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "unpoller — Cursor Rules" prompt rules to my project.
Repository: https://github.com/unpoller/unpoller

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Application: Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus

Project Overview

UnPoller is a Go application that collects metrics from UniFi network controllers and exports them to various backends (InfluxDB, Prometheus, Loki, DataDog). The architecture is plugin-based with input and output plugins.

Core Components

• main.go: Entry point, loads plugins via blank imports • pkg/poller/: Core library providing input/output interfaces and plugin management • pkg/inputunifi/: Input plugin for UniFi controller data collection • pkg/influxunifi/: Output plugin for InfluxDB • pkg/promunifi/: Output plugin for Prometheus • pkg/lokiunifi/: Output plugin for Loki • pkg/datadogunifi/: Output plugin for DataDog • pkg/webserver/: Web server for health checks and metrics • pkg/mysqlunifi/: MySQL output plugin

Plugin System

• Plugins are loaded via blank imports (_ "github.com/unpoller/unpoller/pkg/inputunifi") • Input plugins implement the Input interface from pkg/poller/inputs.go • Output plugins implement the Output interface from pkg/poller/outputs.go • The poller core automatically discovers and initializes imported plugins • Configuration is automatically unmarshaled from config files (TOML/JSON/YAML) and environment variables

Go Standards

• Use Go 1.25.5+ features • Follow standard Go formatting (gofmt) • Use golangci-lint with the project's .golangci.yaml configuration • Enable linters: nlreturn, revive, tagalign, testpackage, wsl_v5 • Use //nolint:gci for import ordering when needed

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 3d ago
Active
Adoption1K+ stars on GitHub
2.6k ★ · Popular
DocsREADME + description
Well-documented

GitHub Signals

Stars2.6k
Forks174
Issues5
Updated3d ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more