-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.go
34 lines (25 loc) · 1.18 KB
/
variables.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package main
import (
"github.com/Sirupsen/logrus"
"gopkg.in/alecthomas/kingpin.v2"
)
var version string
var buildstamp string
var hash string
var log = logrus.New()
var cactiConf = "cacti-go-tools.json"
var ( //Set Commands, Flags and Args
app = kingpin.New("cacti-go-tools", "Data Collection Engine")
ver = app.Flag("ver", "Ver").Bool()
config = kingpin.Command("config", "Show Configuration")
engine = kingpin.Command("engine", "Acquisition Engine")
enginetype = engine.Arg("enginetype", "Supported Engines: nginx, php-fpm, bind, ntp").Required().HintOptions("nginx php-fpm pagespeed bind ntp").String()
engineoptions = engine.Arg("engine options", "engine options").String()
test = kingpin.Command("test", "Testing tools")
nginxtest = test.Command("nginx", "Test SNMP Acquisition")
nginxtesthost = nginxtest.Arg("host", "Host to test").Required().String()
testtest = test.Command("test", "test")
install = kingpin.Command("install", "Install cacti-go-tools")
installtype = install.Arg("config or binary", "Installs default configuration or binary").String()
installconfurl = install.Flag("configurl", "Configuration file URL").String()
)