You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: main.go
+40-10Lines changed: 40 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,25 @@
1
+
//
2
+
// DISCLAIMER
3
+
//
4
+
// Copyright 2018 ArangoDB GmbH, Cologne, Germany
5
+
//
6
+
// Licensed under the Apache License, Version 2.0 (the "License");
7
+
// you may not use this file except in compliance with the License.
8
+
// You may obtain a copy of the License at
9
+
//
10
+
// http://www.apache.org/licenses/LICENSE-2.0
11
+
//
12
+
// Unless required by applicable law or agreed to in writing, software
13
+
// distributed under the License is distributed on an "AS IS" BASIS,
14
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+
// See the License for the specific language governing permissions and
16
+
// limitations under the License.
17
+
//
18
+
// Copyright holder is ArangoDB GmbH, Cologne, Germany
19
+
//
20
+
// Author Ewout Prangsma
21
+
//
22
+
1
23
package main
2
24
3
25
import (
@@ -19,13 +41,11 @@ var (
19
41
maskAny=errors.WithStack
20
42
21
43
cmdMain=&cobra.Command{
22
-
Use: "arangodb_exporter",
44
+
Use: "arangodb-exporter",
23
45
Run: cmdMainRun,
24
46
}
25
47
26
-
serverOptionsstruct {
27
-
listenAddressstring
28
-
}
48
+
serverOptionsServerConfig
29
49
arangodbOptionsstruct {
30
50
endpointstring
31
51
jwtSecretstring
@@ -36,7 +56,8 @@ var (
36
56
funcinit() {
37
57
f:=cmdMain.Flags()
38
58
39
-
f.StringVar(&serverOptions.listenAddress, "server.address", ":9101", "Address the exporter will listen on (IP:port)")
59
+
f.StringVar(&serverOptions.Address, "server.address", ":9101", "Address the exporter will listen on (IP:port)")
60
+
f.StringVar(&serverOptions.TLSKeyfile, "ssl.keyfile", "", "File containing TLS certificate used for the metrics server. Format equal to ArangoDB keyfiles")
40
61
41
62
f.StringVar(&arangodbOptions.endpoint, "arangodb.endpoint", "http://127.0.0.1:8529", "Endpoint used to reach the ArangoDB server")
42
63
f.StringVar(&arangodbOptions.jwtSecret, "arangodb.jwtsecret", "", "JWT Secret used for authentication with ArangoDB server")
0 commit comments