minor changes

This commit is contained in:
David Newhall II 2019-07-14 02:28:32 -07:00
parent 4c3bfff257
commit ed3842f69f
4 changed files with 17 additions and 10 deletions

View File

@ -50,7 +50,10 @@ OPTIONS
CONFIGURATION
---
* Config File Default Location: `/etc/unifi-poller/up.conf`
* Config File Default Location:
* Linux: `/etc/unifi-poller/up.conf`
* macOS: `/usr/local/etc/unifi-poller/up.conf`
* Windows: `C:\ProgramData\unifi-poller\up.conf`
* Config File Default Format: `TOML`
* Possible formats: `XML`, `JSON`, `TOML`, `YAML`

View File

@ -1,9 +1,13 @@
# Grafana Dashboards & Examples
# Examples
This folder contains example configuration files in four
supported formats. You can use any format you want for
the config file, just give it the appropriate suffix for
the format. An XML file should end with `.xml`, a JSON
file with `.json`, and YAML with `.yaml`. The default
format is always TOML and may have any _other_ suffix.
#### Dashboards
This folder used to contain Grafana Dashboards.
**They are now located at [Grafana.com](https://grafana.com/dashboards?search=unifi-poller).** More info is available on The [Grafana Dashboards Wiki Page](https://github.com/davidnewhall/unifi-poller/wiki/Grafana-Dashboards).
This folder contains example configuration files in four supported formats.
You can use any format you want for the config file, just give it the appropriate suffix for the format.
ie. an xml file should end with `.xml`.
**They are now located at [Grafana.com](https://grafana.com/dashboards?search=unifi-poller).**
Also see [Grafana Dashboards](https://github.com/davidnewhall/unifi-poller/wiki/Grafana-Dashboards) Wiki.

View File

@ -13,7 +13,6 @@ var Version = "development"
const (
// App defaults in case they're missing from the config.
defaultConfFile = "/etc/unifi-poller/up.conf"
defaultInterval = 30 * time.Second
defaultInfxDb = "unifi"
defaultInfxUser = "unifi"
@ -26,6 +25,7 @@ const (
// Asset is used to give all devices and clients a common interface.
type Asset interface {
Points() ([]*influx.Point, error)
PointsAt(time.Time) ([]*influx.Point, error)
}
// UnifiPoller contains the application startup data, and auth info for UniFi & Influx.

View File

@ -42,7 +42,7 @@ func (u *UnifiPoller) ParseFlags(args []string) {
}
u.Flag.StringVarP(&u.DumpJSON, "dumpjson", "j", "",
"This debug option prints a json payload and exits. See man page for more.")
u.Flag.StringVarP(&u.ConfigFile, "config", "c", defaultConfFile, "Poller Config File (TOML Format)")
u.Flag.StringVarP(&u.ConfigFile, "config", "c", DefaultConfFile, "Poller Config File (TOML Format)")
u.Flag.BoolVarP(&u.ShowVer, "version", "v", false, "Print the version and exit")
_ = u.Flag.Parse(args)
}