Skip to content

Commit

Permalink
fix #1 add / replace "flag" pkg to support env config,
Browse files Browse the repository at this point in the history
update README.md section
  • Loading branch information
wakeful committed Apr 30, 2018
1 parent f3215f7 commit e7f281e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ Usage of ./pve_exporter:
-version
show version and exit
```
### Configuration

| Type | Flag | Environment |
| ------ | :------------------------------ | :----------------------------- |
| string | -listen-address :9090 | LISTEN_ADDRESS=:9090 |
| string | -telemetry-path /metrics | TELEMETRY_PATH=/metrics |
| string | -pve-url https://127.0.0.1:8006 | PVE_URL=https://127.0.0.1:8006 |
| int | -timeout 5 | TIMEOUT=5 |
| string | -user root | USER=root |
| string | -password 1234 | PASSWORD=1234 |
| string | -realm pam | REALM=pam |

## Metrics

Expand Down
2 changes: 1 addition & 1 deletion pve_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"bytes"
"crypto/tls"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
"strings"
"time"

"github.com/namsral/flag"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/log"
Expand Down

0 comments on commit e7f281e

Please sign in to comment.