Commit 649a4e2a authored by Robert Jacob's avatar Robert Jacob

Add license and readme.

parent a0f4358d
The MIT License (MIT)
Copyright (c) 2017 Robert Jacob
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# nextcloud-exporter
A [prometheus](https://prometheus.io) exporter for getting some metrics of a nextcloud server instance.
## Installation
If you have a working Go installation, getting the binary should be as simple as
```bash
go get github.com/xperimental/nextcloud-exporter
```
## Client credentials
To access the serverinfo API you will need the credentials of an admin user. It is recommended to create a separate user for that purpose.
## Usage
```
$ nextcloud-exporter --help
Usage of nextcloud-exporter:
-a, --addr string Address to listen on for connections. (default ":8080")
-p, --password string Password for connecting to nextcloud.
-t, --timeout duration Timeout for getting server info document. (default 5s)
-l, --url string URL to nextcloud serverinfo page.
-u, --username string Username for connecting to nextcloud.
```
After starting the server will offer the metrics on the `/metrics` endpoint, which can be used as a target for prometheus.
The exporter will query the nextcloud server every time it is scraped by prometheus. If you want to reduce load on the nextcloud server you need to change the scrape interval accordingly:
```yml
scrape_configs:
- job_name: 'nextcloud'
scrape_interval: 90s
static_configs:
- targets: ['localhost:8080']
```
**Note:** The exporter currently uses port 8080 as a default as it does not have an "assigned exporter port" yet. Look at the [prometheus Wiki](https://github.com/prometheus/prometheus/wiki/Default-port-allocations) for any updates.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment