diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 49b2c512..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/documentation" - schedule: - interval: "weekly" - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 00000000..ca90deff --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base", + "default:automergeDigest", + "helpers:pinGitHubActionDigestsToSemver" + ], + "minimumReleaseAge": "7 days", + "internalChecksFilter": "strict", + "packageRules": [ + { + "description": "Automerge GitHub Actions updates, including majors, when checks pass", + "matchManagers": ["github-actions"], + "automerge": true + }, + { + "description": "Automerge TypeScript minor and patch updates when checks pass", + "matchPackageNames": ["typescript"], + "matchUpdateTypes": ["minor", "patch", "pin", "digest"], + "automerge": true + } + ] +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3816529..e0a875eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,8 @@ name: Build on: pull_request: + push: + branches: [master] permissions: contents: read @@ -14,14 +16,22 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + - uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2 + with: + check_hidden: true + path: documentation/docs + skip: '*.png,*.ico' - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - node-version: 24.x + node-version: 24 cache: yarn cache-dependency-path: documentation/yarn.lock - name: Install Dependencies working-directory: documentation run: yarn install --frozen-lockfile + - name: Lint Markdown + working-directory: documentation + run: yarn lint - name: Build website working-directory: documentation run: yarn build diff --git a/.gitignore b/.gitignore index e808b3dd..623449b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Dependencies node_modules -yarn.lock # Production build diff --git a/README.md b/README.md index c2e43d05..7799f071 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,14 @@ -# UnPoller Dot Com +# unpoller.com -This repository contains the files that create https://unpoller.com. +Source for [https://unpoller.com](https://unpoller.com). Built with [Docusaurus 3](https://docusaurus.io/). -The application used is [Docusaurus](https://docusaurus.io). +```console +cd documentation +yarn install +yarn start # local dev server +yarn build # production build +yarn lint # markdownlint-cli2 (same as CI) +codespell docs # brew install codespell +``` + +Push to `master` deploys to GitHub Pages. diff --git a/documentation/.markdownlint-cli2.jsonc b/documentation/.markdownlint-cli2.jsonc new file mode 100644 index 00000000..da5a5d85 --- /dev/null +++ b/documentation/.markdownlint-cli2.jsonc @@ -0,0 +1,34 @@ +{ + "config": { + "MD001": false, + "MD002": false, + "MD004": false, + "MD007": false, + "MD009": false, + "MD010": false, + "MD012": false, + "MD013": { "line_length": 110, "tables": false, "code_blocks": false }, + "MD022": false, + "MD025": false, + "MD026": false, + "MD030": false, + "MD031": false, + "MD032": false, + "MD033": false, + "MD034": false, + "MD036": false, + "MD037": false, + "MD040": false, + "MD041": false, + "MD046": false, + "MD049": false, + "MD050": false, + "MD055": false, + "MD059": false, + "MD060": false + }, + "ignores": [ + "node_modules/**", + "build/**" + ] +} diff --git a/documentation/README.md b/documentation/README.md index 8e8c1292..f88a3330 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -1,49 +1,12 @@ -# Website +# UnPoller docs -This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator. - -## Installation +This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator. ```console yarn install +yarn start # local dev server +yarn build # production build +yarn lint # markdownlint-cli2 (same as CI) ``` -## Local Development - -This command starts a local development server and open up a browser window. -Most changes are reflected live without having to restart the server. -**Use this when developing locally!** - -```console -yarn start -``` - -## Build - -This command generates static content into the `build` directory and can be served using any static contents hosting service. - -```console -yarn build -``` - - -## Deployment - -If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. - -```console -DEPLOYMENT_BRANCH=gh-pages GIT_USER=username USE_SSH=true yarn deploy -``` - -## MDL Linter - -To run the linter locally, I had to do this on my Mac, but `bundler` may work too. - -```shell -brew install rbenv ruby-build -rbenv install 2.6.5 -# eval "$(rbenv init -)" -rbenv shell 2.6.5 -gem install mdl -mdl . -``` +Push to `master` deploys to GitHub Pages via GitHub Actions. diff --git a/documentation/babel.config.js b/documentation/babel.config.js deleted file mode 100644 index e00595da..00000000 --- a/documentation/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - presets: [require.resolve('@docusaurus/core/lib/babel/preset')], -}; diff --git a/documentation/docs/.mdlrc b/documentation/docs/.mdlrc deleted file mode 100644 index afad0064..00000000 --- a/documentation/docs/.mdlrc +++ /dev/null @@ -1,8 +0,0 @@ -rules '~MD030', # lists may have spaces before them - '~MD041', # do not begin with a header - '~MD002', # first header does not need to be top level - '~MD034', # allow bare URLs because we put them in code blocks... - '~MD046', # do not worry about code block style, it gets confused - '~MD033', # what's wrong with inline html? - '~MD031' # fenced code blocks wrapped in blank lines look terrible in lists. -style "./.style" diff --git a/documentation/docs/.style b/documentation/docs/.style deleted file mode 100644 index f9ff2ffe..00000000 --- a/documentation/docs/.style +++ /dev/null @@ -1,3 +0,0 @@ -all -rule 'MD013', :tables => false, :line_length => 110, :code_blocks => false -rule 'MD007', :indent => 4 diff --git a/documentation/docs/advanced/webserver.md b/documentation/docs/advanced/webserver.md index 81f9969c..de5112ef 100644 --- a/documentation/docs/advanced/webserver.md +++ b/documentation/docs/advanced/webserver.md @@ -58,7 +58,7 @@ Using Docker: ```shell docker pull ghcr.io/unpoller/unpoller -docker -it ghcr.io/unpoller/unpoller -e - +docker run -it ghcr.io/unpoller/unpoller -e - Enter Password: $2a$04$yOE5zjJs2Gg0jsGQpE7j2ucKiNndUGEzpX6BsLoKl0hkxBvE81z8. ``` diff --git a/documentation/docs/dependencies/grafana.md b/documentation/docs/dependencies/grafana.md index 5e0534d6..045c79cd 100644 --- a/documentation/docs/dependencies/grafana.md +++ b/documentation/docs/dependencies/grafana.md @@ -48,7 +48,7 @@ sudo systemctl status grafana-server You need [Homebrew](https://brew.sh): ```shell -/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` ```shell brew install grafana diff --git a/documentation/docs/dependencies/influxdb.md b/documentation/docs/dependencies/influxdb.md index ec51748f..93a3650a 100644 --- a/documentation/docs/dependencies/influxdb.md +++ b/documentation/docs/dependencies/influxdb.md @@ -62,7 +62,7 @@ Start: `sudo systemctl start influxdb` You need [Homebrew](https://brew.sh): ```shell -/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` ```shell @@ -115,13 +115,15 @@ by implementing a retention policy. For example, to hold data for 32 days add th CREATE RETENTION POLICY retention_policy ON unpoller DURATION 32d REPLICATION 1 ``` -If you're using InfluxDB 2.x (not recommended at this time), you can set the retention policy by exec-ing into the container: +If you're using InfluxDB 2.x (not recommended at this time), you can set the retention +policy by exec-ing into the container: ```none docker exec -it unpoller_influxdb_1 /bin/bash ``` -Extracting the unpoller bucket ID from the result of the command `/usr/local/bin/influx bucket ls` (in the example below, it's `0af2f3c9840627f6`): +Extracting the unpoller bucket ID from the result of the command +`/usr/local/bin/influx bucket ls` (in the example below, it's `0af2f3c9840627f6`): ```none root@515481c98cb9:/# /usr/local/bin/influx bucket ls @@ -131,7 +133,8 @@ ID Name Retention Shard group duration Organization ID Schema Type 0af2f3c9840627f6 unpoller infinite 168h0m0s 5b8f04254daaddb6 implicit ``` -And then updating the retention policy with the command `/usr/local/bin/influx bucket update -i 0af2f3c9840627f6 -r 32d`, susbtituting your bucket ID: +And then updating the retention policy with +`/usr/local/bin/influx bucket update -i 0af2f3c9840627f6 -r 32d`, substituting your bucket ID: ```none root@515481c98cb9:/# /usr/local/bin/influx bucket update -i 0af2f3c9840627f6 -r 32d diff --git a/documentation/docs/dependencies/loki.md b/documentation/docs/dependencies/loki.md index ec01900b..ceb8434a 100644 --- a/documentation/docs/dependencies/loki.md +++ b/documentation/docs/dependencies/loki.md @@ -66,11 +66,10 @@ The timeout is `10s`, adjust it if you get timeout errors. ## Examples -The `docker-compose` example below (using Loki and Prometheus) was kindly provided by a community member. -The Loki Docker logging driver if you don't have it installed. +The Docker Compose example below (using Loki and Prometheus) was kindly provided by a community member. +Install the Loki Docker logging driver if you don't have it. ```yaml -version: '3.0' services: unpoller: container_name: unpoller diff --git a/documentation/docs/help/common.md b/documentation/docs/help/common.md index 0789d431..e498764e 100644 --- a/documentation/docs/help/common.md +++ b/documentation/docs/help/common.md @@ -10,7 +10,7 @@ Below are some common solutions and possible symptoms. The number one cause of empty dashboards is an old version of InfluxDB. Make sure you are on version 1.7.x or 1.8.x. **Use of 1.6.x will cause empty dashboards.** -If your DPI dashboards are empty `DPI` is like still disabled. +If your DPI dashboards are empty, DPI is likely still disabled. It must be enabled in both the poller config and in your UniFi controller. Two spots. ### Check the port used to connect to the controller @@ -23,9 +23,9 @@ old firmware) and `443` (or just omitted) if you are using a unifios device (UDM UniFi Poller has great logs that help when troubleshooting. If you're seeking help please enable debug mode and copy/paste some of your logs. All of this data helps figure out what's going on. -Debug mode can be enable in up.conf or by passing the env variable UP_POLLER_DEBUG=true. +Debug mode can be enabled in up.conf or by passing the env variable `UP_POLLER_DEBUG=true`. -Grafana, Prometheus and InfluxDB also have logs files, but they're probably less useful. +Grafana, Prometheus and InfluxDB also have log files, but they're probably less useful. You can still check them for errors. If you are a Docker user then check out [Dozzle](https://dozzle.dev/) @@ -59,7 +59,7 @@ If you're getting errors like this: [ERROR] infdb.Write(bp): {"error":"partial write: field type conflict: input field "tx_power" on measurement "uap_radios" is type integer, already exists as type float dropped="} ``` -This usually indicates a bug was fixed and the resulting fixed has caused an incompatibility +This usually indicates a bug was fixed and the resulting fix has caused an incompatibility with your existing InfluxDB database. This could also indicate you've found a new bug. Please open an issue if you are running the latest version and dropping the database did not solve the error. There are generally two fixes: diff --git a/documentation/docs/help/docker_faq.md b/documentation/docs/help/docker_faq.md index a18f5183..2df084aa 100644 --- a/documentation/docs/help/docker_faq.md +++ b/documentation/docs/help/docker_faq.md @@ -22,15 +22,11 @@ you've been overly warned. You can install a specific version by specifying a version like this: ```shell -docker pull ghcr.io/unpoller/unpoller:latest -``` -or minor version like this: -```shell -docker pull ghcr.io/unpoller/unpoller:latest +docker pull ghcr.io/unpoller/unpoller:v5.1.0 ``` or a major version like this: ```shell -docker pull ghcr.io/unpoller/unpoller:latest +docker pull ghcr.io/unpoller/unpoller:v5 ``` **How can I build from source?** diff --git a/documentation/docs/help/help.md b/documentation/docs/help/help.md index f9b65b1f..95fed7c5 100644 --- a/documentation/docs/help/help.md +++ b/documentation/docs/help/help.md @@ -9,4 +9,4 @@ Discord server. Or [this](https://community.ui.com/questions/UniFi-Poller-Store-UniFi-Controller-Metrics-in-Prometheus-or-InfluxDB/58a0ea34-d2b3-41cd-93bb-d95d3896d1a1) thread on the UI community. -Alternatively, raise an [issue](https://github.com/unpoller/unpoller/issues) on Github. +Alternatively, raise an [issue](https://github.com/unpoller/unpoller/issues) on GitHub. diff --git a/documentation/docs/help/manualbuild.md b/documentation/docs/help/manualbuild.md index 50d3bfe2..1d241718 100644 --- a/documentation/docs/help/manualbuild.md +++ b/documentation/docs/help/manualbuild.md @@ -1,6 +1,11 @@ +--- +id: manualbuild +title: Manual Build +--- + ## Manual package -Recommend reading the note at the bottom if you're using a mac. +Read the note at the bottom if you're using a Mac. 1. Install [Go](https://golang.org/doc/install) 1. Install [GoReleaser](https://goreleaser.com/install/) @@ -17,17 +22,17 @@ Recommend reading the note at the bottom if you're using a mac. ### Manual Build Notes -If you're building linux packages on a mac you can run `brew install rpmbuild gnu-tar` +If you're building Linux packages on a Mac you can run `brew install rpmbuild gnu-tar` to get the additional tools you need. That means you're going to need Homebrew. And if you're going to install Homebrew, or already have, you can simply do something like this to get your Go environment up and build the packages: ```shell brew install rpmbuild gnu-tar go goreleaser/tap/goreleaser -mkdir ~/go/{src,mod} +mkdir -p ~/go/{src,mod} export GOPATH=~/go -cd ~go/src +cd ~/go/src git clone https://github.com/unpoller/unpoller.git cd unpoller make rpm deb - ``` +``` diff --git a/documentation/docs/install/cloudkey.md b/documentation/docs/install/cloudkey.md index 04cfa129..bd2dbab4 100644 --- a/documentation/docs/install/cloudkey.md +++ b/documentation/docs/install/cloudkey.md @@ -6,7 +6,7 @@ title: CloudKey ## Introduction Two methods are available for installation on a CloudKey, CloudKey Gen2 or CloudKey G2+. -The method depends on whether the device is running `unifos` or not. +The method depends on whether the device is running UnifiOS or not. :::note These solutions are community-supplied and have a limited user base. @@ -41,7 +41,7 @@ apt-get update apt-get install -y influxdb influxdb-client ``` -Add user to influx; [from here](https://v2.docs.influxdata.com/v2.0/users/create-user/): +Add user to InfluxDB; [from here](https://docs.influxdata.com/influxdb/v1/tools/influx-cli/): ```shell influx -host localhost -port 8086 @@ -53,7 +53,7 @@ GRANT ALL ON unpoller TO unifipoller :::note For InfluxDB on a CloudKey it is _highly_ advisable to add a retention policy to -prevent the database from growing in uncontrollably. +prevent the database from growing uncontrollably. ::: #### Install Unpoller @@ -67,7 +67,7 @@ Install the Go Lift package repo and Unpoller with this command: curl -s https://golift.io/repo.sh | sudo bash -s - unpoller ``` -### Current Firmware: `unifios` +### Current Firmware: UnifiOS There is an existing suite for installing `podman` containers to run on `unifios` - see [here](https://github.com/boostchicken/udm-utilities). At the time of writing we are not diff --git a/documentation/docs/install/configuration.md b/documentation/docs/install/configuration.md index d4fafcb8..a5fc348d 100644 --- a/documentation/docs/install/configuration.md +++ b/documentation/docs/install/configuration.md @@ -21,7 +21,8 @@ the advantage that UniFi Poller specific settings can be saved in the same share Docker folder as other app's data. **Normally native installs use a configuration file and Docker installations use environment variables.** -An example is included in the Unpoller install folder `up.xxxx.example`. You can edit the file in a text editor and then rename it removing `.example`. To create a valid file. +An example is included in the UnPoller install folder as `up.conf.example`. You can edit the +file in a text editor and then rename it, removing `.example`, to create a valid `up.conf` file. The variables to be set can be split into three categories: @@ -60,7 +61,7 @@ debug = false Docker Example: ```shell -docker run -e "UP_POLLER_DEBUG=true" -e "UP_POLLER_QUIET=false" golift/unpoller +docker run -e "UP_POLLER_DEBUG=true" -e "UP_POLLER_QUIET=false" ghcr.io/unpoller/unpoller ``` ## UniFi Controller @@ -141,7 +142,7 @@ docker run -e "UP_UNIFI_DEFAULT_PASS=unifip4assw0rd" \ -e "UP_UNIFI_DEFAULT_SAVE_SITES=true" \ -e "UP_UNIFI_DEFAULT_SITE_0=default" \ - golift/unpoller + ghcr.io/unpoller/unpoller ``` ### Multiple Controllers @@ -199,7 +200,7 @@ If you don't use Prometheus, set `disable` to `true`. The [Prometheus](../dependencies/prometheus) page has a full explanation of how to configure Poller. ::: -:::note Namespace vs. User +:::note[Namespace vs. User] `UP_PROMETHEUS_NAMESPACE` (default `unifipoller`) is only a metric name prefix; it has nothing to do with `UP_UNIFI_DEFAULT_USER`/`UP_UNIFI_CONTROLLER_0_USER`, which is the username of the read-only account you created on the controller. It's easy to confuse @@ -220,7 +221,7 @@ This section begins with ``[influxdb]`` and configures a single InfluxDB write d |UP_INFLUXDB_PASS |influxdb.pass |`"unifipoller"` password for username| |UP_INFLUXDB_INTERVAL |influxdb.interval|`"30s"` how often to poll and collect metrics, ie "1m" or "90s"| -InfluxDB is very easy to use with UniFi Poller, and it's recommend if this whole +InfluxDB is very easy to use with UniFi Poller, and it's recommended if this whole metrics ecosystem is new to you. All you do is add a small configuration like you see below and poller sends all your glorious data into the database. @@ -240,5 +241,5 @@ docker run -e "UP_INFLUXDB_INTERVAL=60s" \ -e "UP_UNIFI_DEFAULT_URL=https://192.168.1.2" -e "UP_UNIFI_DEFAULT_PASS=unifipassw0rd" - golift/unpoller + ghcr.io/unpoller/unpoller ``` diff --git a/documentation/docs/install/controllerlogin.md b/documentation/docs/install/controllerlogin.md index 60507ef6..df865139 100644 --- a/documentation/docs/install/controllerlogin.md +++ b/documentation/docs/install/controllerlogin.md @@ -36,8 +36,8 @@ UnifiOS (check under Settings > System in the UniFi Network app), it is recommen Limited Admin user is created with Read-Only rights to the UniFi Network app. Other access levels may not work correctly. -For example,the screenshot below show the username chosen as `unifipoller`. -This is the default, will be used throughout these docs. +For example, the screenshot below shows the username chosen as `unifipoller`. +This is the default, and will be used throughout these docs. ![img](../../static/img/UDM_user.png) @@ -48,9 +48,11 @@ running UnifiOS) then create a manual read-only user. The `Email` field will be the 'username' you will need to create the config file. -The Unifi controller currently requires the email be formated correctly. If you don't have your own domain try using @example.com so you don't inadvertantly give access to a random user. +The UniFi controller currently requires the email be formatted correctly. If you don't have +your own domain try using `@example.com` so you don't inadvertently give access to a random user. ## Next Steps + [Installation Overview](overview) -- [Create Config](controllerlogin) +- [Create Config](configuration) diff --git a/documentation/docs/install/docker.md b/documentation/docs/install/docker.md index ea112bb9..2f29d810 100644 --- a/documentation/docs/install/docker.md +++ b/documentation/docs/install/docker.md @@ -3,7 +3,7 @@ id: docker title: Docker --- -This page assumes that you have decided to start Unpoller with Docker using the command line. +This page assumes that you have decided to start UnPoller with Docker using the command line. ## First @@ -17,7 +17,7 @@ If you don't have them, follow these instructions for installing ## Pull the Image -First pull the image from Docker Hub using +First pull the image from [GHCR](https://github.com/unpoller/unpoller/pkgs/container/unpoller) using ```shell docker pull ghcr.io/unpoller/unpoller @@ -49,7 +49,7 @@ If you are using the command line and have decided to use environment variables container using the following command (and pass in other environment variables you wish to). ```shell -docker run -e UP_UNIFI_DEFAULT_PASS="your-secret-pasword" ghcr.io/unpoller/unpoller:latest +docker run -e UP_UNIFI_DEFAULT_PASS="your-secret-password" ghcr.io/unpoller/unpoller:latest ``` ### Using Configuration File diff --git a/documentation/docs/install/dockercompose.md b/documentation/docs/install/dockercompose.md index 5fe6075c..102409ca 100644 --- a/documentation/docs/install/dockercompose.md +++ b/documentation/docs/install/dockercompose.md @@ -3,8 +3,8 @@ id: dockercompose title: Docker Compose --- -This page assumes that you have decided to start Unpoller using `docker-compose`. -The setup detailed below will install containers for Unpoller, Grafana and InfluxDB +This page assumes that you have decided to start UnPoller using Docker Compose. +The setup detailed below will install containers for UnPoller, Grafana and InfluxDB. ## First @@ -32,10 +32,10 @@ but also for InfluxDB and Grafana. If you wish to use existing instances then am ### Using Environment Variables -The easiest way to pass environment variables via `docker-compose` is to have a -file called `.env` in the same folder as the `docker-compose` yaml file +The easiest way to pass environment variables via Docker Compose is to have a +file called `.env` in the same folder as the Compose YAML file -:::tip Hidden Files +:::tip[Hidden Files] Files beginning with a period `.` are generally hidden. You may need to use `ls -a` to find the `.env` file. ::: @@ -49,14 +49,14 @@ saved in the same folder as the `.env` file) #### Prometheus Example -This example is advanced, for demonstration only, and not recommend for newbies. +This example is advanced, for demonstration only, and not recommended for new users.
Advanced Prometheus Example --- -The following example illustrates launching Grafana, Prometheus and Unpoller with docker compose. +The following example illustrates launching Grafana, Prometheus and UnPoller with Docker Compose. This does not utilize a `.env` file nor a configuration file and instead puts all the env variables directly into the docker-compose file. This still requires a [Prometheus configuration](../dependencies/prometheus) to scrape Poller. @@ -67,7 +67,6 @@ example. ::: ```yaml -version: '3' services: prometheus: image: prom/prometheus:latest @@ -167,8 +166,7 @@ UNIFI_URL=https://127.0.0.1:8443 The `docker-compose.yml` file: ```yaml -# This is for unifi-poller v2. -version: '3' +# This is for UnPoller v2+. services: influxdb: restart: always @@ -246,13 +244,13 @@ Details of tags available are described in [Docker - FAQ](../help/docker_faq). ## Starting -Whichever configuration method you chose, this is how you start the contianers: +Whichever configuration method you chose, this is how you start the containers: ```shell -docker-compose up -e docker-compose.env +docker compose --env-file docker-compose.env up ``` -If everything is working, after a few minutes you should see like likes this: +If everything is working, after a few minutes you should see lines like this: ```none [INFO] UniFi Metrics Recorded. Sites: 1, Clients: 67, UAP: 6, USG/UDM: 1, USW: 5, IDS Events: 0, Points: 1837, Fields: 11307, Errs: 0, Elapsed: 599ms @@ -268,7 +266,7 @@ Get the container id with `docker ps`. Stop the containers and restart them in daemon mode, like this: ```shell -docker-compose up -e docker-compose.env -d +docker compose --env-file docker-compose.env up -d ``` ## Next Steps diff --git a/documentation/docs/install/freebsd.md b/documentation/docs/install/freebsd.md index 56089a5f..de3fc08a 100644 --- a/documentation/docs/install/freebsd.md +++ b/documentation/docs/install/freebsd.md @@ -50,7 +50,7 @@ Use these commands to maintain the service: man unpoller # Edit config file. -# A defualt configuration file is placed in /usr/local/etc/unpoller/up.conf which is not overwritten on upgrades +# A default configuration file is placed in /usr/local/etc/unpoller/up.conf which is not overwritten on upgrades # A sample configuration is placed in /usr/local/etc/unpoller/up.conf.sample vi /usr/local/etc/unpoller/up.conf diff --git a/documentation/docs/install/gettingstarted.md b/documentation/docs/install/gettingstarted.md index 5183b845..6d7b3acd 100644 --- a/documentation/docs/install/gettingstarted.md +++ b/documentation/docs/install/gettingstarted.md @@ -38,8 +38,8 @@ If your controller runs UnifiOS (UDM, UDM Pro, UXG, UCG, UCK G2, or self-hosted Network Server) then it is recommended that a Limited Admin user is created with Read-Only rights to the UniFi Network app. Other access levels may not work correctly. -For example,the screenshot below show the username chosen as `unifipoller`. -This is the default, will be used throughout these docs. +For example, the screenshot below shows the username chosen as `unifipoller`. +This is the default, and will be used throughout these docs. ![img](../../static/img/UDM_user.png) @@ -58,7 +58,7 @@ New users may find `docker-compose` (using **InfluxDB**) easiest to use. At this point you need to decide whether to use: -1. [Docker](../install/dockercompose) - using `docker-compose`. +1. [Docker](../install/dockercompose) - using Docker Compose. 1. [Docker](../install/docker) - using command line - This assumes that you have access to Grafana and InfluxDB/Prometheus. 1. Bare metal or a NAS: diff --git a/documentation/docs/install/grafana.md b/documentation/docs/install/grafana.md index dbaa9d96..2d1fdbe1 100644 --- a/documentation/docs/install/grafana.md +++ b/documentation/docs/install/grafana.md @@ -23,7 +23,9 @@ The following explains the steps for InfluxDB; the Prometheus steps are very sim - - Database = `unpoller` - - Username = `unpoller` - - Password = `CHANGEME` (or whatever you changed `INFLUXDB_ADMIN_PASSWORD` to) -- Under "Custom HTTP Headers" add an `Authorization` header, with value `Token unpollersecret` (optionally replace `unpollersecret` with whatever you changed `INFLUXDB_ADMIN_TOKEN` to). +- Under "Custom HTTP Headers" add an `Authorization` header, with value + `Token unpollersecret` (optionally replace `unpollersecret` with whatever you + changed `INFLUXDB_ADMIN_TOKEN` to). - No other fields need to be changed or set on this page. - Click `Save & Test` - You should get green banner above the save and test that says 'Data Source is Working' @@ -70,7 +72,7 @@ Client DPI|[11310](https://grafana.com/grafana/dashboards/11310)|[10419](https:/ Sites|[11311](https://grafana.com/grafana/dashboards/11311)|[10414](https://grafana.com/grafana/dashboards/10414)|...enabled `save_sites` USW|[11312](https://grafana.com/grafana/dashboards/11312)|[10417](https://grafana.com/grafana/dashboards/10417)|...have UniFi Switches USG|[11313](https://grafana.com/grafana/dashboards/11313)|[10416](https://grafana.com/grafana/dashboards/10416)|...have a UniFi gateway (UDM-P, UDM, USG, ...) -UAP|[11314](https://grafana.com/grafana/dashboards/11314)|[10415](https://grafana.com/grafana/dashboards/10416)|...have UniFi Access Points +UAP|[11314](https://grafana.com/grafana/dashboards/11314)|[10415](https://grafana.com/grafana/dashboards/10415)|...have UniFi Access Points Clients|[11315](https://grafana.com/grafana/dashboards/11315)|[10418](https://grafana.com/grafana/dashboards/10418)| ..love nano #### Dashboard Update Notes diff --git a/documentation/docs/install/installmethod.md b/documentation/docs/install/installmethod.md index d967d3ec..a9ce685c 100644 --- a/documentation/docs/install/installmethod.md +++ b/documentation/docs/install/installmethod.md @@ -3,9 +3,9 @@ id: installmethod title: Install Method --- -## Chosing an Install Method +## Choosing an Install Method -There are three main methods to install the Unpollor 'suite' (Unpoller and accociated programs) +There are three main methods to install the UnPoller suite (UnPoller and associated programs). ### Docker Image @@ -19,13 +19,13 @@ This is the recommended way to install and the best option for new users. #### Disadvantages of Docker -- Some performance impact (though not likely to impact UniFi Poller, there is an overhead). +- Some performance impact (though not likely to impact UnPoller, there is an overhead). - Relies on a base system for persistence of data. - May not be implemented on some useful platforms (eg NAS). ### Manual Install -Install each of the components individually +Install each of the components individually. #### Advantages of Manual @@ -41,30 +41,32 @@ Install each of the components individually ### Kubernetes -Run Unpoller in a k8s cluster through the usage of the helm chart. +Run UnPoller in a k8s cluster through the usage of the Helm chart. #### Advantages of Kubernetes -- Automatic updates when combined with flux +- Automatic updates when combined with Flux - Integration with prometheus operator and grafana operator -- Pre packed solution +- Pre-packed solution #### Disadvantages of Kubernetes -- Requires a kubernetes cluster + all associated complexities -- Requires kubernetes knowledge to troubleshoot +- Requires a Kubernetes cluster and all associated complexities +- Requires Kubernetes knowledge to troubleshoot - Higher complexity ### Device Specific -Some devices have specific install methods. If you have one of those devices the instructions for that device take precedence. +Some devices have specific install methods. If you have one of those devices the instructions +for that device take precedence. - unRAID Template -- An unRAID Template is available in the Community Applications. - [Synology](./synology) -- Via Docker Image -- [CloudKey](./cloudkey) -- You may also install directly on a CloudKey, but that's an advanced setup and not generally recommended. +- [CloudKey](./cloudkey) -- You may also install directly on a CloudKey, but that's an + advanced setup and not generally recommended. ## Next Steps [Installation Overview](overview) -- [Setup controller login for Unpoller](controllerlogin) +- [Setup controller login for UnPoller](controllerlogin) diff --git a/documentation/docs/install/kubernetes.md b/documentation/docs/install/kubernetes.md index be01ddc2..997b0c1a 100644 --- a/documentation/docs/install/kubernetes.md +++ b/documentation/docs/install/kubernetes.md @@ -3,27 +3,28 @@ id: kubernetes title: Kubernetes --- -This page assumes that you have decided to install UniFi Poller on to an kubernetes cluster. +This page assumes that you have decided to install UnPoller onto a Kubernetes cluster. Installing a cluster is not in the scope of this guide. ## First -All the possible configuration can be found on the [main page](https://github.com/unpoller/helm-chart) hosting the chart -This chart uses CRDs from the prometheus operator, which can be installed with their [community -repository](https://github.com/prometheus-community/helm-charts) +All the possible configuration can be found on the [main page](https://github.com/unpoller/helm-chart) +hosting the chart. +This chart uses CRDs from the Prometheus Operator, which can be installed with their +[community repository](https://github.com/prometheus-community/helm-charts). --- ## Installation -The two main ways to install the helm chart is through the CLI or through a gitops tools as flux. +The two main ways to install the Helm chart are through the CLI or through a GitOps tool such as Flux. ```shell helm repo add unpoller https://unpoller.github.io/helm-chart helm repo update ``` -If you are using flux, you can rely on their CR: +If you are using Flux, you can rely on their CR: ```yaml apiVersion: source.toolkit.fluxcd.io/v1 @@ -54,7 +55,6 @@ spec: chart: spec: chart: unpoller - version: 2.11.2-Chart6 sourceRef: kind: HelmRepository name: unpoller @@ -64,13 +64,16 @@ spec: allPossibleValues: ``` +Pin `spec.chart.spec.version` to a [chart release](https://github.com/unpoller/helm-chart/releases) +if you do not want Flux to track latest. + ## Maintenance -When a new release of the chart (or unpoller is generated) you can update unpoller -by running helm +When a new release of the chart (or UnPoller) is generated you can update UnPoller +by running Helm: ```bash -helm upgrade --reuse-values yourreleasename ./redis +helm upgrade --reuse-values your-release-name unpoller/unpoller ``` -In case of flux/argocd, just updating the version of the chart, should be enough. +In case of Flux or Argo CD, updating the version of the chart should be enough. diff --git a/documentation/docs/install/macos.md b/documentation/docs/install/macos.md index 810bd01c..3eb393f7 100644 --- a/documentation/docs/install/macos.md +++ b/documentation/docs/install/macos.md @@ -1,6 +1,6 @@ --- id: macos -title: MacOS +title: macOS --- This page assumes that you have decided to install UniFi Poller on to an existing macOS operating system. @@ -19,7 +19,7 @@ If you don't have them, follow these instructions for installing 1. Install [Homebrew](https://brew.sh/) ```shell - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` 1. Install Poller ``` diff --git a/documentation/docs/install/overview.md b/documentation/docs/install/overview.md index 60b08982..18a42110 100644 --- a/documentation/docs/install/overview.md +++ b/documentation/docs/install/overview.md @@ -4,11 +4,15 @@ title: Installation Overview --- ## Installation Overview -If you prefer you can keep this page open as you walk though the installation steps of the Unpoller suite. -The Unpoller suite allows you to collect data from your UniFi network controller, save it to a database, and then display it on pre-supplied attractive and data-rich Grafana dashboards +If you prefer you can keep this page open as you walk through the installation steps of +the UnPoller suite. + +The UnPoller suite allows you to collect data from your UniFi network controller, save it +to a database, and then display it on pre-supplied attractive and data-rich Grafana dashboards. + +The suite consists of three main programs that work together: -The 'suite' consists of three main programs that work togather. UnPoller itself --> The Database --> Grafana viewer dashboards For more information check out [how it works](../poller/howitworks). @@ -16,43 +20,51 @@ If you're ready to get started, follow our step by step install guide below. ### 1) Choose an Installation Method +[Choosing an Install Method](../install/installmethod) -[Chosing an Install Method](../install/installmethod) +### 2) Setup UniFi login for UnPoller -### 2) Setup Unifi login for Unpoller -No matter which method of installation you choose you will need to give Unpoller a way to access the infomation in your controller. -You can setup Unpoller to get information from multiple controllers if you want, however we recommend getting one controller working before linking multiple. +No matter which method of installation you choose you will need to give UnPoller a way to +access the information in your controller. +You can set up UnPoller to get information from multiple controllers if you want, however we +recommend getting one controller working before linking multiple. -[Adding a login for Unpoller](controllerlogin) +[Adding a login for UnPoller](controllerlogin) ### 3) Create Config -The config tells Unpoller where to find the Unifi controller(s), database, and other infomation. -(If you are doing a Manual installation you may need some information from Step-4 to complete the config.) + +The config tells UnPoller where to find the UniFi controller(s), database, and other information. +(If you are doing a Manual installation you may need some information from Step-4 to complete +the config.) [Creating/Modifying Config](configuration.md) -### 4) Install Unpoller Suite +### 4) Install UnPoller Suite + Option 1 - Using a Docker image -- [Installing via docker-compose](dockercompose) +- [Installing via Docker Compose](dockercompose) - [Installing via command line](docker)
Option 2 - Manual installation **Install Database:** -[InfluxDB](../dependencies/influxdb) and [Prometheus](../dependencies/prometheus) are both supported. You only need one. +[InfluxDB](../dependencies/influxdb) and [Prometheus](../dependencies/prometheus) are both +supported. You only need one. -InfluxDB is recomended, as it supports both metrics and logging. -Prometheus can hold only metrics. Loki is made by the Devs of Prometheus to hold logs. If you want both metrics & logging you will need to install Loki alongside Prometheus. +InfluxDB is recommended, as it supports both metrics and logging. +Prometheus can hold only metrics. Loki is made by the developers of Prometheus to hold logs. +If you want both metrics and logging you will need to install Loki alongside Prometheus. **Install Grafana:** [Grafana Installation](../dependencies/grafana) -**Install Unpoller:** +**Install UnPoller:** Platform specific install docs: + - [Windows](windows) -- [MacOS](macos) +- [macOS](macos) - [Linux](linux) - [FreeBSD](freebsd) - [Kubernetes](kubernetes) @@ -60,23 +72,25 @@ Platform specific install docs:
### 5) Setup Grafana + [Setup Grafana](grafana) ### You're Done! + If you're having issues: + - Check for some [Common Problems](../help/common) -- Check the [Unpoller FAQ](../poller/faq) +- Check the [UnPoller FAQ](../poller/faq) - If you have questions regarding Docker check out the [Docker FAQ](../help/docker_faq) - Contact us on [Discord](https://golift.io/discord) - Or try [this](https://community.ui.com/questions/UniFi-Poller-Store-UniFi-Controller-Metrics-in-Prometheus-or-InfluxDB/58a0ea34-d2b3-41cd-93bb-d95d3896d1a1) -thread on the UI community. -- Alternatively, raise an [issue](https://github.com/unpoller/unpoller/issues) on Github. - + thread on the UI community. +- Alternatively, raise an [issue](https://github.com/unpoller/unpoller/issues) on GitHub. - -### Advanced Setup & Customization +### Advanced Setup and Customization [Multiple Controllers](configuration.md#multiple-controllers) -!!! Need to flush this out with links to Grafana guides to manipulating dashboards, presenting data, and any scraps of infomation we can find on the Unifi data that's being pulled. - +Grafana documents how to [create and edit dashboards](https://grafana.com/docs/grafana/latest/dashboards/). +Copy the provided UnPoller dashboards into your own folder before customizing them so you can +still import updates later. See [Setup Grafana](grafana) for import IDs and tips. diff --git a/documentation/docs/install/synology.md b/documentation/docs/install/synology.md index 362c4dad..ff43609d 100644 --- a/documentation/docs/install/synology.md +++ b/documentation/docs/install/synology.md @@ -17,9 +17,9 @@ We use a custom bridge network for some very good reasons and we highly recommen about with host files (this is a docker feature not anything to do with Synology) - This also means in the event the container IP changes (it happens) you don't need to reconfigure - This also means, due to the ICC, that no host port mappings are required other than for the - Grafana 3000:3000 mapping in the Grafana contained, you can choose to remove other port mappings if you desire + Grafana 3000:3000 mapping in the Grafana container, you can choose to remove other port mappings if you desire - The reason for not using host port mappings for container not equalling container comms is we - keep this solution self-container and don't have to worry about weird things that might have been + keep this solution self-contained and don't have to worry about weird things that might have been on the Synology (changing of Synology IP, other containers with host mappings etc). Customize in your environment as needed. @@ -33,7 +33,7 @@ Assumptions: on Synology **Note:** You should always logon with your default admin account you created when you setup -you Synology, logging on as root no longer works. +your Synology; logging on as root no longer works. ## Prepare Synology & Docker @@ -46,10 +46,10 @@ Click on network and select add to create new network: 1. Ensure `Get network configuration automatically` is selected 1. Click `add` -We do this because the default bridge doesn't have name resolution but new bridge do, -so you don't have to mess with host files etc inside the container. (need to verify this is actually true) +We do this because the default bridge doesn't have name resolution but new bridges do, +so you don't have to mess with host files etc inside the container. -I don't recommend you use host network, using the bridge network keeps it self contained at +I don't recommend you use host network. Using the bridge network keeps it self-contained and helps avoid conflicts with the host or other containers you might have that we cannot predict. ### Prepare mapped volumes @@ -67,7 +67,8 @@ helps avoid conflicts with the host or other containers you might have that we c - influxdb for `influxdb:1.8` https://hub.docker.com/_/influxdb/ :::note -The unpoller container requires the InfluxDB database to already exist, so you _must_ create the containers in the order below. +The unpoller container requires the InfluxDB database to already exist, +so you _must_ create the containers in the order below. ::: ### Create influxdb container @@ -109,10 +110,9 @@ The unpoller container requires the InfluxDB database to already exist, so you _ - Ensure that `use the same network as docker host` is unchecked 1. On the Environment tab, add the following vars: - `UP_INFLUXDB_URL` | `http://influxdb1:8086` - - `UP_UNIFI_DEFAULT_URL` | `https://your.unifi.controller.ip:8443` - - `UP_UNIFI_DEFAULT_AUTH_TOKEN` | auth token for account created earlier. e.g. `unifipoller` - - `UP_UNIFI_DEFAULT_ORG` | org created earlier - - `UP_UNIFI_DEFAULT_BUCKET` | bucket created earlier + - `UP_UNIFI_DEFAULT_URL` | `https://your.unifi.controller.ip` (add `:8443` only for non-UnifiOS) + - `UP_UNIFI_DEFAULT_USER` | controller username, e.g. `unifipoller` + - `UP_UNIFI_DEFAULT_PASS` | controller password - (optional) `UP_POLLER_DEBUG` | `true` 1. Finalize the container by: - Click `APPLY` @@ -139,7 +139,7 @@ if you are using `unifios`. Those are: UDM Pro, UDM, UXG, or CloudKey with recen ## Grafana Container This container is a little difficult on Synology. -There are two methods that have been to shown to work. +There are two methods that have been shown to work. If you have an even better method let us know! The two different methods do have their pros and cons. diff --git a/documentation/docs/install/windows.md b/documentation/docs/install/windows.md index b06eb0f5..ca96c2a2 100644 --- a/documentation/docs/install/windows.md +++ b/documentation/docs/install/windows.md @@ -18,16 +18,17 @@ You can review the [installation overview](overview.md) if needed. ## Install -As it is now, a pre-compiled windows binary (.exe) is provided on the +As it is now, a pre-compiled Windows binary (.exe) is provided on the [Releases](https://github.com/unpoller/unpoller/releases) page `unpoller.amd64.exe.zip`. -Unzip the file where you would like to install Unpoller. -Drop a valid [config file](configuration) `up.conf` in the same directory, and you can run this on Windows by using the following command: +Unzip the file where you would like to install UnPoller. +Drop a valid [config file](configuration) `up.conf` in the same directory, and you can run this +on Windows by using the following command: ```shell unpoller.amd64.exe -c up.conf ``` -As long as Unpoller is running it should be retreiving updated data from your controller. +As long as UnPoller is running it should be retrieving updated data from your controller. Please contact us on [Discord](https://golift.io/discord) if you need any help. diff --git a/documentation/docs/poller/changelog.md b/documentation/docs/poller/changelog.md index d700dd0e..c8e69b45 100644 --- a/documentation/docs/poller/changelog.md +++ b/documentation/docs/poller/changelog.md @@ -75,7 +75,7 @@ file format. If you use environment variables, they all need to be updated! You may configure multiple controllers and group them with roles. - **Dynamic controller support added to input module and prometheus module.** - **All [dashboards updated](https://grafana.com/dashboards?search=unifi-poller). - Multi-controller support added**, but hidden (since most users wont need it). + Multi-controller support added**, but hidden (since most users won't need it). - Many build fixes and improvements for packages, FreeBSD, Homebrew and Docker. - Type Conflict error fixes for InfluxDB (and probably more errors added, uhg). - [Install script](https://github.com/unpoller/unpoller/blob/master/scripts/install.sh) diff --git a/documentation/docs/poller/contributors.md b/documentation/docs/poller/contributors.md index bbfe1883..658a4aa6 100644 --- a/documentation/docs/poller/contributors.md +++ b/documentation/docs/poller/contributors.md @@ -25,16 +25,14 @@ The following fine folks are providing their services, completely free! These service integrations are used for things like storage, building, compiling, distribution and documentation support. This project succeeds because of them. Thank you! -PackageCloud   - -GitHub   - -Docker   - -Travis-CI   - -Homebrew   - -Go Lift   - -Grafana   +[![PackageCloud](https://docs.golift.io/integrations/packagecloud.png)](https://packagecloud.io) +  +[![GitHub](https://docs.golift.io/integrations/octocat.png)](https://GitHub.com) +  +[![Docker](https://docs.golift.io/integrations/docker.png)](https://cloud.docker.com) +  +[![Homebrew](https://docs.golift.io/integrations/homebrew.png)](https://brew.sh) +  +[![Go Lift](https://docs.golift.io/integrations/golift.png)](https://golift.io) +  +[![Grafana](https://docs.golift.io/integrations/grafana.png)](https://grafana.com) diff --git a/documentation/docs/poller/faq.md b/documentation/docs/poller/faq.md index 515ded6c..daf42091 100644 --- a/documentation/docs/poller/faq.md +++ b/documentation/docs/poller/faq.md @@ -10,7 +10,7 @@ title: FAQs - InfluxDB 2.x does **not** work. - Prometheus 2.x if you choose to use Prometheus. -:::caution InfluxDB 2.0 +:::caution[InfluxDB 2.0] UniFi Poller does not currently work with versions of InfluxDB newer than 1.8.x. ::: diff --git a/documentation/docs/poller/introduction.md b/documentation/docs/poller/introduction.md index 46aea668..510ca500 100644 --- a/documentation/docs/poller/introduction.md +++ b/documentation/docs/poller/introduction.md @@ -5,7 +5,7 @@ title: Introduction UniFi Poller allows you to collect data from your UniFi network controller, save it to a database, and then display it on pre-supplied attractive -and data-rich Grafana dashboards +and data-rich Grafana dashboards. ## Main attractions @@ -14,7 +14,7 @@ and data-rich Grafana dashboards - Easy access to data to help with troubleshooting or analysis. - Customizable: make your own dashboards, or change the ones supplied. - Works with either InfluxDB or Prometheus. -- Re-use existing database or Grafana installations. +- Reuse existing database or Grafana installations. ## Description @@ -25,13 +25,13 @@ and simplify network device configuration. This controller can be installed on Windows, macOS, FreeBSD, Linux or Docker. Ubiquiti also provides a dedicated hardware device called a CloudKey that runs the controller software. And more recently they've developed the Dream Machine - an all-in-one -controller, switch, gateway and accesspoint or NVR +controller, switch, gateway and access point or NVR. UniFi Poller is a small [Golang](https://golang.org/) application that runs on Windows, macOS, FreeBSD, Linux or Docker. In Influx-mode it polls a UniFi controller every 30 seconds for measurements and exports the data to an Influx database. In Prometheus mode the poller opens a web port and accepts Prometheus polling. -It converts the UniFi Controller API data into Prometheus exports on the fly +It converts the UniFi Controller API data into Prometheus exports on the fly. This application requires your controller to be running all the time. If you run a UniFi controller, there's no excuse not to install Influx or Prometheus, diff --git a/documentation/docs/poller/license.md b/documentation/docs/poller/license.md index 77d7d251..e8b3f803 100644 --- a/documentation/docs/poller/license.md +++ b/documentation/docs/poller/license.md @@ -3,7 +3,7 @@ ```text MIT LICENSE. Copyright (c) 2018-2020 David Newhall II -Copyright (c) 2020-2021 Go Lift +Copyright (c) 2020-2026 Go Lift Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/documentation/docusaurus.config.js b/documentation/docusaurus.config.js index 234aba27..253e4ea4 100644 --- a/documentation/docusaurus.config.js +++ b/documentation/docusaurus.config.js @@ -1,107 +1,146 @@ -module.exports = { - title: 'Unpoller - UniFi Poller', +// @ts-check +// `@type` JSDoc annotations allow editor autocompletion and type checking +// (when paired with `@ts-check`). + +/** @type {import('@docusaurus/types').Config} */ +const config = { + title: 'UnPoller', tagline: 'Telemetry and Observability for your UniFi Network', + favicon: 'img/favicon.ico', + + // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future + future: { + v4: { + removeLegacyPostBuildHeadAttribute: true, + fasterByDefault: true, + siteStorageNamespacing: true, + mdx1CompatDisabledByDefault: true, + // Infima cascade layers restyle the existing custom CSS. + useCssCascadeLayers: false, + }, + }, + url: 'https://unpoller.com', baseUrl: '/', + organizationName: 'unpoller', + projectName: 'unpoller.github.io', + onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', - favicon: 'img/favicon.ico', - organizationName: 'unpoller', // Usually your GitHub org/user name. - projectName: 'unpoller.github.io', // Usually your repo name. - themeConfig: { - navbar: { - logo: { - alt: 'UniFi Poller', - src: 'img/logo.png', - }, - items: [ - { - to: 'docs/poller/introduction', - activeBasePath: 'docs', - label: 'Documentation', - position: 'left', - }, - { - href: 'https://github.com/facebook/docusaurus', - label: 'Docusaurus', - position: 'right', - }, - ], + markdown: { + hooks: { + onBrokenMarkdownLinks: 'warn', }, - footer: { - style: 'dark', - links: [ - { - title: 'Support', - items: [ - { - label: 'Go Lift Discord', - href: 'https://golift.io/discord', - }, - { - label: 'Send Feedback', - href: 'https://golift.io/unpoller/issues/new', - }, - ], - }, - { - title: 'Community', - items: [ - { - label: 'Ubiquiti Forums', - href: 'https://community.ui.com/questions/Unifi-Poller-Store-Unifi-Controller-Metrics-in-InfluxDB-without-SNMP/58a0ea34-d2b3-41cd-93bb-d95d3896d1a1', - }, - { - label: 'Go Lift Discord', - href: 'https://golift.io/discord', - }, - ], - }, - { - title: 'Downloads', - items: [ - { - label: 'Packagecloud', - href: 'https://packagecloud.io/golift', - }, - { - label: 'Latest Release', - href: 'https://github.com/unpoller/unpoller/releases/latest', - }, - ], - }, - { - title: 'Information', - items: [ - { - label: 'Contact Us', - href: 'mailto:code@golift.io', - }, - { - label: 'Software License', - href: '/docs/poller/license', - }, - ], - }, - ], - copyright: `
`, + mdx1Compat: { + // Keep :::tip Title working; docs also use :::tip[Title]. + admonitions: true, }, }, + + i18n: { + defaultLocale: 'en', + locales: ['en'], + }, + presets: [ [ - '@docusaurus/preset-classic', - { + 'classic', + /** @type {import('@docusaurus/preset-classic').Options} */ + ({ docs: { - sidebarPath: require.resolve('./sidebars.js'), + sidebarPath: './sidebars.js', }, + blog: false, theme: { - customCss: require.resolve('./src/css/custom.css'), + customCss: './src/css/custom.css', }, - }, + }), ], ], + + themeConfig: + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + ({ + navbar: { + logo: { + alt: 'UnPoller', + src: 'img/logo.png', + }, + items: [ + { + to: 'docs/poller/introduction', + label: 'Documentation', + position: 'left', + }, + { + href: 'https://github.com/unpoller/unpoller', + label: 'GitHub', + position: 'right', + }, + ], + }, + footer: { + style: 'dark', + links: [ + { + title: 'Support', + items: [ + { + label: 'Go Lift Discord', + href: 'https://golift.io/discord', + }, + { + label: 'Send Feedback', + href: 'https://github.com/unpoller/unpoller/issues/new', + }, + ], + }, + { + title: 'Community', + items: [ + { + label: 'Ubiquiti Forums', + href: 'https://community.ui.com/questions/Unifi-Poller-Store-Unifi-Controller-Metrics-in-InfluxDB-without-SNMP/58a0ea34-d2b3-41cd-93bb-d95d3896d1a1', + }, + { + label: 'GitHub', + href: 'https://github.com/unpoller/unpoller', + }, + ], + }, + { + title: 'Downloads', + items: [ + { + label: 'Packagecloud', + href: 'https://packagecloud.io/golift', + }, + { + label: 'Latest Release', + href: 'https://github.com/unpoller/unpoller/releases/latest', + }, + ], + }, + { + title: 'Information', + items: [ + { + label: 'Contact Us', + href: 'mailto:code@golift.io', + }, + { + label: 'Software License', + href: '/docs/poller/license', + }, + ], + }, + ], + copyright: `
`, + }, + }), }; + +export default config; diff --git a/documentation/package.json b/documentation/package.json index 3b983a18..bbdf85a8 100644 --- a/documentation/package.json +++ b/documentation/package.json @@ -1,7 +1,7 @@ { "name": "pollerdox", - "version": "0.0.0", - "private": true, + "version": "0.0.1", + "private": false, "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", @@ -9,15 +9,23 @@ "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "serve": "docusaurus serve", - "clear": "docusaurus clear" + "clear": "docusaurus clear", + "lint": "markdownlint-cli2 'docs/**/*.md'" }, "dependencies": { - "@docusaurus/core": "^3.0.0", - "@docusaurus/preset-classic": "^3.0.0", - "@mdx-js/react": "^3.0.0", - "clsx": "^2.0.0", - "react": "^19.0.0", - "react-dom": "^19.0.0" + "@docusaurus/core": "3.10.2", + "@docusaurus/faster": "3.10.2", + "@docusaurus/preset-classic": "3.10.2", + "@mdx-js/react": "^3.1.1", + "clsx": "^2.1.1", + "prism-react-renderer": "^2.4.1", + "react": "^19.2.8", + "react-dom": "^19.2.8" + }, + "devDependencies": { + "@docusaurus/module-type-aliases": "3.10.2", + "@docusaurus/types": "3.10.2", + "markdownlint-cli2": "^0.23.2" }, "browserslist": { "production": [ @@ -26,9 +34,12 @@ "not op_mini all" ], "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" + "last 3 chrome version", + "last 3 firefox version", + "last 5 safari version" ] + }, + "engines": { + "node": ">=20.0" } } diff --git a/documentation/sidebars.js b/documentation/sidebars.js index 4727e892..67914fc5 100644 --- a/documentation/sidebars.js +++ b/documentation/sidebars.js @@ -1,44 +1,56 @@ -module.exports = { - someSidebar: { - "Poller": [ - 'poller/introduction', - 'poller/examples', - 'poller/howitworks', - 'poller/faq', - 'poller/otherguides', - 'poller/contributors', - 'poller/changelog', - ], - "Installation": [ - 'install/gettingstarted', - 'install/installmethod', - 'install/controllerlogin', - 'install/dockercompose', - 'install/docker', - 'install/kubernetes', - 'install/freebsd', - 'install/macos', - 'install/linux', - 'install/windows', - 'install/cloudkey', - 'install/synology', - 'install/configuration', - 'install/grafana', - ], - "Dependencies": [ - 'dependencies/grafana', - 'dependencies/prometheus', - 'dependencies/loki', - 'dependencies/influxdb', - ], - "Advanced": [ - "advanced/webserver", - "advanced/api", - ], - "Help": [ - 'help/common', - 'help/help', - 'help/docker_faq', - ], - }, +/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +const sidebars = { + someSidebar: [ + 'poller/introduction', + { + Installation: [ + 'install/gettingstarted', + 'install/overview', + 'install/installmethod', + 'install/controllerlogin', + { + Docker: [ + 'install/dockercompose', + 'install/docker', + 'install/synology', + 'install/cloudkey', + ], + }, + 'install/kubernetes', + 'install/freebsd', + 'install/macos', + 'install/linux', + 'install/windows', + 'install/configuration', + 'install/grafana', + ], + }, + { + Dependencies: [ + 'dependencies/grafana', + 'dependencies/prometheus', + 'dependencies/loki', + 'dependencies/influxdb', + ], + }, + { + Advanced: ['advanced/webserver', 'advanced/api'], + }, + { + Help: ['help/common', 'help/help', 'help/docker_faq', 'help/manualbuild'], + }, + 'poller/examples', + 'poller/howitworks', + 'poller/faq', + 'poller/otherguides', + 'poller/contributors', + 'poller/changelog', + { + type: 'html', + value: '', + defaultStyle: true, + }, + ], }; + +export default sidebars; diff --git a/documentation/src/pages/index.js b/documentation/src/pages/index.js index 3d24fa39..f272d960 100644 --- a/documentation/src/pages/index.js +++ b/documentation/src/pages/index.js @@ -69,11 +69,11 @@ function Home() { const {siteConfig = {}} = context; return (
-

UniFi Poller

+

UnPoller

{siteConfig.tagline}