1
0
mirror of https://github.com/Oxalide/vsphere-influxdb-go.git synced 2023-10-10 11:36:51 +00:00

Compare commits

..

No commits in common. "master" and "v0.8.5" have entirely different histories.

3 changed files with 1 additions and 21 deletions

View File

@ -1,18 +0,0 @@
FROM golang:1.12-alpine3.10 as builder
WORKDIR /go/src/vsphere-influxdb-go
COPY . .
RUN apk --update add --virtual build-deps git
RUN go get -d -v ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo
FROM alpine:3.10
RUN apk update \
&& apk upgrade \
&& apk add ca-certificates \
&& addgroup -S spock && adduser -S spock -G spock
COPY --from=0 /go/src/vsphere-influxdb-go/vsphere-influxdb-go /vsphere-influxdb-go
USER spock
CMD ["/vsphere-influxdb-go"]

View File

@ -110,8 +110,7 @@ func (vcenter *VCenter) Connect() error {
defer cancel()
stdlog.Println("Connecting to vcenter:", vcenter.Hostname)
u, err := url.Parse("https://" + vcenter.Hostname + "/sdk")
u.User = url.UserPassword(vcenter.Username, vcenter.Password)
u, err := url.Parse("https://" + vcenter.Username + ":" + vcenter.Password + "@" + vcenter.Hostname + "/sdk")
if err != nil {
errlog.Println("Could not parse vcenter url:", vcenter.Hostname)
errlog.Println("Error:", err)

View File

@ -1,6 +1,5 @@
{
"Domain": ".lab",
"RemoveHostDomainName": false,
"Interval": 60,
"VCenters": [
{ "Username": "monitoring", "Password": "monixx", "Hostname": "vcenter-01.dc-01.lab" },